Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
81 lines (65 sloc) 2.27 KB
# https://docs.haskellstack.org/en/stable/GUIDE/#travis-with-caching
# Use new container infrastructure to enable caching
sudo: false
# Choose a lightweight base image; we provide our own build tools.
language: c
# Caching so the next build will be fast too.
cache:
directories: [$HOME/.stack]
# We set the compiler values here to tell Travis to use a different
# cache file per set of arguments.
#
# If you need to have different apt packages for each combination in the
# matrix, you can use a line such as:
# addons: {apt: {packages: [libfcgi-dev,libgmp-dev]}}
matrix:
include:
# We can pass in arbitrary Stack arguments via the ARGS variable,
# such as using --stack-yaml to point to a different file.
- env: ARGS=""
compiler: "stack default"
addons: {apt: {packages: [ghc-8.0.1], sources: [hvr-ghc]}}
- env: ARGS="--resolver lts-6"
compiler: "stack 7.10.3"
addons: {apt: {packages: [ghc-7.10.3], sources: [hvr-ghc]}}
# Nightly builds are allowed to fail
- env: ARGS="--resolver nightly"
compiler: "stack nightly"
addons: {apt: {packages: [libgmp-dev]}}
# Build on OS X in addition to Linux
- env: ARGS=""
compiler: "stack default osx"
os: osx
- env: ARGS="--resolver lts-6"
compiler: "stack 7.10.3 osx"
os: osx
- env: ARGS="--resolver nightly"
compiler: "stack nightly osx"
os: osx
allow_failures:
- env: ARGS="--resolver nightly"
before_install:
# Using compiler above sets CC to an invalid value, so unset it
- unset CC
# Download and unpack the stack executable
- export PATH=$HOME/.local/bin:$PATH
- mkdir -p ~/.local/bin
- |
if [ `uname` = "Darwin" ]
then
travis_retry curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
else
travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
fi
install:
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- if [ -f configure.ac ]; then autoreconf -i; fi
- |
set -ex
stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies
set +ex
script:
- |
set -ex
stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps
set +ex