Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (45 sloc) 1.8 KB
# 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.
- libgmp-dev
- ARGS=""
- ARGS="--resolver lts-2"
- ARGS="--resolver lts-3"
- ARGS="--resolver lts-4"
- ARGS="--resolver lts-5"
- ARGS="--resolver lts"
- ARGS="--resolver nightly"
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L | 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.
# `--solver` needs `cabal` on the PATH
- ./ stack $ARGS --no-terminal --install-ghc setup
- ./ 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`
- ./ 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
- ./ stack $ARGS --no-terminal --install-ghc test
# build the docs
- ./ stack $ARGS --no-terminal --install-ghc install hscolour
- ./ stack $ARGS --no-terminal --install-ghc haddock --no-haddock-deps
# build and run the benchmarks
- ./ stack $ARGS --no-terminal --install-ghc build :benchmarks
# Caching so the next build will be fast.
- $HOME/.stack