1 # NB: don't set `language: haskell` here
4 # See also https://github.com/hvr/multi-ghc-travis for more information
6 # The following lines enable several GHC versions and/or HP versions
7 # to be tested; often it's enough to test only against the last
8 # release of a major GHC version. Setting HPVER implictly sets
9 # GHCVER. Omit lines with versions you don't need/want testing for.
11 - CABALVER=1.22 GHCVER=7.10.1
13 # Note: the distinction between `before_install` and `install` is not
16 - travis_retry sudo add-apt-repository -y ppa:hvr/ghc
17 - travis_retry sudo apt-get update
18 - travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER
19 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
23 - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
24 - travis_retry cabal update
25 - cabal install --only-dependencies --enable-tests --enable-benchmarks
27 # Here starts the actual work to be performed for the package under
28 # test; any command which exits with a non-zero exit code causes the
31 # -v2 provides useful information for debugging
32 - cabal configure --enable-tests --enable-benchmarks -v2
34 # this builds all libraries and executables
35 # (including tests/benchmarks)
38 - cabal test --show-details=streaming
41 # tests that a source-distribution can be generated
44 # check that the generated source-distribution can be built & installed
45 - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
46 (cd dist && cabal install --force-reinstalls "$SRC_TGZ")