-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
51 lines (45 loc) · 1.8 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
# Use new container infrastructure to enable caching
sudo: false
# Choose a lightweight base image; we provide our own build tools.
# NB: don't set `language: haskell` here
language: c
# GHC depends on GMP. You can add other dependencies here as well.
addons:
apt:
packages:
- libgmp-dev
env:
- ARGS=""
- ARGS="--resolver lts-2"
- ARGS="--resolver lts-3"
- ARGS="--resolver lts-4"
- ARGS="--resolver lts-5"
- ARGS="--resolver lts"
- ARGS="--resolver nightly"
before_install:
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
# This line does all of the work: installs GHC if necessary, build the library,
# executables, and test suites, and runs the test suites. --no-terminal works
# around some quirks in Travis's terminal implementation.
script:
# `--solver` needs `cabal` on the PATH
- ./.travis_long.sh stack $ARGS --no-terminal --install-ghc setup
- ./.travis_long.sh stack $ARGS --no-terminal --install-ghc install cabal-install
# `--force` so it overwrites stack.yaml after the first run, `--solver` so it picks `extra-deps`
- ./.travis_long.sh stack $ARGS --no-terminal --install-ghc init --force --solver
# for debug purpose, know what's going on
- cat stack.yaml
# build and run the test
- ./.travis_long.sh stack $ARGS --no-terminal --install-ghc test
# build the docs
- ./.travis_long.sh stack $ARGS --no-terminal --install-ghc install hscolour
- ./.travis_long.sh stack $ARGS --no-terminal --install-ghc haddock --no-haddock-deps
# build and run the benchmarks
- ./.travis_long.sh stack $ARGS --no-terminal --install-ghc build :benchmarks
# Caching so the next build will be fast.
cache:
directories:
- $HOME/.stack