-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
119 lines (92 loc) · 2.52 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
os: linux
language: generic
cache:
directories:
- $HOME/.ghc
- $HOME/.cabal
- $HOME/.stack
- $TRAVIS_BUILD_DIR/.stack-work
timeout: 600
jobs:
include:
- env: ARGS=""
name: "linux default"
- env: ARGS="--resolver lts-15"
name: "linux lts 15"
- env: ARGS="--resolver lts-14"
name: "linux lts 14"
- env: ARGS="--resolver lts-13"
name: "linux lts 13"
- env: ARGS="--resolver lts-12 --stack-yaml stack-12.yaml"
name: "linux lts 12"
- env: ARGS="--resolver lts-11 --stack-yaml stack-11.yaml"
name: "linux lts 11"
- env: ARGS="--resolver lts-10"
name: "linux lts 10"
- env: ARGS="--resolver lts-9"
name: "linux lts 9"
- env: ARGS="--resolver nightly"
name: "linux nightly"
- env: ARGS=""
name: "osx default"
os: osx
- env: ARGS="--resolver lts-15"
name: "osx lts 15"
os: osx
- env: ARGS="--resolver lts-14"
name: "osx lts 14"
os: osx
- env: ARGS="--resolver lts-13"
name: "osx lts 13"
os: osx
- env: ARGS="--resolver lts-12 --stack-yaml stack-12.yaml"
name: "osx lts 12"
os: osx
- env: ARGS="--resolver lts-11 --stack-yaml stack-11.yaml"
name: "osx lts 11"
os: osx
- env: ARGS="--resolver lts-10"
name: "osx lts 10"
os: osx
- env: ARGS="--resolver lts-9"
name: "osx lts 9"
os: osx
- env: ARGS="--resolver nightly"
name: "osx nightly"
os: osx
- stage: deploy
if: tag =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/
script:
- |
mkdir -p "$HOME/.stack/upload"
jq -n --arg username "$HACKAGE_USERNAME" --arg password "$HACKAGE_PASSWORD" '{username: $username, password: $password}' > "$HOME/.stack/upload/credentials.json"
stack upload .
allow_failures:
- env: ARGS="--resolver nightly"
before_install:
- |
set -ex
# Download and unpack the stack executable
export PATH=$HOME/.local/bin:$PATH
mkdir -p ~/.local/bin
if [ `uname` = "Darwin" ]
then
travis_retry curl --insecure -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
else
travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
fi
set +ex
install:
- |
set -ex
if [ `uname` != "Darwin" ]
then
sudo apt-get install -y jq pwgen
fi
stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies
set +ex
script:
- |
set -ex
stack --no-terminal $ARGS test --pedantic --bench --no-run-benchmarks --haddock --no-haddock-deps
set +ex