1 # NB: don't set `language: haskell` here
4 # See also https://github.com/hvr/multi-ghc-travis for more information
6 # explicitly request container-based infrastructure
9 # The following lines enable several GHC versions and/or HP versions
10 # to be tested; often it's enough to test only against the last
11 # release of a major GHC version. Setting HPVER implictly sets
12 # GHCVER. Omit lines with versions you don't need/want testing for.
15 - env: CABALVER=1.18 GHCVER=7.8.4
16 addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}}
17 - env: CABALVER=1.22 GHCVER=7.10.1
18 addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.1],sources: [hvr-ghc]}}
19 - env: CABALVER=head GHCVER=head
20 addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
23 - env: CABALVER=head GHCVER=head
26 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
30 - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
31 - travis_retry cabal update
32 - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config # The container environment reports 16 cores
33 - cabal install hpc-coveralls
34 - cabal install --only-dependencies
36 # Here starts the actual work to be performed for the package under
37 # test; any command which exits with a non-zero exit code causes the
40 # -v2 provides useful information for debugging
41 - cabal configure --enable-tests --enable-benchmarks --enable-coverage -v2
43 # this builds all libraries and executables
44 # (including tests/benchmarks)
47 - run-cabal-test --show-details=streaming
50 # tests that a source-distribution can be generated
53 # check that the generated source-distribution can be built & installed
54 - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
55 (cd dist && cabal install --force-reinstalls "$SRC_TGZ")