-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
58 lines (47 loc) · 1.49 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
# Use new container infrastructure to enable caching
sudo: false
# Choose a lightweight base image; we provide our own build tools.
language: node_js
# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.ghc
- $HOME/.cabal
- $HOME/.stack
addons:
apt:
packages:
- ghc-8.0.2
- libgmp-dev
sources:
- hvr-ghc
# Use the latest version of node-6 available
node_js: "6"
before_install:
# Using compiler above sets CC to an invalid value, so unset it
- unset CC
# 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
- |
travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
# 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:
- if [ -f configure.ac ]; then autoreconf -i; fi
- |
set -ex
time stack --no-terminal --install-ghc test --bench --only-dependencies
set +ex
script:
- |
set -ex
time travis_wait 30 stack --no-terminal test --bench --no-run-benchmarks --haddock --no-haddock-deps
time stack exec -- site build
set +ex