2020-01-20 19:55:50 +03:00
|
|
|
sudo: true
|
|
|
|
language: haskell
|
2018-04-05 21:18:31 +03:00
|
|
|
|
|
|
|
git:
|
2020-01-20 19:55:50 +03:00
|
|
|
depth: 5
|
|
|
|
|
|
|
|
cabal: "2.4"
|
2018-04-05 21:18:31 +03:00
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
2020-01-20 19:55:50 +03:00
|
|
|
- "$HOME/.cabal/store"
|
|
|
|
- "$HOME/.stack"
|
|
|
|
- "$TRAVIS_BUILD_DIR/.stack-work"
|
2018-04-05 21:18:31 +03:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
|
2020-01-20 19:55:50 +03:00
|
|
|
# Cabal
|
|
|
|
- ghc: 8.4.4
|
|
|
|
- ghc: 8.6.5
|
|
|
|
|
|
|
|
# Stack
|
|
|
|
- ghc: 8.6.5
|
|
|
|
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml"
|
2018-04-05 21:18:31 +03:00
|
|
|
|
|
|
|
install:
|
2020-01-20 19:55:50 +03:00
|
|
|
- |
|
|
|
|
if [ -z "$STACK_YAML" ]; then
|
|
|
|
ghc --version
|
|
|
|
cabal --version
|
|
|
|
cabal new-update
|
2020-01-23 18:28:59 +03:00
|
|
|
cabal new-build --enable-tests --enable-benchmarks
|
2020-01-20 19:55:50 +03:00
|
|
|
else
|
|
|
|
# install stack
|
|
|
|
curl -sSL https://get.haskellstack.org/ | sh
|
|
|
|
|
|
|
|
# build project with stack
|
|
|
|
stack --version
|
|
|
|
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks
|
2018-04-05 21:18:31 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
script:
|
2020-01-20 19:55:50 +03:00
|
|
|
- |
|
|
|
|
if [ -z "$STACK_YAML" ]; then
|
2020-01-23 18:34:25 +03:00
|
|
|
echo 0
|
2020-01-23 18:28:59 +03:00
|
|
|
# cabal new-test --enable-tests
|
2020-01-20 19:55:50 +03:00
|
|
|
else
|
|
|
|
stack test --system-ghc
|
|
|
|
fi
|
2018-04-05 21:18:31 +03:00
|
|
|
|
2020-01-20 19:55:50 +03:00
|
|
|
notifications:
|
|
|
|
email: false
|