This repository was archived by the owner on May 23, 2019. It is now read-only.
forked from selectel/mongoDB-haskell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
52 lines (46 loc) · 1.67 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
# See https://github.com/hvr/multi-ghc-travis for more information.
services:
- mongodb
env:
# We use CABALVER=1.22 everywhere because it uses the flag --enable-coverage
# instead of --enable-library-coverage used by older versions.
- GHCVER=7.6.3 CABALVER=1.22
- GHCVER=7.8.4 CABALVER=1.22
- GHCVER=7.10.1 CABALVER=1.22
- GHCVER=head CABALVER=head
matrix:
allow_failures:
# The text here should match the last line above exactly.
- 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=$HOME/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
- cabal --version
install:
- travis_retry cabal update
# Install the combined dependencies for this package and all other packages
# needed to reduce conflicts.
- cabal install --only-dependencies --enable-tests . hpc-coveralls
- cabal install hpc-coveralls
script:
- cabal configure --enable-tests --enable-coverage -v2
- cabal build
# cabal test fails due a to hpc error. Using run-cabal-test instead.
# - cabal test --show-details=always
- run-cabal-test --show-details=always
# Ignoring the exit code here. Need to register with coveralls.io?
- hpc-coveralls --exclude-dir=test test || true
# Ignoring the exit code here. cabal check recommends against
# 'ghc-prof-options: -auto-all'.
- cabal check || true
- cabal sdist
- export SRC_TGZ=$(cabal 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