-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
400 lines (359 loc) · 11.7 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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
language: cpp
matrix:
fast_finish: true
include:
# linux + gcc
- os: linux
compiler: gcc
name: ubuntu 14.04 - native gcc
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- python3.5
- python3-pip
env:
- MATRIX_EVAL=""
- PYTHON=python3.5
- os: linux
compiler: gcc
name: ubuntu 14.04 - gcc@4.8.5
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- python3.5
- python3-pip
env:
- MATRIX_EVAL="CC=gcc-4.8 && CXX=g++-4.8"
- PYTHON=python3.5
- os: linux
compiler: gcc
name: ubuntu 14.04 - gcc@4.9
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
- python3.5
- python3-pip
env:
- MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
- PYTHON=python3.5
- os: linux
compiler: gcc
name: ubuntu 14.04 - gcc@5.0
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
- python3.5
- python3-pip
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
- PYTHON=python3.5
- os: linux
compiler: gcc
name: ubuntu 14.04 - gcc@6.0
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- python3.5
- python3-pip
env:
- MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
- PYTHON=python3.5
- os: linux
compiler: gcc
name: ubuntu 14.04 - gcc@7.0
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- python3.5
- python3-pip
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- PYTHON=python3.5
- os: linux
compiler: gcc
name: ubuntu 14.04 - gcc@8.0
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
- python3.5
- python3-pip
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- PYTHON=python3.5
# linux + clang
- os: linux
compiler: clang
name: ubuntu 14.04 - clang@3.6
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-3.8
packages:
- clang-3.6
- g++-4.8-aarch64-linux-gnu
- gcc-4.8-aarch64-linux-gnu
- g++-4.8-multilib
- gcc-4.8-multilib
- python3.5
- python3-pip
env:
- MATRIX_EVAL="CC=clang-3.6 && CXX=clang++-3.6"
- LINKER_FLAGS="-stdlib=libstdc++ -lc++abi"
- PYTHON=python3.5
- os: linux
compiler: clang
name: ubuntu 14.04 - clang@3.8
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- clang-3.8
- g++-4.8-aarch64-linux-gnu
- gcc-4.8-aarch64-linux-gnu
- g++-4.8-multilib
- gcc-4.8-multilib
- python3.5
- python3-pip
env:
- MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"
- LINKER_FLAGS="-stdlib=libc++ -lc++abi"
- PYTHON=python3.5
- os: linux
compiler: clang
name: ubuntu 14.04 - clang@3.9
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- clang-3.9
- g++-4.8-aarch64-linux-gnu
- gcc-4.8-aarch64-linux-gnu
- g++-4.8-multilib
- gcc-4.8-multilib
- python3.5
- python3-pip
env:
- MATRIX_EVAL="CC=clang-3.9 && CXX=clang++-3.9"
- LINKER_FLAGS="-stdlib=libc++ -lc++abi"
- PYTHON=python3.5
- os: linux
compiler: clang
name: ubuntu 14.04 - clang@4.0
dist: trusty
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
packages:
- clang-4.0
- libstdc++-7-dev
- libclang-5.0-dev
- python3.5
- python3-pip
env:
- MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0"
- LINKER_FLAGS="-stdlib=libc++ -lc++abi"
- PYTHON=python3.5
- os: linux
compiler: clang
name: ubuntu 14.04 - clang@5.0
dist: trusty
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
packages:
- clang-5.0
- libstdc++-7-dev
- libclang-5.0-dev
- python3.5
- python3-pip
env:
- MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"
- LINKER_FLAGS="-stdlib=libc++ -lc++abi"
- PYTHON=python3.5
- os: linux
compiler: clang
name: ubuntu 14.04 - clang@6.0
dist: trusty
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- clang-6.0
- libstdc++-7-dev
- libclang-6.0-dev
- python3.5
- python3-pip
env:
- MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
- LINKER_FLAGS="-stdlib=libc++ -lc++abi"
- PYTHON=python3.5
- os: linux
compiler: clang
name: ubuntu 14.04 - clang@7.0
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
- llvm-toolchain-trusty-7
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- clang-7
- libstdc++-7-dev
- libclang-7-dev
- python3.5
- python3-pip
env:
- MATRIX_EVAL="CC=clang-7 && CXX=clang++-7"
- LINKER_FLAGS="-stdlib=libc++ -lc++abi"
- PYTHON=python3.5
# osx + gcc
- os: osx
osx_image: xcode10.1
compiler: gcc
name: macOS - g++-7
addons:
apt:
packages:
- python3.5
- python3-pip
env:
- MATRIX_EVAL="brew update && brew reinstall gcc@7 gcc && CC=gcc-7 && CXX=g++-7"
- PYTHON=python3
- os: osx
osx_image: xcode10.1
compiler: gcc
name: macOS - g++-8
addons:
apt:
packages:
- python3.5
- python3-pip
env:
- MATRIX_EVAL="brew update && brew reinstall gcc@8 gcc && CC=gcc-8 && CXX=g++-8"
- PYTHON=python3
# osx + clang
- os: osx
osx_image: xcode10.1
compiler: clang
name: macOS - native clang (llvm backend)
addons:
apt:
sources:
- llvm-toolchain-trusty-7
packages:
- libc++-dev
- libc++abi-dev
- python3.5
- python3-pip
env:
- MATRIX_EVAL=""
- LINKER_FLAGS="-stdlib=libc++ -lc++abi"
- PYTHON=python3
- os: linux
compiler: gcc
python: 3.5
name: ubuntu 14.04 - gcc@8.0 & python@3.5
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
- python3.5
- python3-pip
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- PYTHON=python3.5
- WITH_PYTHON=ON
allow_failures:
- name: ubuntu 14.04 - clang@3.8
- name: ubuntu 14.04 - clang@4.0
before_install:
- travis_retry eval "${MATRIX_EVAL}"
- $PYTHON -m pip install --upgrade pip --user
# install python packages
- $PYTHON --version
# temporary solution for setuptools error (https://stackoverflow.com/questions/63663362/django-python3-on-install-i-get-parent-module-setuptools-not-loaded)
- if [[ "$WITH_PYTHON" == "ON" ]]; then $PYTHON -m pip install --user pip==20.2.1 ;fi
- if [[ "$WITH_PYTHON" == "ON" ]]; then $PYTHON -m pip install --user setuptools==49.3.0 ;fi
- if [[ "$WITH_PYTHON" == "ON" ]]; then $PYTHON -m pip install --user numpy==1.15 ;fi
- if [[ "$WITH_PYTHON" == "ON" ]]; then $PYTHON -m pip install --user cython==0.29 ;fi
- if [[ "$WITH_PYTHON" == "ON" ]]; then $PYTHON -m pip install --user scipy==1.2.1 ;fi
- if [[ "$WITH_PYTHON" == "ON" ]]; then $PYTHON -m pip install --user scikit-learn==0.20.3 ;fi
- $PYTHON -m pip install --user requests
# testing libraries
- if [[ "$WITH_PYTHON" == "ON" ]]; then $PYTHON -m pip install --user pytest==3.0.7 ;fi
- if [[ "$WITH_PYTHON" == "ON" ]]; then $PYTHON -m pip install --user pytest-cov ;fi
- if [[ "$WITH_PYTHON" == "ON" ]]; then $PYTHON -m pip install --user codecov ;fi
install:
# CMake upgrade
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget --no-check-certificate https://cmake.org/files/v3.13/cmake-3.13.1-Darwin-x86_64.tar.gz ;fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar -xzf cmake-3.13.1-Darwin-x86_64.tar.gz ;fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH=$PWD/cmake-3.13.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH ;fi
###############################################################################################################################################
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget --no-check-certificate https://cmake.org/files/v3.13/cmake-3.13.1-Linux-x86_64.tar.gz ;fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar -xzf cmake-3.13.1-Linux-x86_64.tar.gz ;fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=$PWD/cmake-3.13.1-Linux-x86_64/bin:$PATH ;fi
script:
- chmod 777 ./build.sh
- if [[ "$TRAVIS_COMPILER" == "clang" ]]; then bash ./build.sh "" OFF ;fi
- if [[ "$TRAVIS_COMPILER" == "gcc" ]]; then bash ./build.sh "" OFF ;fi
# python version
- if [[ "$WITH_PYTHON" == "ON" ]]; then $PYTHON setup.py develop --user ;fi
# c++ testing
- export LD_LIBRARY_PATH=$PWD/lib/:$LD_LIBRARY_PATH
- cd test
- chmod 777 ./run_test.sh
# Clang && MacOS have problems in loading new libraries
- if [[ "$TRAVIS_COMPILER" == "gcc" ]]; then if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./run_test.sh ;fi;fi
- cd ..
# python testing
- if [[ "$WITH_PYTHON" == "ON" ]]; then $PYTHON -m pytest ./ReplicatedFocusingBeliefPropagation/rfbp/test/ --cov=ReplicatedFocusingBeliefPropagation --cov-config=.coveragerc ;fi
after_succes:
- codecov