-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
91 lines (72 loc) · 2.27 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
sudo: true
language: minimal
git:
depth: 5
cache:
directories:
- "$HOME/.cabal"
- "$HOME/.stack"
- "$TRAVIS_BUILD_DIR/.stack-work"
matrix:
include:
- name: "Cabal GHC-8.0.1"
env: BUILD=cabal
addons: {apt: {packages: [cabal-install-2.2,ghc-8.0.1], sources: [hvr-ghc]}}
- name: "Cabal GHC-8.2.2"
env: BUILD=cabal
addons: {apt: {packages: [cabal-install-2.2,ghc-8.2.2], sources: [hvr-ghc]}}
- name: "Cabal GHC-8.4.4"
env: BUILD=cabal
addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.4], sources: [hvr-ghc]}}
- name: "Cabal GHC-8.6.3"
env: BUILD=cabal
addons: {apt: {packages: [cabal-install-2.2,ghc-8.6.3], sources: [hvr-ghc]}}
- name: "Cabal GHC-HEAD"
env: BUILD=cabal CABALARGS=--allow-newer
addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
- name: "Stack LTS-9 (GHC-8.0.2)"
env: BUILD=stack RESOLVER=lts-9
- name: "Stack LTS-11 (GHC-8.2.2)"
env: BUILD=stack RESOLVER=lts-11
- name: "Stack LTS-12 (GHC-8.4.4)"
env: BUILD=stack RESOLVER=lts-12
- name: "Stack Nightly"
env: BUILD=stack RESOLVER=nightly
- name: "Stack LTS-12 (GHC-8.4.4) [OSX]"
env: BUILD=stack RESOLVER=lts-12
os: osx
allow_failures:
- name: "Cabal GHC-HEAD"
- name: "Stack Nightly"
install:
- |
if [ $BUILD = cabal ]; then
export PATH="/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH"
cabal --version
ghc --version
cabal new-update
cabal new-build all --only-dependencies $CABALARGS
else
mkdir -p ~/.local/bin
export PATH="$HOME/.local/bin:$PATH"
# install stack
curl -L "https://www.stackage.org/stack/${TRAVIS_OS_NAME}-x86_64" | tar xz --strip-components=1 -C ~/.local/bin/
# build project with stack
if [ -n "$RESOLVER" ]; then
ARGS="--resolver $RESOLVER"
fi
stack --version
stack $ARGS --no-terminal setup
stack $ARGS ghc -- --version
stack $ARGS --no-terminal build --test --bench --only-dependencies
fi
script:
- |
if [ $BUILD = cabal ]; then
cabal new-build all $CABALARGS
else
if [ -n "$RESOLVER" ]; then
ARGS="--resolver $RESOLVER"
fi
stack $ARGS --no-terminal build --test --bench --no-run-benchmarks --haddock --no-haddock-deps
fi