@@ -1,36 +1,41 @@
1# See https://github.com/hvr/multi-ghc-travis
1# See https://github.com/hvr/multi-ghc-travis
2# The following enables several GHC versions to be tested; often it's enough to test only against the last release in a major GHC version. Feel free to omit lines listings versions you don't need/want testing for.
2# The following enables several GHC versions to be tested; often it's enough to test only against the last release in a major GHC version. Feel free to omit lines listings versions you don't need/want testing for.
4− - GHCVER=7.6.2
4+ - GHCVER=7.6.2 CABALVER=1.16
5− - GHCVER=7.6.3
5+ - GHCVER=7.6.3 CABALVER=1.16
6− - GHCVER=7.8.2
6+ - GHCVER=7.8.2 CABALVER=1.18
7− - GHCVER=7.8.3
7+ - GHCVER=7.8.3 CABALVER=1.18
8− - GHCVER=head # see section about GHC HEAD snapshots
8+ - GHCVER=head CABALVER=1.20
12+ - env: GHCVER=head CABALVER=1.20
10−# Note: the distinction between `before_install` and `install` is not important.
11before_install:
14before_install:
12− - sudo add-apt-repository -y ppa:hvr/ghc
15+ - travis_retry sudo add-apt-repository -y ppa:hvr/ghc
13− - sudo apt-get update
16+ - travis_retry sudo apt-get update
14− - sudo apt-get install cabal-install-1.18 ghc-$GHCVER
17+ - travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER
15− - export PATH=/opt/ghc/$GHCVER/bin:$PATH
18+ - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
18− - cabal-1.18 update
22+ - travis_retry cabal update
19− - cabal-1.18 install --only-dependencies --enable-tests --enable-benchmarks
21−# 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.
23− - cabal-1.18 configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
25+ - cabal configure --enable-tests -v2
24− - cabal-1.18 build # this builds all libraries and executables (including tests/benchmarks)
26+ - cabal build
27+ # --show-details=streaming is available for CABALVER>=1.20 only
28+ - if [ "$(echo -e "1.20\n$CABALVER" | sort -rV | head -n1)" = "$CABALVER" ]; then
29+ cabal test --show-details=streaming;
25− - cabal-1.18 test
31+ cabal test --show-details=always;
26− - cabal-1.18 check
33+ - cabal sdist
27− - cabal-1.18 sdist # tests that a source-distribution can be generated
34+ # "cabal check" disabled due to -O2 warning
29−# The following scriptlet checks that the resulting source distribution can be built & installed
30− - export SRC_TGZ=$(cabal-1.18 info . | awk '{print $2 ".tar.gz";exit}') ;
35+ - export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;
32 if [ -f "$SRC_TGZ" ]; then
37 if [ -f "$SRC_TGZ" ]; then
33− cabal-1.18 install "$SRC_TGZ";
38+ cabal install "$SRC_TGZ";
35 echo "expected '$SRC_TGZ' not found";
40 echo "expected '$SRC_TGZ' not found";