forked from commercialhaskell/path
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (55 loc) · 1.88 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
language: c
sudo: false
cache:
directories:
- ~/.cabal/packages
- ~/.cabal/store
- ~/.stack
addons:
apt:
packages:
- libgmp-dev
matrix:
include:
- env: TYPE=cabal CABALVER=2.2 GHCVER=7.8.4
addons: {apt: {packages: [cabal-install-2.2,ghc-7.8.4], sources: [hvr-ghc]}}
- env: TYPE=cabal CABALVER=2.2 GHCVER=7.10.3
addons: {apt: {packages: [cabal-install-2.2,ghc-7.10.3],sources: [hvr-ghc]}}
- env: TYPE=cabal CABALVER=2.2 GHCVER=8.0.2
addons: {apt: {packages: [cabal-install-2.2,ghc-8.0.2], sources: [hvr-ghc]}}
- env: TYPE=cabal CABALVER=2.2 GHCVER=8.2.2
addons: {apt: {packages: [cabal-install-2.2,ghc-8.2.2], sources: [hvr-ghc]}}
- env: TYPE=cabal CABALVER=2.2 GHCVER=8.4.1
addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.1], sources: [hvr-ghc]}}
- env: TYPE=stack ARGS="--stack-yaml lts-2.yaml"
- env: TYPE=stack ARGS="--stack-yaml lts-6.yaml"
- env: TYPE=stack ARGS="--stack-yaml stack.yaml"
before_install:
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
install:
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- mkdir -pv ~/.local/bin
- case "$TYPE" in
cabal) travis_retry cabal update ;;
stack) travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' ;;
esac
script:
- |
set -ex # Error out after first failure and print each command before executing
case "$TYPE" in
cabal)
cabal new-build --enable-tests --enable-benchmarks --flags=dev
cabal new-test
cabal new-haddock
cabal sdist
;;
stack)
stack --version
stack --no-terminal --install-ghc $ARGS test
;;
esac
set +ex # Stop printing each command
notifications:
email:
on_success: never
on_failure: always