Skip to content

Commit

Permalink
Travis: Fully enable GHC 8.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGlScott committed Oct 12, 2018
1 parent 6da3fbe commit 13e3e61
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 32 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "remote-monad"]
path = remote-monad
url = https://github.com/ku-fpg/remote-monad
45 changes: 18 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
#
# runghc make_travis_yml_2.hs '-o' '.travis.yml' '--ghc-head' '--no-no-tests-no-bench' '--no-unconstrained' 'cabal.project'
#
# For more information, see https://github.com/hvr/multi-ghc-travis
# For more information, see https://github.com/haskell-CI/haskell-ci
#
language: c
sudo: false

git:
submodules: true # whether to recursively clone submodules
submodules: false # whether to recursively clone submodules

cache:
directories:
Expand All @@ -29,27 +29,26 @@ before_cache:
matrix:
include:
- compiler: "ghc-8.6.1"
env: GHCHEAD=true
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.6.1], sources: [hvr-ghc]}}
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.1], sources: [hvr-ghc]}}
- compiler: "ghc-8.4.3"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.4.3], sources: [hvr-ghc]}}
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.3], sources: [hvr-ghc]}}
- compiler: "ghc-8.2.2"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.2.2], sources: [hvr-ghc]}}
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}}
- compiler: "ghc-8.0.2"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.0.2], sources: [hvr-ghc]}}
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}}
- compiler: "ghc-7.10.3"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-7.10.3], sources: [hvr-ghc]}}
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.10.3], sources: [hvr-ghc]}}
- compiler: "ghc-head"
env: GHCHEAD=true
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-head], sources: [hvr-ghc]}}

allow_failures:
- compiler: "ghc-head"
- compiler: "ghc-8.6.1"

before_install:
- HC=${CC}
Expand All @@ -70,7 +69,6 @@ install:
- UNCONSTRAINED=${UNCONSTRAINED-true}
- NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-false}
- GHCHEAD=${GHCHEAD-false}
- TARGETS="blank-canvas blank-canvas:tests blank-canvas-examples"
- travis_retry cabal update -v
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
- rm -fv cabal.project cabal.project.local
Expand All @@ -93,11 +91,11 @@ install:
cabal new-update head.hackage -v
fi
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
- "printf 'packages: \".\" \"./examples\" \"./remote-monad\"\\n' > cabal.project"
- "printf 'packages: \".\" \"./examples\"\\n' > cabal.project"
- echo 'package blank-canvas-examples' >> cabal.project
- "echo ' flags: +examples' >> cabal.project"
- touch cabal.project.local
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- blank-canvas | grep -vw -- blank-canvas-examples | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
- cat cabal.project || true
- cat cabal.project.local || true
- if [ -f "./configure.ac" ]; then
Expand All @@ -106,44 +104,37 @@ install:
- if [ -f "./examples/configure.ac" ]; then
(cd "./examples" && autoreconf -i);
fi
- if [ -f "./remote-monad/configure.ac" ]; then
(cd "./remote-monad" && autoreconf -i);
fi
- rm -f cabal.project.freeze
- cabal new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all
- rm -rf .ghc.environment.* "."/dist "./examples"/dist "./remote-monad"/dist
- rm -rf .ghc.environment.* "."/dist "./examples"/dist
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)

# Here starts the actual work to be performed for the package under test;
# any command which exits with a non-zero exit code causes the build to fail.
script:
# test that source-distributions can be generated
- (cd "." && cabal sdist)
- (cd "./examples" && cabal sdist)
- (cd "./remote-monad" && cabal sdist)
- mv "."/dist/blank-canvas-*.tar.gz "./examples"/dist/blank-canvas-examples-*.tar.gz "./remote-monad"/dist/remote-monad-*.tar.gz ${DISTDIR}/
- cabal new-sdist all
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
- cd ${DISTDIR} || false
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
- "printf 'packages: blank-canvas-*/*.cabal blank-canvas-examples-*/*.cabal remote-monad-*/*.cabal\\n' > cabal.project"
- "printf 'packages: blank-canvas-*/*.cabal blank-canvas-examples-*/*.cabal\\n' > cabal.project"
- echo 'package blank-canvas-examples' >> cabal.project
- "echo ' flags: +examples' >> cabal.project"
- touch cabal.project.local
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- blank-canvas | grep -vw -- blank-canvas-examples | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
- cat cabal.project || true
- cat cabal.project.local || true

# build & run tests, build benchmarks
- cabal new-build -w ${HC} ${TEST} ${BENCH} ${TARGETS}
# - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} blank-canvas:tests; fi
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
# - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi

# cabal check
- (cd blank-canvas-* && cabal check)
- (cd blank-canvas-examples-* && cabal check)
# - (cd remote-monad-* && cabal check)

# haddock
- rm -rf ./dist-newstyle
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} blank-canvas; else echo "Skipping haddock generation";fi
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi

# REGENDATA ["-o",".travis.yml","--ghc-head","--no-no-tests-no-bench","--no-unconstrained","cabal.project"]
# EOF
6 changes: 5 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
packages: .
./examples
./remote-monad

source-repository-package
type: git
location: https://github.com/ku-fpg/remote-monad
tag: 3761a8ad889e9bd06a562d36cafb182513dbb6e1
1 change: 0 additions & 1 deletion remote-monad
Submodule remote-monad deleted from 46479d

0 comments on commit 13e3e61

Please sign in to comment.