blob: ccb9f9f1e94e9d466f599e7d65e0dc8f6e0a254f [file] [log] [blame]
Davide Pesavento9fa6a782020-03-10 19:47:06 -04001version: ~> 1.0
Davide Pesavento9a659d02018-01-10 02:55:43 -05002language: cpp
Davide Pesavento9fa6a782020-03-10 19:47:06 -04003os: linux
Davide Pesaventocbef7b82019-10-09 00:15:13 -04004dist: bionic
Davide Pesavento9fa6a782020-03-10 19:47:06 -04005
6arch:
7 - amd64
8 - arm64
9 - ppc64le
10 - s390x
11
Eric Newberry9737aa82016-12-27 23:03:49 -070012env:
Davide Pesavento9fa6a782020-03-10 19:47:06 -040013 - COMPILER=g++-7
14 - COMPILER=g++-9
15 - COMPILER=clang++-6.0
16 - COMPILER=clang++-9
Davide Pesaventof085ed12017-06-30 14:59:52 -040017
Davide Pesavento9fa6a782020-03-10 19:47:06 -040018jobs:
Davide Pesavento4a1edc62016-05-03 18:03:19 +020019 include:
Davide Pesavento9fa6a782020-03-10 19:47:06 -040020 # Linux
21 - env: COMPILER=g++-8
22 - env: COMPILER=clang++-5.0
23 - env: COMPILER=clang++-7
24 - env: COMPILER=clang++-8
25 - env: COMPILER=clang++-10
26 - env: COMPILER=clang++-11
Davide Pesaventof085ed12017-06-30 14:59:52 -040027
Davide Pesavento9fa6a782020-03-10 19:47:06 -040028 # macOS
Davide Pesavento302941e2018-07-21 18:55:56 -040029 - os: osx
30 osx_image: xcode9.4
Davide Pesavento9fa6a782020-03-10 19:47:06 -040031 env: # default compiler
Davide Pesavento88beb4d2018-09-11 18:14:18 -040032 - os: osx
Davide Pesavento162bdbb2018-11-06 16:00:44 -050033 osx_image: xcode10.1
Davide Pesavento9fa6a782020-03-10 19:47:06 -040034 env: # default compiler
Davide Pesaventoc16ec572019-03-18 18:40:48 -040035 - os: osx
Davide Pesaventocbef7b82019-10-09 00:15:13 -040036 osx_image: xcode10.3
Davide Pesavento9fa6a782020-03-10 19:47:06 -040037 env: # default compiler
Davide Pesaventoc1eb2fc2019-07-17 15:44:33 -040038 - os: osx
Davide Pesavento9fa6a782020-03-10 19:47:06 -040039 osx_image: xcode11.3
40 env: # default compiler
Davide Pesavento9a659d02018-01-10 02:55:43 -050041
42 allow_failures:
Davide Pesavento9fa6a782020-03-10 19:47:06 -040043 - env: COMPILER=clang++-11
Davide Pesavento9a659d02018-01-10 02:55:43 -050044
45 fast_finish: true
Davide Pesaventof085ed12017-06-30 14:59:52 -040046
Davide Pesavento9fa6a782020-03-10 19:47:06 -040047before_install:
48 - |
49 : Adding apt repositories
Davide Pesavento26ea1ac2018-05-10 20:20:03 -040050 case ${COMPILER} in
Davide Pesavento9fa6a782020-03-10 19:47:06 -040051 g++-9)
52 # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
Davide Pesavento26ea1ac2018-05-10 20:20:03 -040053 travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
54 travis_retry sudo apt-get -qq update
Davide Pesavento26ea1ac2018-05-10 20:20:03 -040055 ;;
Davide Pesavento9fa6a782020-03-10 19:47:06 -040056 clang++-1?)
57 # https://apt.llvm.org/
Davide Pesaventocbef7b82019-10-09 00:15:13 -040058 LLVM_REPO=${COMPILER/clang++/llvm-toolchain-${TRAVIS_DIST}}
59 travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
Davide Pesavento9fa6a782020-03-10 19:47:06 -040060 travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/${TRAVIS_DIST}/ ${LLVM_REPO%-11} main"
Davide Pesavento26ea1ac2018-05-10 20:20:03 -040061 travis_retry sudo apt-get -qq update
Davide Pesavento26ea1ac2018-05-10 20:20:03 -040062 ;;
63 esac
64
Davide Pesaventocbef7b82019-10-09 00:15:13 -040065install:
Davide Pesavento9fa6a782020-03-10 19:47:06 -040066 - |
67 : Installing C++ compiler
68 if [[ -n ${COMPILER} ]]; then
69 travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang}
70 fi
Davide Pesaventocbef7b82019-10-09 00:15:13 -040071
Davide Pesaventof085ed12017-06-30 14:59:52 -040072before_script:
Davide Pesavento9fa6a782020-03-10 19:47:06 -040073 - |
74 : Setting environment variables
75 if [[ -n ${COMPILER} ]]; then
76 export CXX=${COMPILER}
77 fi
78 case ${TRAVIS_OS_NAME} in
79 linux) export NODE_LABELS="Linux Ubuntu Ubuntu-18.04" ;;
80 osx) export NODE_LABELS="OSX OSX-$(sw_vers -productVersion | cut -d . -f -2)" ;;
81 esac
82 export WAF_JOBS=2
83 - |
84 : Enabling workarounds
85 case "${TRAVIS_CPU_ARCH},${COMPILER}" in
86 ppc64le,g++-7)
87 # AddressSanitizer does not seem to be working
88 export DISABLE_ASAN=yes
89 ;;
90 *,clang++-8)
91 # https://bugs.llvm.org/show_bug.cgi?id=40808
92 export DISABLE_ASAN=yes
93 ;;
94 esac
95 if [[ ${TRAVIS_OS_NAME} == osx ]]; then
96 # Do not waste time upgrading useless packages
97 brew pin cgal gdal postgis sfcgal || true
98 # Ensure /usr/local/opt/openssl exists
99 brew reinstall openssl || true
100 fi
Davide Pesaventof085ed12017-06-30 14:59:52 -0400101 - ${CXX:-c++} --version
102
Joao Pereiraef326da2015-05-27 18:27:40 -0400103script:
Joao Pereiraef326da2015-05-27 18:27:40 -0400104 - ./.jenkins