forked from marcomaggi/cre2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
283 lines (257 loc) · 8.13 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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
# .travis.yml --
#
# Travis CI configuration for CRE2.
#page
#### about branch selection
#
# Travis-CI processes the file ".travis.yml" from the branch containing the git commit that triggers
# the build. The file ".travis.yml" needs to be present on all active branches of the project. It
# is possible to select which branches to process using a safelist (with the keyword "only") and a
# blocklist (with the keyword "except"):
#
# branches:
# only:
# - master
# - stable
# except:
# - legacy
# - /^experimental-.*$/
#
# it is possible to use regular expressions to select branch names, by putting the regexp between
# slash characters.
#
# For details see (URL last verified Dec 21, 2018):
#
# <https://docs.travis-ci.com/user/customizing-the-build/#building-specific-branches>
#
#page
#### about compiler packages
#
# We select build-by-build the packages to install; it should speed up preparation. By putting a
# single "addons" key at the top level: we would cause all the compilers to be installed for all the
# builds in the matrix; we do not want this.
#page
#### about compiler selection
#
# We select the compiler we want with the "compiler" key. This should set the environment variable
# CC to the associated compiler executable; I have verified that it actually does so when the
# language is C. I am not sure that it actually does it when the language is C++.
#
# To check which C or C++ compiler is actually selected, we can put the following in every "script:"
# key, before running the "configure" script as follows:
#
# script: |
# echo CC=$CC; $CC --version;
# echo CXX=$CXX; $CXX --version;
# ./configure
#
#page
#### about dependency packages
#
# We install dependency packages under "/usr/local", so appropriate directories must be added to the
# global path environment variables, otherwise the installed packages will not be found and used
# correctly by the "configure" script.
#
# Notice that (as of May 17, 2018) Travis CI's run-time system raises a warning if the first
# directory in the PATH environment variable is not the one that it sets. This causes problems if
# we install the dependencies under the directory "/tmp".
#
# We need the following in the global environment:
#
# env:
# global:
# - PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:$PKG_CONFIG_PATH;
# - ACLOCAL_PATH=/usr/local/share/aclocal:$ACLOCAL_PATH;
#
# Alternatively, we can put the following in every "script:" key, before running the "configure"
# script as follows:
#
# script: |
# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:$PKG_CONFIG_PATH;
# export ACLOCAL_PATH=/usr/local/share/aclocal:$ACLOCAL_PATH;
# ./configure
#
#page
#### global configuration
language: c
# We need sudo to install the dependencies under "/usr/local".
#
sudo: true
# Let's just look at the project's dashboard at Travis CI's site.
#
notifications:
email: false
# We do no git operations, so set the "git clone" depth to the minimum.
#
git:
depth: 1
# It is possible to select which branches to process.
#
# branches:
# only:
# - master
# NOTE There must be only *one* env.global key!!! Otherwise the earlier settings will be
# ineffective.
#
# Setting the variable VERBOSE causes "make check" to output the file "test-suite.log".
#
env:
global:
- MAKEFLAGS="-j 2"
- VERBOSE=1
- LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH;
- LD_RUN_PATH=/usr/local/lib:$LD_RUN_PATH;
- PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:$PKG_CONFIG_PATH;
- ACLOCAL_PATH=/usr/local/share/aclocal:$ACLOCAL_PATH;
#page
#### dependencies management
#
install:
- ./meta/travis-ci/install-pkg-config.sh;
- ./meta/travis-ci/install-autoconf.sh;
- ./meta/travis-ci/install-automake.sh;
- ./meta/travis-ci/install-texinfo.sh;
- ./meta/travis-ci/install-re2.sh;
#page
#### build scripts
before_script:
# On Linux the GNU Libtool preparation script is called "libtoolize", while on OS X it is called
# "glibtoolize".
- if test "$TRAVIS_OS_NAME" = osx ; then export LIBTOOLIZE=glibtoolize; else true; fi
- echo pkg-config --version ; pkg-config --version;
- echo autoconf --version ; autoconf --version;
- echo automake --version ; automake --version;
- sh ./autogen.sh;
matrix:
fast_finish: true
include:
# Plain build under Ubuntu GNU+Linux "trusty", GCC 5.
- os: linux
dist: trusty
compiler: gcc-5
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
- g++-5
script: |
./configure --enable-maintainer-mode CC=/usr/bin/gcc-5 CXX=/usr/bin/g++-5;
make all;
make check;
# Plain build under Ubuntu GNU+Linux "trusty", GCC 6.
- os: linux
dist: trusty
compiler: gcc-6
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
script: |
./configure --enable-maintainer-mode CC=/usr/bin/gcc-6 CXX=/usr/bin/g++-6;
make all;
make check;
# Plain build under Ubuntu GNU+Linux "trusty", GCC 7.
- os: linux
dist: trusty
compiler: gcc-7
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
- g++-7
script: |
./configure --enable-maintainer-mode CC=/usr/bin/gcc-7 CXX=/usr/bin/g++-7;
make all;
make check;
# Plain build under Ubuntu GNU+Linux "trusty", GCC 8.
- os: linux
dist: trusty
compiler: gcc-8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-8
- g++-8
script: |
./configure --enable-maintainer-mode CC=/usr/bin/gcc-8 CXX=/usr/bin/g++-8; cat config.log;
make all;
make check;
# Plain build under Ubuntu GNU+Linux "trusty", GCC 9.
- os: linux
dist: trusty
compiler: gcc-9
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-9
- g++-9
script: |
./configure --enable-maintainer-mode CC=/usr/bin/gcc-9 CXX=/usr/bin/g++-9; cat config.log;
make all;
make check;
# Plain build under Ubuntu GNU+Linux "trusty", CLang automatically selected by Travis CI.
- os: linux
dist: trusty
compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
script: |
export CXX=clang++
echo CC=$CC; $CC --version;
echo CXX=$CXX; $CXX --version;
./configure --enable-maintainer-mode;
make all CFLAGS='-Wno-unknown-attributes';
make check CFLAGS='-Wno-unknown-attributes';
# Plain build under OS X, XCode 7.3, CLang automatically selected by Travis CI.
- os: osx
osx_image: xcode7.3
compiler: clang
script: |
export CXX=clang++
echo CC=$CC; $CC --version;
echo CXX=$CXX; $CXX --version;
./configure --enable-maintainer-mode;
make all CFLAGS='-Wno-unknown-attributes';
make check CFLAGS='-Wno-unknown-attributes';
# Plain build under OS X, XCode 8.3, CLang automatically selected by Travis CI.
- os: osx
osx_image: xcode8.3
compiler: clang
script: |
export CXX=clang++
echo CC=$CC; $CC --version;
echo CXX=$CXX; $CXX --version;
./configure --enable-maintainer-mode;
make all CFLAGS='-Wno-unknown-attributes';
make check CFLAGS='-Wno-unknown-attributes';
# Codecov support under Ubuntu GNU+Linux "trusty", GCC 8.
- os: linux
dist: trusty
compiler: gcc-8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-8
- g++-8
script: |
./configure --enable-maintainer-mode CC=/usr/bin/gcc-8 CXX=/usr/bin/g++-8 CFLAGS='-O0 --coverage';
make all;
make check;
after_success:
bash <(curl -s https://codecov.io/bash) -xgcov-8
### end of file