-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
223 lines (182 loc) · 9.17 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
# packcheck-0.5.0
# You can use any of the options supported by packcheck as environment
# variables here. See https://github.com/composewell/packcheck for all
# options and their explanation.
#dist: bionic
env:
# ------------------------------------------------------------------------
# Global options, you can use these per build as well
# ------------------------------------------------------------------------
global:
# ------------------------------------------------------------------------
# Common options
# ------------------------------------------------------------------------
# - GHC_OPTIONS="-Werror"
- CABAL_REINIT_CONFIG=y
- LC_ALL=C.UTF-8
# ------------------------------------------------------------------------
# What to build
# ------------------------------------------------------------------------
# - DISABLE_TEST=y
# - DISABLE_BENCH=y
# - DISABLE_DOCS=y
# - DISABLE_SDIST_BUILD=y
# - DISABLE_SDIST_GIT_CHECK=y
# - DISABLE_DIST_CHECKS=y
# ------------------------------------------------------------------------
# stack options
# ------------------------------------------------------------------------
# Note requiring a specific version of stack using STACKVER may fail due to
# github API limit while checking and upgrading/downgrading to the specific
# version.
#- STACKVER="1.6.5"
- STACK_UPGRADE="y"
# ------------------------------------------------------------------------
# cabal options
# ------------------------------------------------------------------------
- CABAL_CHECK_RELAX=y
- CABAL_NO_SANDBOX=y
- CABAL_HACKAGE_MIRROR=hackage.haskell.org:http://hackage.fpcomplete.com
# ------------------------------------------------------------------------
# Where to find the required tools
# ------------------------------------------------------------------------
- PATH=/bin:/usr/bin
- TOOLS_DIR=/opt
# ------------------------------------------------------------------------
# Location of packcheck.sh (the shell script invoked to perform CI tests ).
# ------------------------------------------------------------------------
# You can either commit the packcheck.sh script at this path in your repo or
# you can use it by specifying the PACKCHECK_REPO_URL option below in which
# case it will be automatically copied from the packcheck repo to this path
# during CI tests. In any case it is finally invoked from this path.
- PACKCHECK_LOCAL_PATH="./packcheck.sh"
# If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
# then it is automatically pulled from this URL.
- PACKCHECK_GITHUB_URL="https://raw.githubusercontent.com/composewell/packcheck"
- PACKCHECK_GITHUB_COMMIT="b92970febc2d66e0ed0202254c97c13392461821"
notifications:
email:
on_success: change
on_failure: always
# This matrix has total of 6 builds enabled, we try to cover last three major
# GHC versions, stack, cabal, Linux and OSX with minimum number of builds
# possible. You can uncomment other disabled builds or comment out existing
# ones to your taste.
#
# We pre-install the cabal-install package to not incur the penalty of building
# it the first time in cached builds or every time in uncached builds.
matrix:
include:
# --------------------------------------------------------------------------
# (Linux) cabal builds. Common envvars are: CABAL_BUILD_OPTIONS
# --------------------------------------------------------------------------
#- env: BUILD=cabal-v2 GHCVER=head
# addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
- env: BUILD=cabal-v2 GHCVER=8.10.1
addons: {apt: {packages: [cabal-install-3.2,ghc-8.10.1], sources: [hvr-ghc]}}
- env: BUILD=cabal-v2 GHCVER=8.8.3
addons: {apt: {packages: [cabal-install-3.2,ghc-8.8.3], sources: [hvr-ghc]}}
- env: BUILD=cabal-v2 GHCVER=8.6.5
addons: {apt: {packages: [cabal-install-3.2,ghc-8.6.5], sources: [hvr-ghc]}}
- env: BUILD=cabal-v2 GHCVER=8.4.4
addons: {apt: {packages: [cabal-install-3.2,ghc-8.4.4], sources: [hvr-ghc]}}
- env: BUILD=cabal-v2 GHCVER=7.10.3
addons: {apt: {packages: [cabal-install-3.2,ghc-7.10.3], sources: [hvr-ghc]}}
# You can specify build flags like this:
#- env: BUILD=cabal-v2 CABAL_BUILD_OPTIONS="--flags=dev"
# addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
# You can use a cabal project file to specify flags like -Werror on per
# package basis.
#- env: BUILD=cabal-v2 CABAL_PROJECT=cabal.project.ci
# addons: {apt: {packages: [cabal-install-3.2,ghc-8.6.5], sources: [hvr-ghc]}}
# --------------------------------------------------------------------------
# GHCJS cabal builds
# --------------------------------------------------------------------------
# Use CABAL_BUILD_OPTIONS to pass any options to cabal e.g. project-file
# - env: BUILD=cabal-v2 ENABLE_GHCJS=y CABAL_BUILD_OPTIONS="" DISABLE_DOCS=y DISABLE_SDIST_BUILD=y
# addons:
# apt:
# sources:
# - hvr-ghc
# - sourceline: 'ppa:hvr/ghcjs'
# - sourceline: 'deb https://deb.nodesource.com/node_11.x xenial main'
# key_url: 'https://deb.nodesource.com/gpgkey/nodesource.gpg.key'
# packages: [cabal-install-2.4,ghcjs-8.4]
# --------------------------------------------------------------------------
# (Linux) stack builds (BUILD=stack). Some common envvars for stack builds
# are: STACK_YAML, STACK_OPTIONS, STACK_BUILD_OPTIONS
# --------------------------------------------------------------------------
#
# NOTE: cabal-install is required for some of the packcheck options to work.
# We just install it so that packcheck does not build it from source
# otherwise.
#- env: BUILD=stack RESOLVER=nightly
- env: BUILD=stack RESOLVER=lts-15 GHCVER=8.8
addons: {apt: {packages: [cabal-install-3.2], sources: [hvr-ghc]}}
#- env: BUILD=stack RESOLVER=lts-14 GHCVER=8.6
# addons: {apt: {packages: [cabal-install-3.2], sources: [hvr-ghc]}}
#- env: BUILD=stack RESOLVER=lts-12 GHCVER=8.4
# addons: {apt: {packages: [cabal-install-3.2], sources: [hvr-ghc]}}
#- env: BUILD=stack RESOLVER=lts-6 GHCVER=7.10
# addons: {apt: {packages: [cabal-install-3.2], sources: [hvr-ghc]}}
# You can keep a STACK_YAML file at any path location
#- env: BUILD=stack STACK_YAML=.ci/stack-8.0.yaml
# You can specify build flags like this:
#- env: BUILD=stack RESOLVER=lts-12 STACK_BUILD_OPTIONS="--flag packcheck:dev"
# --------------------------------------------------------------------------
# OS X builds
# --------------------------------------------------------------------------
# cabal build using stack!
#- env: BUILD=cabal-v2 RESOLVER=lts-15 GHCVER=8.8
- env: BUILD=stack RESOLVER=lts-15 GHCVER=8.8 DISABLE_SDIST_BUILD=y
os: osx
#- env: BUILD=stack RESOLVER=lts-14 GHCVER=8.6
# os: osx
# --------------------------------------------------------------------------
# Lint e.g. HLINT_COMMANDS="hlint lint src; hlint lint test"
# --------------------------------------------------------------------------
#- env: BUILD=stack RESOLVER=lts-15 HLINT_COMMANDS="hlint lint ."
# --------------------------------------------------------------------------
# Build and send coverage report to coveralls.io using hpc-coveralls. Add
# your project to coveralls.io first, for available options see hpc-coveralls
# docs. CAVEATS:
# * Does not work for multi-package repos
# * Use https://github.com/composewell/hpc-coveralls
# * See the packcheck README for more details
# --------------------------------------------------------------------------
#- env: BUILD=cabal-v2 CABAL_PROJECT=cabal.project.coveralls COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines --exclude-dir=test test"
# addons: {apt: {packages: [cabal-install-3.2,ghc-8.8.3], sources: [hvr-ghc]}}
# --------------------------------------------------------------------------
# Builds that are allowed to fail
# --------------------------------------------------------------------------
allow_failures:
- env: BUILD=cabal-v2 GHCVER=head
- env: BUILD=stack RESOLVER=nightly
- env: BUILD=stack RESOLVER=lts-15 HLINT_COMMANDS="hlint lint ."
# ------------------------------------------------------------------------
# Settings beyond this point are advanced and normally not tweaked
# ------------------------------------------------------------------------
language: generic
sudo: false
cache:
directories:
- $HOME/.cabal
- $HOME/.ghc
- $HOME/.ghcjs
- $HOME/.local
- $HOME/.stack
install: true
script:
- |
# If a custom stack-yaml is specified, replace the default with that
if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
unset STACK_YAML
# Get packcheck if needed
CURL=$(which curl)
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
chmod +x $PACKCHECK_LOCAL_PATH
# This script is governed by various PACKCHECK envvars that are set above.
# In addition, hpc-coveralls needs TRAVIS, TRAVIS_JOB_ID variables set by
# the travis CI environment.
- bash -c "$PACKCHECK_LOCAL_PATH $BUILD PATH=/bin:/usr/bin"