-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
293 lines (269 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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
language: cpp
sudo: required
dist: trusty
env:
global:
- BUILD_CMD='make VERBOSE=1'
- TEST_CMD='ctest -T test --output-on-failure -V'
- OMP_NUM_THREADS=4
- MPI_CONFIG='CMAKE_CMD_EXTRA="-DMPIEXEC:FILEPATH=$(which mpirun) -DMPIEXEC_MAX_NUMPROCS=${MPI_PROCS}"'
# The apt packages below are needed but can no longer be installed with
# sudo apt-get.
addons:
homebrew:
packages: &osx_sources
- gcc@7
- fftw
update: true
cache:
directories:
- $HOME/ci-helpers/spack
- $HOME/ci-helpers/openmpi
- $HOME/ci-helpers/mpich
matrix:
fast_finish: true
include:
# - os: osx
# osx_image: xcode10.1
# env:
# - TITLE="XCode 10.1 - GCC"
# - MPI=OFF
# - openMP=OFF
# - os: osx
# osx_image: xcode10.1
# env:
# - TITLE="XCode 10.1 - Clang"
# - MPI=OFF
# - openMP=OFF
# - os: osx
# osx_image: xcode10.1
# env:
# - TITLE="XCode 10.1 - GCC - MPI"
# - MPI=ON
# - openMP=OFF
# - MPI_PROCS=2
# - CI_HELPERS='spack'
# addons:
# homebrew:
# packages:
# - *osx_sources
# - modules
# - lmod
- os: linux
addons:
apt:
sources: &basic_sources
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
packages:
- &native_deps [ g++-7, clang-5.0, libtiff5-dev, libgomp1, libfftw3-dev ]
# libtiff5-dev version 5 ?; libgomp1 version 4.8.4-2
# libfftw3-dev version 3.3.3
- &all_deps [ libboost-all-dev, libeigen3-dev, libyaml-cpp-dev ]
# libboost-all-dev version 1.54; libeigen3-dev version 3.2.0
# libcfitsio3-dev version 3.34; libyaml-cpp-dev version 0.5.1
# \-> We need CFITSIO 3.41, this could help to install other dependencies...
env:
- TITLE="All dependencies - GCC"
- DEBUG=True
- LDFLAGS='-pthread'
- MPI=OFF
- openMP=OFF
- os: linux
addons:
apt:
sources:
- *basic_sources
packages:
- *native_deps
- *all_deps
env:
- TITLE="All dependencies - GCC - OMP"
- DEBUG=True
- LDFLAGS='-pthread'
- MPI=OFF
- openMP=ON
- os: linux
addons:
apt:
sources:
- *basic_sources
packages:
- *native_deps
- *all_deps
- lcov
env:
- TITLE="All dependencies - GCC - MPI"
- DEBUG=True
- LDFLAGS='-pthread'
- MPI=ON
- openMP=ON
- MPI_PROCS=2
- COVERAGE=ON
- CI_HELPERS='openmpi'
- MPI_EXTRA="--oversubscribe"
# - os: linux
# addons:
# apt:
# sources:
# - *basic_sources
# packages:
# - *native_deps
# - *all_deps
# env:
# - TITLE="All dependencies - GCC - MPI - mpich"
# - DEBUG=True
# - LDFLAGS='-pthread'
# - MPI=ON
# - openMP=ON
# - MPI_PROCS=4
# - CI_HELPERS='mpich'
# - os: linux
# addons:
# apt:
# sources:
# - *basic_sources
# packages:
# - *native_deps
# env:
# - TITLE="No dependencies - GCC - MPI"
# - DEBUG=True
# - LDFLAGS='-pthread'
# - MPI=ON
# - openMP=ON
# - MPI_PROCS=2
# - CI_HELPERS='openmpi'
# - MPI_EXTRA="--oversubscribe"
- os: linux
addons:
apt:
sources:
- *basic_sources
packages:
- *native_deps
- *all_deps
- &all_casa [ flex, bison, libblas-dev, liblapack-dev, libcfitsio3-dev, wcslib-dev, gfortran, libncurses5-dev, libreadline6-dev, libhdf5-serial-dev, python-numpy, python3-numpy ]
env:
- TITLE="CASA: All dependencies - GCC"
- DEBUG=True
- LDFLAGS='-pthread'
- Tests=ON
- MPI=OFF
- openMP=ON
- CASA=ON
- EXAMPLES=ON
- os: linux
addons:
apt:
sources:
- *basic_sources
packages:
- *native_deps
- *all_deps
env:
- TITLE="All dependencies - GCC - MPI - examples"
- DEBUG=True
- LDFLAGS='-pthread'
- Tests=ON
- MPI=ON
- MPI_PROCS=2
- openMP=ON
- EXAMPLES=ON
- TEST_CMD=''
- CI_HELPERS='openmpi'
- MPI_EXTRA="--oversubscribe"
- os: linux
services:
- docker
env:
- TITLE="Documentation - GCC"
- DOCS=ON
- BUILD_CMD='make docweb VERBOSE=1'
script:
- chmod o+w . # To allow docker to create the build directory
- docker run --rm -v $(pwd):/mydata uclrits/sopt /bin/sh -c "mkdir build; cd build; cmake .. -Ddocs=${DOCS} -Dweb=ON; eval ${BUILD_CMD}"
# - os: linux
# addons:
# apt:
# sources:
# - *basic_sources
# packages:
# - *native_deps
# env:
# - TITLE="Lint"
# - DEBUG=True
# - LDFLAGS='-pthread'
# - MPI=OFF
# - openMP=OFF
# - DOCS=OFF
# - BUILD_CMD="find ../ -regex '.*\.\(cc\|h\)' -not -iname '*.in.h' | xargs -I{} -P 10 clang-format-7 -i -style=file {}; git diff"
# - TEST_CMD="git diff --exit-code || (echo '## NOTE: your code is not linted properly - fix the above'; false)"
allow_failures:
# Because boost error on finding files
- os: osx
osx_image: xcode10.1
env:
- TITLE="XCode 10.1 - GCC - MPI"
- MPI=ON
- openMP=OFF
- MPI_PROCS=2
- CI_HELPERS='spack'
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep-history: true
local-dir: build/cpp/docs/html
verbose: true # FIXME: just at first to see logs
on:
branch: development
condition: $TITLE = "Documentation - GCC"
before_install:
- while sleep 540 ; do echo "=========== make is taking more than 9m - pinging travis =========="; done & # cfits may take long to download
- if [ $TRAVIS_OS_NAME = linux ]; then ClangVer="-5.0"; fi
- if [[ ${TITLE} = *GCC* ]]; then CC=gcc-7; else CC=clang${ClangVer}; fi
- if [[ ${TITLE} = *GCC* ]]; then CXX=g++-7; else CXX=clang++${ClangVer}; fi
- echo "==================== ${TITLE} ====================="
- if [[ ${TITLE} = *Documentation* ]]; then docker pull uclrits/sopt; fi
install:
# Add CI-helpers and install the dependencies we need from them.
- |
if [ ! -z ${CI_HELPERS} ]; then
git clone --depth 1 git://github.com/UCL-RITS/ci-helpers.git
source ci-helpers/travis/setup.sh ${CI_HELPERS}
fi
# As MPI is not installed already, this variable is not set properly; this
# way is set up for all the jobs in the same manner.
- if [[ $MPI = ON ]]; then eval $MPI_CONFIG; echo $CMAKE_CMD_EXTRA; fi
before_script:
- |
if [[ ${TITLE} = *Lint* ]]; then
curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-7 main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update -y -qq
sudo apt-get install clang-format-7
fi
script:
- pwd
- mkdir build
- cd build
- |
cmake .. -DCMAKE_BUILD_TYPE=Release \
-Dtests=${Tests-ON} \
-Ddompi=${MPI} \
-Dexamples=${EXAMPLES-OFF} \
-Dopenmp=${openMP} \
-Ddocs=${DOCS-OFF} \
-Ddocasa=${CASA-OFF} \
-Dbenchmarks=${Benchmarks-OFF} \
-Dcoverage=${COVERAGE-OFF} \
-DPURIFY_TEST_LOG_LEVEL=${test_level-critical} \
-DGreatCMakeCookOff_DIR:PATH=/tmp/GreatCMakeCookOff/cmake \
-DCFitsIO_URL=https://github.com/UCL-RITS/BinaryBlobs-dependencies/raw/master/Astronomy/cfitsio3410.tar.gz \
${CMAKE_CMD_EXTRA} -DMPIEXEC_PREFLAGS="${MPI_EXTRA-}"
- while sleep 540 ; do echo "=========== make is taking more than 9m - pinging travis =========="; done & # cfits may take long to download
- eval $BUILD_CMD
- eval $TEST_CMD
- if [[ ${TITLE} != *Documentation* ]] && [[ ${TITLE} != *Lint* ]]; then sudo make install; fi
after_success:
- if [ "${TITLE}" = "All dependencies - GCC - MPI" ]; then cd ..; bash .ci/coverage.sh; fi