-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy path.travis.yml
40 lines (34 loc) · 1.28 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
language: haskell
env:
- GHCVER=7.4.1
- GHCVER=7.4.2
- GHCVER=7.6.1
- GHCVER=7.6.2
- GHCVER=7.6.3
- GHCVER=7.8.1
- GHCVER=7.8.2
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-1.18 ghc-$GHCVER ghc-$GHCVER-prof ghc-$GHCVER-dyn happy
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.18/bin:$PATH
install:
- sudo /opt/ghc/$GHCVER/bin/ghc-pkg recache
- /opt/ghc/$GHCVER/bin/ghc-pkg recache --user
- cabal update
- cabal install --only-dependencies --enable-tests --enable-benchmarks
script:
- cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
- cabal build # this builds all libraries and executables (including tests/benchmarks)
- cabal test
#- cabal check # leave this out for now as it gives warnings about the use of -Werror and -O2
- cabal sdist # tests that a source-distribution can be generated
# The following scriptlet checks that the resulting source distribution can be built & installed
- export SRC_TGZ=$(cabal-1.18 info . | awk '{print $2 ".tar.gz";exit}') ;
cd dist/;
if [ -f "$SRC_TGZ" ]; then
cabal install "$SRC_TGZ";
else
echo "expected '$SRC_TGZ' not found";
exit 1;
fi