forked from killy971/hpc-coveralls
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
61 lines (56 loc) · 1.9 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
54
55
56
57
58
59
60
61
env:
# - CABALVER=1.20 GHCVER=7.6.3
- CABALVER=1.22 GHCVER=7.8.3
- CABALVER=1.22 GHCVER=7.8.4
- CABALVER=1.22 GHCVER=7.10.1
- CABALVER=1.22 GHCVER=7.10.2
- CABALVER=1.22 GHCVER=7.10.3
- CABALVER=1.22 GHCVER=7.10.3 CABALCONFIG=retry-0.5.cabal.config
- CABALVER=1.22 GHCVER=7.10.3 CABALCONFIG=retry-0.6.cabal.config
- CABALVER=1.24 GHCVER=8.0.2
- CABALVER=2.0 GHCVER=8.2.1
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 happy
- export PATH=/opt/cabal/$CABALVER/bin:/opt/ghc/$GHCVER/bin:$PATH
- if [ -n "$CABALCONFIG" ]; then cp $CABALCONFIG cabal.config; fi
install:
- cabal update
- travis_retry sudo apt-get -q -y install hlint || cabal install hlint
- cabal install --only-dependencies --enable-tests --enable-benchmarks
script:
- hlint . --ignore="Parse error"
- |
if [ $CABALVER = "1.20" ]; then
cabal configure --enable-tests --enable-benchmarks --enable-library-coverage -v2
else
cabal configure --enable-tests --enable-benchmarks --enable-coverage -v2
fi
- cabal build
- |
if [ $GHCVER = "7.6.3" ]; then
dist/build/run-cabal-test/run-cabal-test --cabal-name=cabal --show-details=always
else
cabal test --show-details=always
fi
- cabal check
- cabal sdist
- export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;
(cd dist/;
if [ -f "$SRC_TGZ" ]; then
cabal install "$SRC_TGZ";
curl --upload-file "$SRC_TGZ" https://transfer.sh/hpc-coveralls.tar.gz;
else
echo "expected '$SRC_TGZ' not found";
exit 1;
fi)
after_script:
- dist/build/hpc-coveralls/hpc-coveralls test-all --exclude-dir=test --display-report
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/19a86836a14769ac4b51
on_success: change
on_failure: always
on_start: false