41 lines
1.4 KiB
YAML
41 lines
1.4 KiB
YAML
# Use new container infrastructure to enable caching
|
|
sudo: false
|
|
|
|
# Choose a lightweight base image; we provide our own build tools.
|
|
language: c
|
|
|
|
# GHC depends on GMP. You can add other dependencies here as well.
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- libgmp-dev
|
|
|
|
# The different configurations we want to test. You could also do things like
|
|
# change flags or use --stack-yaml to point to a different file.
|
|
env:
|
|
- ARGS=""
|
|
#- ARGS="--resolver lts-2"
|
|
#- ARGS="--resolver lts-3"
|
|
#- 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://github.com/commercialhaskell/stack/releases/download/v0.1.6.0/stack-0.1.6.0-linux-x86_64.tar.gz | tar xz --strip-components=1 -C ~/.local/bin stack-0.1.6.0-linux-x86_64/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:
|
|
# Avoid running out of memory on Travis
|
|
- stack $ARGS --no-terminal --install-ghc build haskell-src-exts
|
|
- stack $ARGS --no-terminal --install-ghc install hscolour
|
|
- stack $ARGS --no-terminal --install-ghc test --haddock --no-haddock-deps # --pedantic
|
|
|
|
# Caching so the next build will be fast too.
|
|
cache:
|
|
directories:
|
|
- $HOME/.stack
|