-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
49 lines (42 loc) · 1.4 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
# from https://github.com/hvr/multi-ghc-travis
# explicitly request container-based infrastructure
sudo: false
env:
- GHCVER=7.8.4 # see note about Alex/Happy
- GHCVER=7.10.3
addons:
apt:
sources:
- hvr-ghc
packages:
- ghc-7.8.4
- ghc-7.10.3
- cabal-install-1.22
- libgsl0-dev
- liblapack-dev
- freeglut3-dev
before_install:
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.22/bin:$PATH
install:
- cabal update
- cd not-gloss
- travis_retry cabal install --only-dependencies --enable-tests --enable-benchmarks
# 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.
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
- 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.22 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
- cd ../../not-gloss-examples
- travis_retry cabal install --only-dependencies
- cabal build