blob: a240836691ad5b6ff6e0c03fa64a8723d980b589 [file] [log] [blame]
Davide Pesavento97242f72020-02-29 14:28:15 -05001version: ~> 1.0
Davide Pesavento9412d122018-01-02 21:52:09 -05002language: cpp
Davide Pesavento97242f72020-02-29 14:28:15 -05003os: linux
Davide Pesaventocb672522019-09-23 17:40:14 -04004dist: bionic
Davide Pesavento97242f72020-02-29 14:28:15 -05005
6arch:
7 - amd64
8 - arm64
9 - ppc64le
10 - s390x
11
Davide Pesavento09348882016-09-17 02:39:44 +020012env:
13 global:
14 - JOB_NAME=limited-build
Davide Pesavento3cf90782017-08-10 01:21:20 -040015 - WAF_JOBS=2
Davide Pesavento97242f72020-02-29 14:28:15 -050016 jobs:
17 - COMPILER=g++-7
18 - COMPILER=g++-9
19 - COMPILER=clang++-6.0
20 - COMPILER=clang++-9
Davide Pesavento71430482017-06-08 20:06:40 -040021
Davide Pesavento97242f72020-02-29 14:28:15 -050022jobs:
Alexander Afanasyevce306ca2015-12-09 12:59:05 -080023 include:
Davide Pesavento97242f72020-02-29 14:28:15 -050024 # 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 Pesavento71430482017-06-08 20:06:40 -040031
Davide Pesavento97242f72020-02-29 14:28:15 -050032 # macOS
Davide Pesaventoca660f12018-06-16 14:01:51 -040033 - os: osx
34 osx_image: xcode9.4
Davide Pesavento97242f72020-02-29 14:28:15 -050035 env: # default compiler
Davide Pesaventod89f0022018-04-28 14:48:25 -040036 - os: osx
Davide Pesavento511712d2018-11-03 18:51:10 -040037 osx_image: xcode10.1
Davide Pesavento97242f72020-02-29 14:28:15 -050038 env: # default compiler
Davide Pesavento4fc90802019-02-21 15:20:44 -050039 - os: osx
Davide Pesaventocb672522019-09-23 17:40:14 -040040 osx_image: xcode10.3
Davide Pesavento97242f72020-02-29 14:28:15 -050041 env: # default compiler
Davide Pesavento4fc90802019-02-21 15:20:44 -050042 - os: osx
Davide Pesavento97242f72020-02-29 14:28:15 -050043 osx_image: xcode11.3
44 env: # default compiler
Davide Pesavento9412d122018-01-02 21:52:09 -050045
46 allow_failures:
Davide Pesavento97242f72020-02-29 14:28:15 -050047 - env: COMPILER=clang++-11
Davide Pesavento9412d122018-01-02 21:52:09 -050048
49 fast_finish: true
Davide Pesavento71430482017-06-08 20:06:40 -040050
Davide Pesavento97242f72020-02-29 14:28:15 -050051before_install:
52 - |
53 : Adding apt repositories
Davide Pesavento844b0932018-05-07 01:00:16 -040054 case ${COMPILER} in
Davide Pesavento97242f72020-02-29 14:28:15 -050055 g++-9)
56 # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
Davide Pesavento844b0932018-05-07 01:00:16 -040057 travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
58 travis_retry sudo apt-get -qq update
Davide Pesavento844b0932018-05-07 01:00:16 -040059 ;;
Davide Pesavento97242f72020-02-29 14:28:15 -050060 clang++-1?)
61 # https://apt.llvm.org/
Davide Pesaventocb672522019-09-23 17:40:14 -040062 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 Pesavento97242f72020-02-29 14:28:15 -050064 travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/${TRAVIS_DIST}/ ${LLVM_REPO%-11} main"
Davide Pesavento844b0932018-05-07 01:00:16 -040065 travis_retry sudo apt-get -qq update
Davide Pesavento844b0932018-05-07 01:00:16 -040066 ;;
67 esac
68
Davide Pesaventocb672522019-09-23 17:40:14 -040069install:
Davide Pesavento97242f72020-02-29 14:28:15 -050070 - |
71 : Installing C++ compiler
72 if [[ -n ${COMPILER} ]]; then
73 travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang}
74 fi
Davide Pesaventocb672522019-09-23 17:40:14 -040075
Davide Pesavento71430482017-06-08 20:06:40 -040076before_script:
Davide Pesavento97242f72020-02-29 14:28:15 -050077 - |
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 Pesavento71430482017-06-08 20:06:40 -0400108 - ${CXX:-c++} --version
109
Alexander Afanasyevb4500d92014-01-17 20:43:24 -0800110script:
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -0400111 - ./.jenkins