Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 1 | version: ~> 1.0 |
Davide Pesavento | 9412d12 | 2018-01-02 21:52:09 -0500 | [diff] [blame] | 2 | language: cpp |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 3 | os: linux |
Davide Pesavento | cb67252 | 2019-09-23 17:40:14 -0400 | [diff] [blame] | 4 | dist: bionic |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 5 | |
| 6 | arch: |
| 7 | - amd64 |
| 8 | - arm64 |
| 9 | - ppc64le |
| 10 | - s390x |
| 11 | |
Davide Pesavento | 0934888 | 2016-09-17 02:39:44 +0200 | [diff] [blame] | 12 | env: |
| 13 | global: |
| 14 | - JOB_NAME=limited-build |
Davide Pesavento | 3cf9078 | 2017-08-10 01:21:20 -0400 | [diff] [blame] | 15 | - WAF_JOBS=2 |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 16 | jobs: |
| 17 | - COMPILER=g++-7 |
| 18 | - COMPILER=g++-9 |
| 19 | - COMPILER=clang++-6.0 |
| 20 | - COMPILER=clang++-9 |
Davide Pesavento | 7143048 | 2017-06-08 20:06:40 -0400 | [diff] [blame] | 21 | |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 22 | jobs: |
Alexander Afanasyev | ce306ca | 2015-12-09 12:59:05 -0800 | [diff] [blame] | 23 | include: |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 24 | # Linux |
| 25 | - env: COMPILER=g++-8 |
| 26 | - env: COMPILER=clang++-5.0 |
| 27 | - env: COMPILER=clang++-7 |
| 28 | - env: COMPILER=clang++-8 |
| 29 | - env: COMPILER=clang++-10 |
| 30 | - env: COMPILER=clang++-11 |
Davide Pesavento | 7143048 | 2017-06-08 20:06:40 -0400 | [diff] [blame] | 31 | |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 32 | # macOS |
Davide Pesavento | ca660f1 | 2018-06-16 14:01:51 -0400 | [diff] [blame] | 33 | - os: osx |
| 34 | osx_image: xcode9.4 |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 35 | env: # default compiler |
Davide Pesavento | d89f002 | 2018-04-28 14:48:25 -0400 | [diff] [blame] | 36 | - os: osx |
Davide Pesavento | 511712d | 2018-11-03 18:51:10 -0400 | [diff] [blame] | 37 | osx_image: xcode10.1 |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 38 | env: # default compiler |
Davide Pesavento | 4fc9080 | 2019-02-21 15:20:44 -0500 | [diff] [blame] | 39 | - os: osx |
Davide Pesavento | cb67252 | 2019-09-23 17:40:14 -0400 | [diff] [blame] | 40 | osx_image: xcode10.3 |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 41 | env: # default compiler |
Davide Pesavento | 4fc9080 | 2019-02-21 15:20:44 -0500 | [diff] [blame] | 42 | - os: osx |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 43 | osx_image: xcode11.3 |
| 44 | env: # default compiler |
Davide Pesavento | 9412d12 | 2018-01-02 21:52:09 -0500 | [diff] [blame] | 45 | |
| 46 | allow_failures: |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 47 | - env: COMPILER=clang++-11 |
Davide Pesavento | 9412d12 | 2018-01-02 21:52:09 -0500 | [diff] [blame] | 48 | |
| 49 | fast_finish: true |
Davide Pesavento | 7143048 | 2017-06-08 20:06:40 -0400 | [diff] [blame] | 50 | |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 51 | before_install: |
| 52 | - | |
| 53 | : Adding apt repositories |
Davide Pesavento | 844b093 | 2018-05-07 01:00:16 -0400 | [diff] [blame] | 54 | case ${COMPILER} in |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 55 | g++-9) |
| 56 | # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages |
Davide Pesavento | 844b093 | 2018-05-07 01:00:16 -0400 | [diff] [blame] | 57 | travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test |
| 58 | travis_retry sudo apt-get -qq update |
Davide Pesavento | 844b093 | 2018-05-07 01:00:16 -0400 | [diff] [blame] | 59 | ;; |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 60 | clang++-1?) |
| 61 | # https://apt.llvm.org/ |
Davide Pesavento | cb67252 | 2019-09-23 17:40:14 -0400 | [diff] [blame] | 62 | LLVM_REPO=${COMPILER/clang++/llvm-toolchain-${TRAVIS_DIST}} |
| 63 | travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add - |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 64 | travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/${TRAVIS_DIST}/ ${LLVM_REPO%-11} main" |
Davide Pesavento | 844b093 | 2018-05-07 01:00:16 -0400 | [diff] [blame] | 65 | travis_retry sudo apt-get -qq update |
Davide Pesavento | 844b093 | 2018-05-07 01:00:16 -0400 | [diff] [blame] | 66 | ;; |
| 67 | esac |
| 68 | |
Davide Pesavento | cb67252 | 2019-09-23 17:40:14 -0400 | [diff] [blame] | 69 | install: |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 70 | - | |
| 71 | : Installing C++ compiler |
| 72 | if [[ -n ${COMPILER} ]]; then |
| 73 | travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang} |
| 74 | fi |
Davide Pesavento | cb67252 | 2019-09-23 17:40:14 -0400 | [diff] [blame] | 75 | |
Davide Pesavento | 7143048 | 2017-06-08 20:06:40 -0400 | [diff] [blame] | 76 | before_script: |
Davide Pesavento | 97242f7 | 2020-02-29 14:28:15 -0500 | [diff] [blame^] | 77 | - | |
| 78 | : Setting environment variables |
| 79 | case ${TRAVIS_OS_NAME} in |
| 80 | linux) export NODE_LABELS="Linux Ubuntu Ubuntu-18.04" ;; |
| 81 | osx) export NODE_LABELS="OSX OSX-$(sw_vers -productVersion | cut -d . -f -2)" ;; |
| 82 | esac |
| 83 | if [[ -n ${COMPILER} ]]; then |
| 84 | export CXX=${COMPILER} |
| 85 | fi |
| 86 | - | |
| 87 | : Enabling workarounds |
| 88 | case "${TRAVIS_CPU_ARCH},${COMPILER}" in |
| 89 | arm64,g++*) |
| 90 | # Avoid exceeding the per-job time limit |
| 91 | export DISABLE_HEADERS_CHECK=yes |
| 92 | ;; |
| 93 | ppc64le,g++-7) |
| 94 | # AddressSanitizer does not seem to be working |
| 95 | export DISABLE_ASAN=yes |
| 96 | ;; |
| 97 | *,clang++-8) |
| 98 | # https://bugs.llvm.org/show_bug.cgi?id=40808 |
| 99 | export DISABLE_ASAN=yes |
| 100 | ;; |
| 101 | esac |
| 102 | if [[ ${TRAVIS_OS_NAME} == osx ]]; then |
| 103 | # Do not waste time upgrading useless packages |
| 104 | brew pin cgal gdal postgis sfcgal || true |
| 105 | # Ensure /usr/local/opt/openssl exists |
| 106 | brew reinstall openssl || true |
| 107 | fi |
Davide Pesavento | 7143048 | 2017-06-08 20:06:40 -0400 | [diff] [blame] | 108 | - ${CXX:-c++} --version |
| 109 | |
Alexander Afanasyev | b4500d9 | 2014-01-17 20:43:24 -0800 | [diff] [blame] | 110 | script: |
Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 111 | - ./.jenkins |