on master help sign in
Add comments to stack.yaml
a483273Michael Snoyman
.travis.yml+11−1
@@ -1,11 +1,17 @@
1+# Use new container infrastructure to enable caching
1sudo: false
2sudo: false
3+
4+# Choose a lightweight base image; we provide our own build tools.
2language: c
5language: c
3
6
7+# GHC depends on GMP. You can add other dependencies here as well.
4addons:
8addons:
5 apt:
9 apt:
6 packages:
10 packages:
7 - libgmp-dev
11 - libgmp-dev
8
12
13+# The different configurations we want to test. You could also do things like
14+# change flags or use --stack-yaml to point to a different file.
9env:
15env:
10- ARGS=""
16- ARGS=""
11- ARGS="--resolver lts-2"
17- ARGS="--resolver lts-2"
@@ -14,13 +20,17 @@ env:
14- ARGS="--resolver nightly"
20- ARGS="--resolver nightly"
15
21
16before_install:
22before_install:
17−# stack
23+# Download and unpack the stack executable
18- mkdir -p ~/.local/bin
24- mkdir -p ~/.local/bin
19- export PATH=$HOME/.local/bin:$PATH
25- export PATH=$HOME/.local/bin:$PATH
20- travis_retry curl -L https://github.com/commercialhaskell/stack/releases/download/v0.1.4.0/stack-0.1.4.0-x86_64-linux.tar.gz | tar xz -C ~/.local/bin
26- travis_retry curl -L https://github.com/commercialhaskell/stack/releases/download/v0.1.4.0/stack-0.1.4.0-x86_64-linux.tar.gz | tar xz -C ~/.local/bin
21
27
28+# This line does all of the work: installs GHC if necessary, build the library,
29+# executables, and test suites, and runs the test suites. --no-terminal works
30+# around some quirks in Travis's terminal implementation.
22script: stack $ARGS --no-terminal --install-ghc test
31script: stack $ARGS --no-terminal --install-ghc test
23
32
33+# Caching so the next build will be fast too.
24cache:
34cache:
25 directories:
35 directories:
26 - $HOME/.stack
36 - $HOME/.stack