-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
119 lines (97 loc) · 3.46 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Travis-CI configuration file. Based on Stack example configuration. For Stack documentation, see
# https://docs.haskellstack.org/en/stable/travis_ci/
# Use new container infrastructure to enable caching
sudo: false
# Do not choose a language; we provide our own build tools.
language: generic
# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.ghc
- $HOME/.cabal
- $HOME/.stack
# We set the compiler values here to tell Travis to use a different
# cache file per set of arguments.
matrix:
include:
- env: ARGS="" TESTARGS="--coverage --haddock"
compiler: "default"
addons: {apt: {packages: [libgmp-dev, swi-prolog]}}
- env: ARGS="--resolver lts-2"
compiler: "7.8.4"
addons: {apt: {packages: [libgmp-dev, swi-prolog]}}
- env: ARGS="--resolver lts-3" TESTARGS=""
compiler: "7.10.2"
addons: {apt: {packages: [libgmp-dev, swi-prolog]}}
- env: ARGS="--resolver lts-6" TESTARGS=""
compiler: "7.10.3"
addons: {apt: {packages: [libgmp-dev, swi-prolog]}}
- env: ARGS="--resolver lts-7" TESTARGS="--haddock"
compiler: "8.0.1"
addons: {apt: {packages: [libgmp-dev, swi-prolog]}}
- env: ARGS="--resolver lts-8" TESTARGS="--haddock"
compiler: "8.0.2"
addons: {apt: {packages: [libgmp-dev, swi-prolog]}}
# Build on macOS in addition to Linux
- env: ARGS="" TESTARGS="--haddock"
compiler: "default osx"
os: osx
- env: ARGS="--resolver lts-3" TESTARGS=""
compiler: "7.10.2 osx"
os: osx
- env: ARGS="--resolver lts-6" TESTARGS=""
compiler: "7.10.3 osx"
os: osx
- env: ARGS="--resolver lts-7" TESTARGS="--haddock"
compiler: "8.0.1 osx"
os: osx
- env: ARGS="--resolver lts-8" TESTARGS="--haddock"
compiler: "8.0.2 osx"
os: osx
before_install:
# Using compiler above sets CC to an invalid value, so unset it
- unset CC
# We need prolog to run the benchmarks
- |
if [ `uname` = "Darwin" ]
then
brew update
brew install swi-prolog
fi
# Download and unpack the stack executable
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.local/bin:/opt/alex/$ALEXVER/bin:/opt/happy/$HAPPYVER/bin:$HOME/.cabal/bin:$PATH
- mkdir -p ~/.local/bin
- |
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
# Use the more reliable S3 mirror of Hackage
mkdir -p $HOME/.cabal
echo 'remote-repo: hackage.haskell.org:http://hackage.fpcomplete.com/' > $HOME/.cabal/config
echo 'remote-repo-cache: $HOME/.cabal/packages' >> $HOME/.cabal/config
if [ "$CABALVER" != "1.16" ]
then
echo 'jobs: $ncpus' >> $HOME/.cabal/config
fi
install:
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- if [ -f configure.ac ]; then autoreconf -i; fi
- |
set -ex
stack --no-terminal --install-ghc $ARGS test $TESTARGS --bench --only-dependencies
set +ex
script:
- |
set -ex
stack --no-terminal $ARGS test $TESTARGS --bench --no-run-benchmarks --no-haddock-deps hspl
stack --no-terminal -j1 --dump-logs $ARGS bench
set +ex
after_success:
- |
if echo "$TESTARGS" | grep -- --coverage; then
travis_retry curl -L https://github.com/rubik/stack-hpc-coveralls/releases/download/v0.0.4.0/shc-linux-x64-8.0.1.tar.bz2 | tar -xj
./shc hspl hspl-test
fi