forked from agda/agda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
262 lines (212 loc) · 8.26 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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
language: haskell
# We build with all the latest GHC versions for each 7.X, so we reduce
# build times, possibly avoid compiler bugs and still test all the major
# interface changes.
ghc:
- 7.8.4
- 7.6.3
# We use the word 'test' in a broad sense (e.g. it includes the Agda
# test suite, the benchmark suite, the compilation with a specific set
# of dependencies, the testing of other programs like `hTags`, etc.) Almost
# all the tests are divided according to whether or not require the standard
# library.
#
# The current tests non-requiring the standard library are:
#
# make check-whitespace
# make succeed
# make fail
# make interaction
# make interactive
# make examples
# make api-test
# make tests
# make TAGS (testing the hTags program)
#
# The current tests requiring the standard library are:
#
# make library-test
# make lib-succeed
# make lib-interaction
# make compiler-test
# make benchmark-without-logs
#
# N.B. that the ghc-7.8.4-transformers-0.3.0.0 test uses a different set up
# (see below).
# Travis runs the builds on this order.
env:
- TEST=non-require-stdlib
- TEST=require-stdlib
- TEST=latex-test
- TEST=ghc-7.8.4-transformers-0.3.0.0
install:
# Asking for the shell.
- echo $SHELL
# The GHC version.
- GHC_VERSION_TRAVIS=`ghc --numeric-version`
##############################################################################
# Installing latest versions of cabal-install, Alex and Happy
- if [ $TEST = "latex-test" -o $TEST = "non-require-stdlib" -o $TEST = "require-stdlib" ]; then
cabal install cabal-install &&
export PATH=$HOME/.cabal/bin:$PATH &&
cat $HOME/.cabal/config &&
cabal install alex &&
cabal install happy;
fi
##############################################################################
# Installing dependencies
# We use the `--avoid-reinstalls` flag with GHC 7.6.3/7.8.4 for
# avoiding to break previously installed packages [Issue 1520].
# Note: `cabal install` doesn't set up the number of jobs by default
# (cabal-install 1.22.4.0). See https://github.com/haskell/cabal/issues/2628.
# The `enable-test` option is required only if $TEST=require-stdlib or
# $TEST=latex-test.
- case $TEST in
"non-require-stdlib")
if [ $GHC_VERSION_TRAVIS = 7.6.3 -o $GHC_VERSION_TRAVIS = 7.8.4 ]; then
cabal install --avoid-reinstalls --only-dependencies;
else
cabal install --only-dependencies;
fi
;;
"latex-test" | "require-stdlib")
if [ $GHC_VERSION_TRAVIS = 7.6.3 -o $GHC_VERSION_TRAVIS = 7.8.4 ]; then
cabal install --enable-tests --avoid-reinstalls --only-dependencies;
else
cabal install --enable-tests --only-dependencies;
fi
;;
esac
##############################################################################
# Installing Agda
# We are installing Agda using
#
# cabal configure <options>
# cabal build
# cabal copy
# cabal register
#
# instead of
#
# cabal install <options>
#
# due to the cabal-install issue https://github.com/haskell/cabal/issues/975.
##############################################################################
# Running `cabal configure`
- export BUILD_DIR=$PWD/dist
# The `enable-test` option is required if $TEST=require-stdlib or
# $TEST=latex-test.
- case $TEST in
"non-require-stdlib")
cabal configure -v2 --builddir=$BUILD_DIR
;;
"latex-test" | "require-stdlib")
cabal configure -v2 --builddir=$BUILD_DIR --enable-tests
;;
esac
##############################################################################
# Running `cabal build`, `cabal copy` and `cabal register`
# Note: `cabal build` sets up the number of jobs to $ncpus by default.
# (cabal-install 1.22.4.0). See https://github.com/haskell/cabal/issues/2628.
# We don't run `cabal install` because we are using `cabal configure` and
# `cabal build` (see Section 'cabal install ≠ Setup install' from
# http://www.vex.net/~trebla/haskell/cabal-cabal.xhtml).
- case $TEST in
"latex-test" | "non-require-stdlib" | "require-stdlib")
cabal build -v2 --builddir=$BUILD_DIR &&
cabal copy &&
cabal register
;;
esac
##############################################################################
# Installing Epic
# The Epic backend has been removed. See Issue 1481.
# - sudo apt-get install libgc-dev
# - cabal install epic
##############################################################################
# Installing required packages for running the LaTeX test-suite
#
# Remark (19 April 2015). Travis (i.e. Ubuntu 12.04) uses an outdated
# TeX Live 2009. The LaTeX test-suite requires the unicode-math package
# which is not available in this version of TeX Live (see Issue 1022).
- if [ $TEST = "latex-test" ]; then
sudo add-apt-repository ppa:texlive-backports/ppa -y &&
sudo apt-get update &&
sudo apt-get install texlive &&
sudo apt-get install texlive-latex-extra &&
sudo apt-get install texlive-xetex &&
sudo apt-get install texlive-math-extra &&
sudo apt-get install texlive-fonts-extra;
fi
##############################################################################
# Getting the standard library
- if [ $TEST = "require-stdlib" ]; then
make up-to-date-std-lib;
fi
##############################################################################
# Testing compilation with transformers 0.3.0.0 which is shipped with
# GHC 7.8.* [Issue 1156]
# N.B. that this test is not include in the Makefile tests.
# We use the `--avoid-reinstalls` flag with GHC 7.8.4 for avoiding to
# break previously installed packages [Issue 1520].
- if [ $TEST = "ghc-7.8.4-transformers-0.3.0.0" -a $GHC_VERSION_TRAVIS = 7.8.4 ]; then
cabal install cabal-install --constraint=transformers==0.3.0.0 &&
export PATH=$HOME/.cabal/bin:$PATH &&
cat $HOME/.cabal/config &&
cabal install alex --constraint=transformers==0.3.0.0 &&
cabal install happy --constraint=transformers==0.3.0.0 &&
cabal install --avoid-reinstalls --only-dependencies --constraint=transformers==0.3.0.0 &&
cabal configure -v2 --builddir=$BUILD_DIR --constraint=transformers==0.3.0.0 &&
cabal build -v2 --builddir=$BUILD_DIR;
fi
##############################################################################
# Installing fix-agda-whitespace
- if [ $TEST = "non-require-stdlib" ]; then
make install-fix-agda-whitespace;
fi
##############################################################################
script:
# Right now Haddock doesn't work, presumably because it consumes too
# much memory.
# - cabal haddock
##############################################################################
- if [ $TEST = "latex-test" ]; then
make AGDA_TESTS_OPTIONS="" BUILD_DIR=$BUILD_DIR latex-test;
fi
##############################################################################
- if [ $TEST = "non-require-stdlib" ]; then
make check-whitespace &&
make BUILD_DIR=$BUILD_DIR succeed &&
make BUILD_DIR=$BUILD_DIR fail &&
make BUILD_DIR=$BUILD_DIR interaction &&
make BUILD_DIR=$BUILD_DIR interactive &&
make BUILD_DIR=$BUILD_DIR examples &&
make BUILD_DIR=$BUILD_DIR api-test &&
make BUILD_DIR=$BUILD_DIR tests &&
make BUILD_DIR=$BUILD_DIR TAGS;
fi
##############################################################################
- if [ $TEST = "require-stdlib" ]; then
make BUILD_DIR=$BUILD_DIR library-test &&
make BUILD_DIR=$BUILD_DIR lib-succeed &&
make BUILD_DIR=$BUILD_DIR lib-interaction &&
make AGDA_TESTS_OPTIONS="" BUILD_DIR=$BUILD_DIR compiler-test &&
make BUILD_DIR=$BUILD_DIR benchmark-without-logs;
fi
##############################################################################
matrix:
exclude:
- ghc: 7.6.3
env: TEST=ghc-7.8.4-transformers-0.3.0.0
# Builds are loooong, we want to send an email as fast as possible.
fast_finish: true
# allow_failures:
# - ghc: A.B.C
##############################################################################
# Every master and maintenance branches >= 2.4.3 or >= maint-2.4.2 must
# be here. You can also add your private branches if you want travis to
# test them.
branches:
only:
- master
- maint-2.4.2