@@ -1,4 +1,4 @@
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
@@ -7,52 +7,48 @@ 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"
17+ - env: CACHE_NAME=7.10.3 STACK_YAML=stack.ghc7.10.yaml
25− # env: TEST=--disable-tests BENCH=--disable-benchmarks
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"
18+ compiler: ": #stack 7.10.3"
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]}}
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:
20+ - env: CACHE_NAME=8.0.2 STACK_YAML=stack.yaml
43− - cabal --version
21+ compiler: ": #stack 8.0.2"
44− - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
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
23+ - env: CACHE_NAME=osx-7.10.3 STACK_YAML=stack.ghc7.10.yaml
25+ compiler: ": #stack 7.10.3"
27+ - env: CACHE_NAME=osx-8.0.2 STACK_YAML=stack.yaml
29+ compiler: ": #stack 8.0.2"
33+ - export PATH=$HOME/.local/bin:$PATH
34+ - ./.travis/install-ghr.sh
35+ - ./.travis/install-stack.sh
36+ - travis_wait travis_retry stack setup
37+ - travis_retry stack build --only-dependencies
50# Here starts the actual work to be performed for the package under test;
39# 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.
40# any command which exits with a non-zero exit code causes the build to fail.
53− - cabal sdist
42+ - GHC_OPTIONS=""
54− - cabal new-build -w ${HC} -j1
43+ - |
55− - cabal new-test -w ${HC}
44+ set -ex
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
45+ # Run tests
57− - cabal new-haddock
46+ stack --no-terminal test --ghc-options="$GHC_OPTIONS"
51+ # Build and ship binary
52+ ./.travis/attach-binary.sh