Debian Codegraph @

.travis.yml

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
•1 language: cpp
2 # Use the latest Travis images since they are more up to date than the stable release.
3 group: edge
4
5 before_script:
6 - export -f travis_fold
7
8 script:
9 - "bash -ex .travis-ci.sh"
10
11 addons:
12 apt:
13 packages: &base_build
14 # This is the absolute minimum for configure to pass
15 # Non C++ based tasks use it so they can run make builtfiles
16 - ccache
17 - libcppunit-dev
18 - bison
19 - flex
20 - uuid-dev
21 - libprotobuf-dev
22 - protobuf-compiler
23 - libprotoc-dev
24 packages: &core_build
25 # This is all the bits we need to enable all options
26 - *base_build
27 - libftdi-dev
28 - libftdi1
29 - libusb-1.0-0-dev
30 - liblo-dev
31 - libavahi-glib1
32 - libncurses5-dev
33 - libmicrohttpd-dev
34 packages: &core_build_clang_recent
35 - *core_build
36 - clang-10
37 packages: &core_build_gpp_latest
38 - *core_build
39 - g++-10
40 packages: &core_build_clang_latest
41 - *core_build
42 - clang-11
43 packages: &bionic_build_extras
44 # To fix the build/add missing components
45 - libtool
46 - pkg-config
47 packages: &bionic_build_extras_python2
48 - *bionic_build_extras
49 - python-protobuf
50 - python-numpy
51 - python-pip
52 packages: &bionic_build_extras_python3
53 - *bionic_build_extras
54 # The apt packaged files don't seem to work with Bionic and Python 3, so do it via pip
55 # To compile numpy
56 - python3-dev
57 # - python3-protobuf
58 # - python3-numpy
59 # - python3-pip
60 homebrew:
61 packages: &mac_core_build
62 - ccache
63 # This is all the bits we need to enable all options on Mac
64 - bison
65 - flex
66 # Installing via the addon isn't currently working so do it the old fashioned way below
67 # - https://raw.githubusercontent.com/Homebrew/homebrew-core/024ca9a4730a1f26ceede43485fbf62ef6f41179%5E/Formula/[email protected]
68 - liblo
69 - libmicrohttpd
70 - ossp-uuid
71 # Looks like this is Python 3 only, so install via pip
72 # - numpy
73 - libusb
74 packages: &mac_cppunit_113
75 # Installing via the addon isn't currently working so do it the old fashioned way below
76 # - https://raw.githubusercontent.com/Homebrew/homebrew-core/e6e43cf6a3^/Formula/cppunit.rb # install a slightly older cppunit, as latest needs C++11 support
77
78 jobs:
79 fast_finish: true
80 include:
81 - os: linux
82 dist: bionic
83 arch: arm64
84 env: TASK='doxygen'
85 addons:
86 apt:
87 packages:
88 - *core_build_gpp_latest
89 - *bionic_build_extras_python2
90 - doxygen
91 - graphviz
92 sources:
93 - ubuntu-toolchain-r-test
94 - os: linux
95 dist: bionic
96 arch: arm64
97 env: TASK='lint'
98 addons:
99 apt:
100 packages:
101 - *core_build
102 - *bionic_build_extras_python2
103 - os: linux
104 dist: bionic
105 arch: arm64
106 env:
107 - TASK='check-licences'
108 - PYTHON='python3'
109 addons:
110 apt:
111 packages:
112 - *core_build
113 - *bionic_build_extras_python3
114 - os: linux
115 dist: bionic
116 arch: arm64
117 env:
118 - TASK='codespell'
119 - PYTHON='python3'
120 addons:
121 apt:
122 packages:
123 - *core_build
124 - *bionic_build_extras_python3
125 - moreutils
126 - os: linux
127 dist: bionic
128 arch: arm64
129 env: TASK='jshint'
130 addons:
131 apt:
132 packages:
133 - os: linux
134 dist: bionic
135 arch: arm64
136 env: TASK='flake8'
137 python: '2.7'
138 addons:
139 apt:
140 packages:
141 - *base_build
142 - *bionic_build_extras_python2
143 - os: linux
144 dist: bionic
145 arch: arm64
146 env:
147 - TASK='flake8'
148 - PYTHON='python3'
149 addons:
150 apt:
151 packages:
152 - *base_build
153 - *bionic_build_extras_python3
154 # Only run Travis builds against the zero credit partner queue solution
155 # - os: linux
156 # dist: bionic
157 # arch: amd64
158 # compiler: clang
159 # env:
160 # - TASK='compile'
161 # - PYTHON='python3'
162 # addons:
163 # apt:
164 # packages:
165 # - *core_build_clang_latest
166 # - *bionic_build_extras_python3
167 # sources:
168 # - sourceline: "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main"
169 # key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
170 # - sourceline: "ppa:ubuntu-toolchain-r/test"
171 # - os: linux
172 # dist: bionic
173 # arch: amd64
174 # compiler: gcc
175 # env: TASK='compile'
176 # python: '2.7'
177 # addons:
178 # apt:
179 # packages:
180 # - *core_build_gpp_latest
181 # - *bionic_build_extras_python2
182 # sources:
183 # - ubuntu-toolchain-r-test
184 - os: linux
185 dist: bionic
186 arch: arm64
187 compiler: clang
188 env:
189 - TASK='compile'
190 - PYTHON='python3'
191 addons:
192 apt:
193 packages:
194 - *core_build_clang_recent
195 - *bionic_build_extras_python3
196 - os: linux
197 dist: bionic
198 arch: arm64
199 compiler: gcc
200 env: TASK='compile'
201 python: '2.7'
202 addons:
203 apt:
204 packages:
205 - *core_build_gpp_latest
206 - *bionic_build_extras_python2
207 sources:
208 - ubuntu-toolchain-r-test
209 - os: linux
210 dist: bionic
211 arch: s390x
212 compiler: clang
213 env: TASK='compile'
214 python: '2.7'
215 addons:
216 apt:
217 packages:
218 - *core_build_clang_recent
219 - *bionic_build_extras_python2
220 - os: linux
221 dist: bionic
222 arch: s390x
223 compiler: gcc
224 env: TASK='compile'
225 python: '2.7'
226 addons:
227 apt:
228 packages:
229 - *core_build_gpp_latest
230 - *bionic_build_extras_python2
231 sources:
232 - ubuntu-toolchain-r-test
233 # - os: osx
234 # osx_image: xcode9.4
235 # compiler: clang
236 # env:
237 # - TASK='compile'
238 # - CPPUNIT='1.13'
239 # - PROTOBUF='latest'
240 # - LIBFTDI='0'
241 # addons:
242 # homebrew:
243 # packages:
244 # - *mac_core_build
245 # - *mac_cppunit_113
246 # - protobuf
247 # - libftdi0
248 # update: false
249 # - os: osx
250 # osx_image: xcode9.4
251 # compiler: gcc
252 # env:
253 # - TASK='compile'
254 # - CPPUNIT='1.13'
255 # - PROTOBUF='latest'
256 # - LIBFTDI='0'
257 # addons:
258 # homebrew:
259 # packages:
260 # - *mac_core_build
261 # - *mac_cppunit_113
262 # - protobuf
263 # - libftdi0
264 # update: false
265 # - os: osx
266 # osx_image: xcode9.4
267 # compiler: clang
268 # env:
269 # - TASK='compile'
270 # - CPPUNIT='1.14'
271 # - PROTOBUF='latest'
272 # - LIBFTDI='0'
273 # addons:
274 # homebrew:
275 # packages:
276 # - *mac_core_build
277 # - cppunit
278 # - protobuf
279 # - libftdi0
280 # update: false
281 # - os: osx
282 # osx_image: xcode9.4
283 # compiler: gcc
284 # env:
285 # - TASK='compile'
286 # - CPPUNIT='1.14'
287 # - PROTOBUF='latest'
288 # - LIBFTDI='0'
289 # addons:
290 # homebrew:
291 # packages:
292 # - *mac_core_build
293 # - cppunit
294 # - protobuf
295 # - libftdi0
296 # update: false
297 # - os: osx
298 # osx_image: xcode9.4
299 # compiler: clang
300 # env:
301 # - TASK='compile'
302 # - CPPUNIT='1.14'
303 # - PROTOBUF='latest'
304 # - LIBFTDI='1'
305 # addons:
306 # homebrew:
307 # packages:
308 # - *mac_core_build
309 # - cppunit
310 # - protobuf
311 # - libftdi # install the latest cppunit, which needs C++11
312 # update: false
313 # - os: osx
314 # osx_image: xcode9.4
315 # compiler: gcc
316 # env:
317 # - TASK='compile'
318 # - CPPUNIT='1.14'
319 # - PROTOBUF='latest'
320 # - LIBFTDI='1'
321 # addons:
322 # homebrew:
323 # packages:
324 # - *mac_core_build
325 # - cppunit
326 # - protobuf
327 # - libftdi # install the latest cppunit, which needs C++11
328 # update: false
329 - os: linux
330 dist: bionic
331 arch: arm64
332 compiler: gcc
333 env: TASK='coverage'
334 addons:
335 apt:
336 packages:
337 - *core_build_gpp_latest
338 sources:
339 - sourceline: "ppa:ubuntu-toolchain-r/test"
340 - os: linux
341 dist: xenial
342 arch: arm64
343 compiler: gcc
344 env: TASK='coverity'
345 addons:
346 apt:
347 packages:
348 # Coverity doesn't work with g++-5 or g++-6 yet
349 - *core_build
350 - g++-4.9
351 sources:
352 - sourceline: "ppa:ubuntu-toolchain-r/test"
353 - os: linux
354 dist: bionic
355 arch: arm64
356 env: TASK='spellintian'
357 addons:
358 apt:
359 packages:
360 - *core_build
361 - *bionic_build_extras_python2
362 - lintian
363 - moreutils
364 - os: linux
365 dist: bionic
366 arch: arm64
367 env: TASK='spellintian-duplicates'
368 addons:
369 apt:
370 packages:
371 - *core_build
372 - *bionic_build_extras_python2
373 - lintian
374 - moreutils
375 allow_failures:
376 # - os: osx
377 # osx_image: xcode9.4
378 # compiler: clang
379 # env:
380 # - TASK='compile'
381 # - CPPUNIT='1.13'
382 # - LIBFTDI='0'
383 # - os: osx
384 # osx_image: xcode9.4
385 # compiler: clang
386 # env:
387 # - TASK='compile'
388 # - CPPUNIT='1.14'
389 # - LIBFTDI='0'
390 # - os: osx
391 # osx_image: xcode9.4
392 # compiler: gcc
393 # env:
394 # - TASK='compile'
395 # - CPPUNIT='1.13'
396 # - LIBFTDI='0'
397 # - os: osx
398 # osx_image: xcode9.4
399 # compiler: gcc
400 # env:
401 # - TASK='compile'
402 # - CPPUNIT='1.14'
403 # - LIBFTDI='0'
404 # - os: osx
405 # osx_image: xcode9.4
406 # compiler: clang
407 # env:
408 # - TASK='compile'
409 # - CPPUNIT='1.14'
410 # - LIBFTDI='1'
411 # - os: osx
412 # osx_image: xcode9.4
413 # compiler: gcc
414 # env:
415 # - TASK='compile'
416 # - CPPUNIT='1.14'
417 # - LIBFTDI='1'
418 - os: osx
419 osx_image: xcode9.4
420 compiler: clang
421 env:
422 - TASK='compile'
423 - CPPUNIT='1.14'
424 - PROTOBUF='latest'
425 - LIBFTDI='1'
426 - os: osx
427 osx_image: xcode9.4
428 compiler: gcc
429 env:
430 - TASK='compile'
431 - CPPUNIT='1.14'
432 - PROTOBUF='latest'
433 - LIBFTDI='1'
434 - os: linux
435 dist: bionic
436 arch: arm64
437 compiler: gcc
438 env: TASK='coverage'
439 - os: linux
440 dist: xenial
441 arch: arm64
442 compiler: gcc
443 env: TASK='coverity'
444 - os: linux
445 dist: bionic
446 arch: arm64
447 env: TASK='spellintian'
448 - os: linux
449 dist: bionic
450 arch: arm64
451 env: TASK='spellintian-duplicates'
452
453 env:
454 global:
455 # No colours in terminal (to reduce log file size)
456 - TERM=dumb
457 # Parallel make build
458 - MAKEFLAGS="-j 2"
459 # -- BEGIN Coverity Scan ENV
460 - COVERITY_SCAN_BUILD_COMMAND_PREPEND="cov-configure --comptype gcc --compiler gcc-4.9 --template && autoreconf -i && ./configure --enable-ja-rule --enable-e133"
461 # The build command with all of the arguments that you would apply to a manual `cov-build`
462 # Usually this is the same as STANDARD_BUILD_COMMAND, excluding the automated test arguments
463 - COVERITY_SCAN_BUILD_COMMAND="make"
464 # Name of the project
465 - COVERITY_SCAN_PROJECT_NAME="$TRAVIS_REPO_SLUG"
466 # Email address for notifications related to this build
467 - COVERITY_SCAN_NOTIFICATION_EMAIL="[email protected]"
468 # Regular expression selects on which branches to run analysis
469 # Be aware of quotas. Do not run on every branch/commit
470 - COVERITY_SCAN_BRANCH_PATTERN=".*"
471 # COVERITY_SCAN_TOKEN via "travis encrypt" using the repo's public key
472 - secure: "U+NmPtScHZ1NLmkDrzpqApHmJvELV44cXgjQsxA8N8xIATckbs+DrmWSNeECENyvuOPz+nPzglSgBvJtejf97jYJIIwAExq5TJMUAIPFS6KU3mohODW2PZSoVoUyJPzFIlhzcELQgONI+ILLm29lNdQNb7GFUVtO6+jS10AFtWY="
473 # -- END Coverity Scan ENV
474
475 cache:
476 apt: true
477 ccache: true
478 npm: true
479 pip: true
480 directories:
481 - $HOME/Library/Caches/Homebrew # homebrew bottle cache
482
483 before_cache:
484 - rm -f $HOME/.cache/pip/log/debug.log # erase log
485 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cleanup; fi # avoid caching old package versions
486 - ccache -s # see how many hits ccache got
487
488 before_install:
489 - if [ "$PYTHON" == "python3" -a "$TRAVIS_CPU_ARCH" != "arm64" ]; then pyenv global 3.8.1; fi
490 #On arm64 (at least) pip is now pip3, so symlink it to pip2 unless we're using python3.
491 - if [ "$PYTHON" != "python3" ]; then sudo rm /usr/local/bin/pip && sudo ln -s /usr/local/bin/pip2 /usr/local/bin/pip; fi
492 #Switch node to version 16 LTS, as newer LTS ones don't work with Ubuntu 18.04 and some older ones are too old
493 - if [ "$TASK" = "jshint" ]; then nvm install 16 && nvm use 16; fi
494 #Fix permissions for unbound (and possibly others)
495 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [ ! -d /usr/local/sbin ]; then sudo mkdir -p /usr/local/sbin && sudo chown -R $(whoami) /usr/local/sbin; fi; fi
496 #Add a missing gnupg folder
497 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [ ! -d /usr/local/Cellar/gnupg2/2.2.5 ]; then sudo mkdir -p /usr/local/Cellar/gnupg2/2.2.5 && sudo chown -R $(whoami) /usr/local/Cellar/gnupg2/2.2.5; fi; fi
498 #We install packages via brew which pull in numpy, so try a reinstall over the pip numpy to avoid conflicts
499 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew reinstall numpy || brew link --overwrite numpy; fi
500 #Fix a broken homebrew libtool install
501 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew reinstall libtool; fi
502 #Fix a broken homebrew gnupg install
503 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew uninstall --ignore-dependencies gnupg; fi
504 #Fix a broken homebrew python upgrade - see https://github.com/Homebrew/homebrew-core/issues/26358
505 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python || true; fi
506 #Uninstall some homebrew packages which aren't required so we don't end up updating and rebuilding them. Force so it doesn't reinstall
507 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew uninstall --ignore-dependencies --force cgal liblwgeom libspatialite mercurial postgis postgres sfcgal; fi
508 #Having fixed everything up, update to the bleeding edge
509 #Skip updating for now as it seems to be breaking the build, also now done via the addon
510 # - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
511 # This is no longer allowed, so build all Mac builds as protobuf latest
512 #- if [ "$TRAVIS_OS_NAME" == "osx" -a "$PROTOBUF" != "latest" ]; then brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/024ca9a4730a1f26ceede43485fbf62ef6f41179%5E/Formula/[email protected]; fi # install protobuf 3.1 as that's the latest we support everywhere
513 #- if [ "$TRAVIS_OS_NAME" == "osx" -a "$PROTOBUF" != "latest" ]; then brew link -f https://raw.githubusercontent.com/Homebrew/homebrew-core/024ca9a4730a1f26ceede43485fbf62ef6f41179%5E/Formula/[email protected]; export PKG_CONFIG_PATH=/usr/local/opt/[email protected]/lib/pkgconfig; brew install --build-from-source --ignore-dependencies --env=std protobuf-c; fi # While protobuf is not on the latest release
514 - if [ "$TRAVIS_OS_NAME" == "osx" -a "$PROTOBUF" != "latest" ]; then brew install [email protected]; fi
515 - if [ "$TRAVIS_OS_NAME" == "osx" -a "$PROTOBUF" != "latest" ]; then brew link -f [email protected]; export PKG_CONFIG_PATH=/usr/local/opt/[email protected]/lib/pkgconfig; brew install --build-from-source --ignore-dependencies --env=std protobuf-c; fi # When protobuf is not on the latest release
516 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir -p ${HOME}/Library/Python/2.7/lib/python/site-packages; echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> ${HOME}/Library/Python/2.7/lib/python/site-packages/homebrew.pth; fi
517 - if [ "$TRAVIS_OS_NAME" == "osx" -a "$CPPUNIT" != "1.14" ]; then brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/e6e43cf6a3%5E/Formula/cppunit.rb; fi # install a slightly older cppunit, as latest needs C++11 support
518 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then PATH=/usr/local/opt/ccache/libexec:$PATH; fi # Use ccache on Mac too
519 #Put back the old pip numpy we need to work
520 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip install --upgrade --no-deps --force-reinstall --user numpy; fi
521 #Coverity doesn't work with g++ 5 or 6, so only upgrade to g++ 4.9 for that
522 - if [ "$TRAVIS_OS_NAME" == "linux" -a \( "$TASK" = "compile" -o "$TASK" = "coverage" -o "$TASK" = "doxygen" \) -a "$CXX" = "g++" ]; then export CXX="ccache g++-10" CC="ccache gcc-10"; fi
523 - if [ "$TASK" = "coverity" -a "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
524 #Use the latest clang if we're compiling with clang, except on arm64 and s390x where it's not available
525 - if [ "$TRAVIS_OS_NAME" == "linux" -a "$CXX" = "clang++" -a "$TRAVIS_CPU_ARCH" != "arm64" -a "$TRAVIS_CPU_ARCH" != "s390x" ]; then export CXX="clang++-11" CC="clang-11"; fi
526 #Use a recent clang if we're compiling with clang on arm64 or s390x as the latest isn't available
527 - if [ "$TRAVIS_OS_NAME" == "linux" -a "$CXX" = "clang++" -a \( "$TRAVIS_CPU_ARCH" == "arm64" -o "$TRAVIS_CPU_ARCH" == "s390x" \) ]; then export CXX="clang++-10" CC="clang-10"; fi
528 #Report the compiler version
529 - $CXX --version
530
531 install:
532 # Match the version of protobuf being installed via apt/Homebrew
533 - if [ "$PROTOBUF" == "latest" -a \( "$TRAVIS_DIST" != "bionic" -o "$PYTHON" == "python3" \) ]; then pip install --user protobuf; fi
534 - if [ "$PROTOBUF" != "latest" -a \( "$TRAVIS_DIST" != "bionic" -o "$PYTHON" == "python3" \) ]; then pip install --user protobuf==3.1.0; fi
535 # disable until can be added to all build variants
536 #- pip install --user timeout-decorator
537 # We sometimes need to use pip rather than apt on Bionic
538 - if [ "$TRAVIS_OS_NAME" == "linux" -a "$TRAVIS_DIST" == "bionic" -a "$TRAVIS_CPU_ARCH" != "arm64" ]; then pip install --user wheel; fi # Wheel only needed to fix a broken bionic build
539 # Install numpy via deb where it works, otherwise on OS X and non-bionic Python 2 Linux install via pip
540 - if [ "$TRAVIS_DIST" != "bionic" -o "$PYTHON" == "python3" ]; then pip install --user numpy; fi
541 - if [ "$TASK" = "coverage" ]; then pip install --user cpp-coveralls; fi
542 - if [ "$TASK" = "flake8" ]; then pip install --user flake8; fi
543 - if [ "$TASK" = "codespell" ]; then pip3 install --user codespell==2.2.1; fi
544 - if [ "$TASK" = "jshint" ]; then npm --verbose install -g grunt-cli; fi
545 - if [ "$TASK" = "jshint" ]; then grunt --version --verbose; fi
546 # Installing via the addon isn't currently working so do it the old fashioned way
547 - if [ "$TRAVIS_OS_NAME" == "osx" -a "$CPPUNIT" != "1.14" ]; then brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/e6e43cf6a3%5E/Formula/cppunit.rb; fi # install a slightly older cppunit, as latest needs C++11 support
548
549 after_failure:
550 - if [ -f ${TRAVIS_BUILD_DIR}/config.log ]; then cat ${TRAVIS_BUILD_DIR}/config.log; fi
551 - if [ -f ${TRAVIS_BUILD_DIR}/ola-*/_build/config.log ]; then cat ${TRAVIS_BUILD_DIR}/ola-*/_build/config.log; fi
552 - if [ -f ${TRAVIS_BUILD_DIR}/ola-*/_build/sub/config.log ]; then cat ${TRAVIS_BUILD_DIR}/ola-*/_build/sub/config.log; fi
553
554 after_success:
555 - if [ "$TASK" = "coverage" ]; then coveralls --gcov /usr/bin/gcov-10 -b . -E '.*Test\.cpp$' -E '.*\.pb\.cc$' -E '.*\.pb\.cpp$' -E '.*\.pb\.h$' -E '.*\.yy\.cpp$' -E '.*\.tab\.cpp$' -E '.*\.tab\.h$' -E '.*/doxygen/examples.*$' --gcov-options '\-lp' > /dev/null; fi
556
557 after_script:
558 - if [ "$TASK" = "coverity" ]; then tail -n 10000 ${TRAVIS_BUILD_DIR}/cov-int/build-log.txt; cat ${TRAVIS_BUILD_DIR}/cov-int/scm_log.txt; fi
559
560 notifications:
561 irc:
562 channels:
563 - "chat.freenode.net#openlighting"
564 on_success: change
565 on_failure: change