@@ -1,11 +1,17 @@
1+# Use new container infrastructure to enable caching
4+# Choose a lightweight base image; we provide our own build tools.
7+# GHC depends on GMP. You can add other dependencies here as well.
7 - libgmp-dev
11 - libgmp-dev
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.
11- ARGS="--resolver lts-2"
17- ARGS="--resolver lts-2"
@@ -14,13 +20,17 @@ env:
14- ARGS="--resolver nightly"
20- ARGS="--resolver nightly"
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
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
33+# Caching so the next build will be fast too.
25 directories:
35 directories:
26 - $HOME/.stack
36 - $HOME/.stack