dejafu/.travis.yml

64 lines
1.9 KiB
YAML
Raw Normal View History

2016-05-03 21:17:06 +03:00
# Set-up
sudo: false
language: c
# Cache builds
cache:
directories:
- $HOME/.ghc
- $HOME/.cabal
- $HOME/.stack
# Goal: support latest 3 GHC major versions.
2016-05-03 21:17:06 +03:00
matrix:
2017-08-07 23:56:31 +03:00
fast_finish: true
2016-05-03 21:17:06 +03:00
include:
- env: MODE=test RESOLVER=lts-6 # GHC 7.10
2016-10-22 18:02:31 +03:00
addons: {apt: {packages: [libgmp-dev]}}
- env: MODE=test RESOLVER=lts-9 # GHC 8.0
addons: {apt: {packages: [libgmp-dev]}}
2017-12-23 06:08:47 +03:00
- env: MODE=test RESOLVER=lts-10 # GHC 8.2
addons: {apt: {packages: [libgmp-dev]}}
- env: MODE=test RESOLVER=nightly
addons: {apt: {packages: [libgmp-dev]}}
2017-12-23 16:05:34 +03:00
- env: MODE=style RESOLVER=lts-10
2016-05-03 21:17:06 +03:00
addons: {apt: {packages: [libgmp-dev]}}
2017-08-07 23:56:31 +03:00
allow_failures:
- env: MODE=test RESOLVER=nightly
2016-05-03 21:17:06 +03:00
# Download and unpack the stack executable
before_install:
- export PATH=/opt/ghc/$GHCVER/bin:$HOME/.local/bin:$PATH
- mkdir -p ~/.local/bin
- curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
2017-10-20 16:29:53 +03:00
- rm stack.yaml
- if [[ -e .travis/$RESOLVER.yaml ]]; then mv .travis/$RESOLVER.yaml stack.yaml; else stack init --resolver=$RESOLVER; fi
- stack --no-terminal setup
- if [[ "$MODE" == "style" ]]; then stack --no-terminal install stylish-haskell; fi
2016-05-03 21:17:06 +03:00
# Run tests
script:
- stack --no-terminal build concurrency
- stack --no-terminal build dejafu
- stack --no-terminal build hunit-dejafu
- stack --no-terminal build tasty-dejafu
- stack --no-terminal build dejafu-tests
- |
echo -en 'travis_fold:start:script.test\\r'
set -ex
case "$MODE" in
style)
curl -sL https://raw.github.com/ndmitchell/weeder/master/misc/travis.sh | sh -s .
curl -sL https://raw.github.com/ndmitchell/hlint/master/misc/travis.sh | sh -s concurrency dejafu hunit-dejafu tasty-dejafu
stack exec ./style.sh
git diff --exit-code concurrency dejafu hunit-dejafu tasty-dejafu
;;
test)
stack exec -- dejafu-tests --plain
;;
esac
set +ex
echo -en 'travis_fold:end:script.test\\r'