mirror of
https://github.com/barrucadu/dejafu.git
synced 2024-11-23 14:14:36 +03:00
75 lines
2.3 KiB
YAML
75 lines
2.3 KiB
YAML
# Set-up
|
|
sudo: false
|
|
|
|
language: c
|
|
|
|
# If something is tagged, it's come from a PR which has been merged
|
|
# into master. There's no need to build both the tag and the merge
|
|
# commit.
|
|
if: tag IS blank
|
|
|
|
# Cache builds
|
|
cache:
|
|
directories:
|
|
- $HOME/.ghc
|
|
- $HOME/.cabal
|
|
- $HOME/.stack
|
|
|
|
# Goal: support latest 3 GHC major versions.
|
|
matrix:
|
|
fast_finish: true
|
|
include:
|
|
- env: MODE=test RESOLVER=lts-9.0 # GHC 8.0
|
|
addons: {apt: {packages: [libgmp-dev]}}
|
|
- env: MODE=test RESOLVER=lts-10.0 # GHC 8.2
|
|
addons: {apt: {packages: [libgmp-dev]}}
|
|
- env: MODE=test RESOLVER=nightly-2018-03-23 # GHC 8.4
|
|
addons: {apt: {packages: [libgmp-dev]}}
|
|
- env: MODE=test RESOLVER=nightly
|
|
addons: {apt: {packages: [libgmp-dev]}}
|
|
- env: MODE=doctest
|
|
addons: {apt: {packages: [libgmp-dev]}}
|
|
- env: MODE=style
|
|
addons: {apt: {packages: [libgmp-dev]}}
|
|
allow_failures:
|
|
- env: MODE=test RESOLVER=nightly
|
|
|
|
# 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'
|
|
- if [[ ! -z "$RESOLVER" ]]; then if [[ -e ".travis/$RESOLVER.yaml" ]]; then mv .travis/$RESOLVER.yaml stack.yaml; else stack init --resolver=$RESOLVER --force; fi; fi
|
|
- stack --no-terminal setup
|
|
- if [[ "$MODE" == "style" ]]; then stack --no-terminal install stylish-haskell; fi
|
|
- if [[ "$MODE" == "doctest" ]]; then stack --no-terminal install doctest; fi
|
|
|
|
# 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 .
|
|
stack exec ./style.sh
|
|
git diff --exit-code
|
|
;;
|
|
test)
|
|
cd dejafu-tests
|
|
stack exec -- dejafu-tests +RTS -s
|
|
;;
|
|
doctest)
|
|
stack exec -- bash -c "DEJAFU_DOCTEST=y doctest dejafu/Test"
|
|
;;
|
|
esac
|
|
set +ex
|
|
echo -en 'travis_fold:end:script.test\\r'
|