@@ -1,5 +1,5 @@
1−# For more information, see https://github.com/hvr/multi-ghc-travis
1+# For more information, see https://github.com/ChrisPenner/haskell-stack-travis-ci
2−language: c
2+language: nix
@@ -7,52 +7,51 @@ git:
9 directories:
9 directories:
10− - $HOME/.cabal/packages
10+ - $HOME/.ghc
11− - $HOME/.cabal/store
11+ - $HOME/.cabal
13−before_cache:
13+ - .stack-work
14− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
15− # remove files that are regenerated by 'cabal update'
16− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*
17− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
18− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache
19− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
20− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
24− #- compiler: "ghc-7.8.4"
18+ - env: GHCVER=7.10.3 CACHE_NAME=7.10.3
25− # env: TEST=--disable-tests BENCH=--disable-benchmarks
19+ compiler: ": #stack 7.10.3"
26− # addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.4], sources: [hvr-ghc]}}
27− - compiler: "ghc-7.10.3"
28− # env: TEST=--disable-tests BENCH=--disable-benchmarks
29− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.3], sources: [hvr-ghc]}}
30− - compiler: "ghc-8.0.2"
31− # env: TEST=--disable-tests BENCH=--disable-benchmarks
32− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}}
20+ addons: {apt: {packages: [ghc-7.10.3], sources: [hvr-ghc]}}
33− #- compiler: "ghc-8.2.1"
34− # env: TEST=--disable-tests BENCH=--disable-benchmarks
35− # addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.1], sources: [hvr-ghc]}}
40− - PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH
42−install:
22+ - env: GHCVER=8.0.2 CACHE_NAME=8.0.2
43− - cabal --version
23+ compiler: ": #stack 8.0.2"
44− - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
24+ addons: {apt: {packages: [ghc-8.0.2], sources: [hvr-ghc]}}
45− - travis_retry cabal update -v
46− - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
48− - cabal new-build -w ${HC} --enable-tests --dep -j2 all
26+ - env: GHCVER=8.2.1 CACHE_NAME=8.2.1 BUILD_BINARY=1
27+ compiler: ": #stack 8.2.1"
28+ addons: {apt: {packages: [ghc-8.2.1], sources: [hvr-ghc]}}
30+ - env: GHCVER=8.2.1 CACHE_NAME=8.2.1-osx BUILD_BINARY=1
32+ compiler: ": #stack 8.2.1"
33+ addons: {apt: {packages: [ghc-8.2.1], sources: [hvr-ghc]}}
37+ - export PATH=$HOME/.local/bin:/opt/ghc/$GHCVER/bin:$PATH
38+ - ./.travis/install-ghr.sh
39+ - ./.travis/install-stack.sh
50# Here starts the actual work to be performed for the package under test;
41# Here starts the actual work to be performed for the package under test;
51# any command which exits with a non-zero exit code causes the build to fail.
42# any command which exits with a non-zero exit code causes the build to fail.
53− - cabal sdist
44+ - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
54− - cabal new-build -w ${HC} -j1
45+ - GHC_OPTIONS=""
55− - cabal new-test -w ${HC}
46+ - |
56− - curl -sL https://raw.github.com/ndmitchell/hlint/master/misc/travis.sh | sh -s lint src test examples --cpp-define VERSION_project_m36=HLINT
47+ set -ex
57− - cabal new-haddock
48+ # Run tests
49+ stack --no-terminal test --ghc-options="$GHC_OPTIONS"
54+ # Build and ship binary
55+ ./.travis/attach-binary.sh