forked from haskell-foundation/foundation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
90 lines (84 loc) · 2.56 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Use new container infrastructure to enable caching
sudo: false
# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.ghc
- $HOME/.cabal
- $HOME/.stack
# The different configurations we want to test. We have BUILD=cabal which uses
# cabal-install, and BUILD=stack which uses Stack.
matrix:
include:
- env: BUILD=stack RESOLVER=ghc-8.0
language: generic
addons: { apt: { packages: [ libgmp-dev ] } }
compiler: ghc-8.0
- env: BUILD=stack RESOLVER=ghc-8.2
language: generic
compiler: ghc-8.2
addons: { apt: { packages: [ libgmp-dev ] } }
- env: BUILD=cabal
language: haskell
ghc: 7.8
- env: BUILD=stack RESOLVER=ghc-7.10
language: generic
addons: { apt: { packages: [ libgmp-dev ] } }
compiler: ghc-7.10
- env: BUILD=stack RESOLVER=ghc-8.0
os: osx
language: generic
compiler: ghc-8.0
- env: BUILD=stack RESOLVER=ghc-8.0 EXPERIMENTAL="--flag foundation:experimental"
language: generic
addons: { apt: { packages: [ libgmp-dev ] } }
compiler: ghc-8.0
allow_failures:
- env: BUILD=stack RESOLVER=ghc-8.2
language: generic
- env: BUILD=stack RESOLVER=ghc-8.0 EXPERIMENTAL="--flag foundation:experimental"
language: generic
addons: { apt: { packages: [ libgmp-dev ] } }
compiler: ghc-8.0
install:
- export PATH=$HOME/.local/bin::$HOME/.cabal/bin:$PATH
- mkdir -p ~/.local/bin
- |
case "$BUILD" in
stack)
if [ `uname` = "Darwin" ]
then
travis_retry curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
else
travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
fi
;;
cabal)
;;
esac
script:
- |
set -ex
if [ "x${RUNTEST}" = "xfalse" ]; then exit 0; fi
case "$BUILD" in
stack)
rm stack.yaml && ln -sv .travis/stack-${RESOLVER}.yaml stack.yaml
stack --no-terminal test \
--flag foundation:bounds-check ${EXPERIMENTAL} \
--install-ghc \
--coverage --bench --no-run-benchmarks \
--haddock --no-haddock-deps
;;
cabal)
cabal install --only-dependencies --enable-tests
cabal test
cabal check
cabal sdist
;;
esac
set +ex
# It doesn't seem to be working so far.
#
#after_script:
# - travis_retry curl -L https://github.com/rubik/stack-hpc-coveralls/releases/download/v0.0.3.0/shc-linux-x64-$GHCVER.tar.bz2 | tar -xj
# - ./shc foundation test-foundation