.travis.yml 1.08 KB
Newer Older
1
env:
Herbert Valerio Riedel's avatar
Herbert Valerio Riedel committed
2
3
4
5
6
7
8
9
10
11
12
13
14
 - CABALVER=1.16 GHCVER=7.4.1
 - CABALVER=1.16 GHCVER=7.4.2
 - CABALVER=1.16 GHCVER=7.6.1
 - CABALVER=1.16 GHCVER=7.6.2
 - CABALVER=1.16 GHCVER=7.6.3
 - CABALVER=1.18 GHCVER=7.8.1
 - CABALVER=1.18 GHCVER=7.8.2
 - CABALVER=1.18 GHCVER=7.8.3
 - CABALVER=head GHCVER=head

matrix:
  allow_failures:
   - env: CABALVER=head GHCVER=head
15
16

before_install:
Herbert Valerio Riedel's avatar
Herbert Valerio Riedel committed
17
18
19
20
 - travis_retry sudo add-apt-repository -y ppa:hvr/ghc
 - travis_retry sudo apt-get update
 - travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER autoconf
 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
21
22

install:
Herbert Valerio Riedel's avatar
Herbert Valerio Riedel committed
23
24
25
 - cabal --version
 - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
 - travis_retry cabal update
26
27
28

script:
 - autoreconf -i
Herbert Valerio Riedel's avatar
Herbert Valerio Riedel committed
29
30
 - cabal configure -v2
 - cabal build
Herbert Valerio Riedel's avatar
Herbert Valerio Riedel committed
31
 - cabal check || [ "$CABALVER" == "1.16" ]
Herbert Valerio Riedel's avatar
Herbert Valerio Riedel committed
32
33
 - cabal sdist
 - export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;
34
35
   cd dist/;
   if [ -f "$SRC_TGZ" ]; then
Herbert Valerio Riedel's avatar
Herbert Valerio Riedel committed
36
      cabal install --force-reinstalls "$SRC_TGZ";
37
38
39
   else
      echo "expected '$SRC_TGZ' not found";
      exit 1;
Herbert Valerio Riedel's avatar
Herbert Valerio Riedel committed
40
   fi