forked from haskell/directory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
53 lines (48 loc) · 1.54 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# we want to use our custom environment, but the Travis YAML validator
# requires this field to be specified, so we'll just use 'c'
language: c
env:
# we have to use CABALVER=1.16 for GHC<7.6 as well, as there's
# no package for earlier cabal versions in the PPA
- GHCVER=7.4.1 CABALVER=1.16
- GHCVER=7.4.2 CABALVER=1.16
- GHCVER=7.6.3 CABALVER=1.16
- GHCVER=7.8.3 CABALVER=1.18
- GHCVER=head CABALVER=head
matrix:
allow_failures:
- env: GHCVER=head CABALVER=head
before_install:
- 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
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
- cabal --version
install:
- travis_retry cabal update
- cabal install --enable-tests --only-dependencies
- ghc --version
before_script:
- | # check if 'streaming' is supported (didn't exist until 1.20)
if cabal 2>&1 test --show-details=streaming __dummy |
grep >/dev/null 2>&1 "cabal: --show-details flag expects"
then streaming=always
else streaming=streaming
fi
export streaming
script:
- autoreconf -i
- cabal configure -v2 --enable-tests
- cabal build
- cabal check
- cabal sdist
- cabal test --show-details=$streaming
- | # in the future, use '--run-tests' (didn't exist until 1.20)
cabal install --force-reinstalls dist/*-*.tar.gz
mkdir install-tmp
cd install-tmp
tar xzf ../dist/*-*.tar.gz
cd *-*
cabal configure --enable-tests
cabal build
cabal test