Permalink
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.
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