git.iko.soy/typeable/mandrill
on master help sign in
Use cabalver
commitee029133e991544e3c80616b2d3c7c84f209702f authorAlfredo Di Napoli <alfredo.dinapoli@gmail.com> dateFri 15 Aug 2014, 18:57 (12 years ago) parent2a9a53e
1 file changed+27−22
.travis.yml+27−22
.travis.yml+27−22
@@ -1,36 +1,41 @@
11# See https://github.com/hvr/multi-ghc-travis
22# 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.
33env:
4− - GHCVER=7.6.2
5− - GHCVER=7.6.3
6− - GHCVER=7.8.2
7− - GHCVER=7.8.3
8− - GHCVER=head # see section about GHC HEAD snapshots
4+ - GHCVER=7.6.2 CABALVER=1.16
5+ - GHCVER=7.6.3 CABALVER=1.16
6+ - GHCVER=7.8.2 CABALVER=1.18
7+ - GHCVER=7.8.3 CABALVER=1.18
8+ - GHCVER=head CABALVER=1.20
9+
10+matrix:
11+ allow_failures:
12+ - env: GHCVER=head CABALVER=1.20
913
10−# Note: the distinction between `before_install` and `install` is not important.
1114before_install:
12− - sudo add-apt-repository -y ppa:hvr/ghc
13− - sudo apt-get update
14− - sudo apt-get install cabal-install-1.18 ghc-$GHCVER
15− - export PATH=/opt/ghc/$GHCVER/bin:$PATH
15+ - travis_retry sudo add-apt-repository -y ppa:hvr/ghc
16+ - travis_retry sudo apt-get update
17+ - travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER
18+ - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
19+ - cabal --version
1620
1721install:
18− - cabal-1.18 update
19− - cabal-1.18 install --only-dependencies --enable-tests --enable-benchmarks
22+ - travis_retry cabal update
2023
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.
2224script:
23− - cabal-1.18 configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
24− - cabal-1.18 build # this builds all libraries and executables (including tests/benchmarks)
25− - cabal-1.18 test
26− - cabal-1.18 check
27− - cabal-1.18 sdist # tests that a source-distribution can be generated
28−
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}') ;
25+ - cabal configure --enable-tests -v2
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;
30+ else
31+ cabal test --show-details=always;
32+ fi
33+ - cabal sdist
34+ # "cabal check" disabled due to -O2 warning
35+ - export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;
3136 cd dist/;
3237 if [ -f "$SRC_TGZ" ]; then
33− cabal-1.18 install "$SRC_TGZ";
38+ cabal install "$SRC_TGZ";
3439 else
3540 echo "expected '$SRC_TGZ' not found";
3641 exit 1;