blob: 1ab91c55d6a49d46f84893d5949e626f34d62ba2 [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
Davide Pesaventob07d7a92020-05-13 23:30:07 -040021 - env: COMPILER=g++-5
22 - env: COMPILER=g++-6
Davide Pesavento9fa6a782020-03-10 19:47:06 -040023 - env: COMPILER=g++-8
Davide Pesaventob07d7a92020-05-13 23:30:07 -040024 - env: COMPILER=clang++-4.0
Davide Pesavento9fa6a782020-03-10 19:47:06 -040025 - env: COMPILER=clang++-5.0
26 - env: COMPILER=clang++-7
27 - env: COMPILER=clang++-8
28 - env: COMPILER=clang++-10
29 - env: COMPILER=clang++-11
Davide Pesavento02ec47c2020-08-09 02:23:07 -040030 - env: COMPILER=clang++-12
Davide Pesaventof085ed12017-06-30 14:59:52 -040031
Davide Pesavento9fa6a782020-03-10 19:47:06 -040032 # macOS
Davide Pesavento302941e2018-07-21 18:55:56 -040033 - os: osx
34 osx_image: xcode9.4
Davide Pesavento9fa6a782020-03-10 19:47:06 -040035 env: # default compiler
Davide Pesavento88beb4d2018-09-11 18:14:18 -040036 - os: osx
Davide Pesavento162bdbb2018-11-06 16:00:44 -050037 osx_image: xcode10.1
Davide Pesavento9fa6a782020-03-10 19:47:06 -040038 env: # default compiler
Davide Pesaventoc16ec572019-03-18 18:40:48 -040039 - os: osx
Davide Pesaventocbef7b82019-10-09 00:15:13 -040040 osx_image: xcode10.3
Davide Pesavento9fa6a782020-03-10 19:47:06 -040041 env: # default compiler
Davide Pesaventoc1eb2fc2019-07-17 15:44:33 -040042 - os: osx
Davide Pesavento9fa6a782020-03-10 19:47:06 -040043 osx_image: xcode11.3
44 env: # default compiler
Davide Pesaventob07d7a92020-05-13 23:30:07 -040045 - os: osx
Davide Pesaventod653afa2020-07-01 22:35:25 -040046 osx_image: xcode11.6
47 env: # default compiler
48 - os: osx
49 osx_image: xcode12
50 env: # default compiler
Davide Pesavento9a659d02018-01-10 02:55:43 -050051
52 allow_failures:
Davide Pesaventob07d7a92020-05-13 23:30:07 -040053 - env: COMPILER=g++-5
54 - env: COMPILER=g++-6
55 - env: COMPILER=clang++-4.0
Davide Pesavento02ec47c2020-08-09 02:23:07 -040056 - env: COMPILER=clang++-12
Davide Pesavento9a659d02018-01-10 02:55:43 -050057
58 fast_finish: true
Davide Pesaventof085ed12017-06-30 14:59:52 -040059
Davide Pesavento9fa6a782020-03-10 19:47:06 -040060before_install:
61 - |
62 : Adding apt repositories
Davide Pesavento26ea1ac2018-05-10 20:20:03 -040063 case ${COMPILER} in
Davide Pesavento9fa6a782020-03-10 19:47:06 -040064 g++-9)
65 # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
Davide Pesavento26ea1ac2018-05-10 20:20:03 -040066 travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
67 travis_retry sudo apt-get -qq update
Davide Pesavento26ea1ac2018-05-10 20:20:03 -040068 ;;
Davide Pesavento9fa6a782020-03-10 19:47:06 -040069 clang++-1?)
70 # https://apt.llvm.org/
Davide Pesaventocbef7b82019-10-09 00:15:13 -040071 LLVM_REPO=${COMPILER/clang++/llvm-toolchain-${TRAVIS_DIST}}
72 travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
Davide Pesavento02ec47c2020-08-09 02:23:07 -040073 travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/${TRAVIS_DIST}/ ${LLVM_REPO%-12} main"
Davide Pesavento26ea1ac2018-05-10 20:20:03 -040074 travis_retry sudo apt-get -qq update
Davide Pesavento26ea1ac2018-05-10 20:20:03 -040075 ;;
76 esac
77
Davide Pesaventocbef7b82019-10-09 00:15:13 -040078install:
Davide Pesavento9fa6a782020-03-10 19:47:06 -040079 - |
80 : Installing C++ compiler
81 if [[ -n ${COMPILER} ]]; then
82 travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang}
83 fi
Davide Pesaventocbef7b82019-10-09 00:15:13 -040084
Davide Pesaventof085ed12017-06-30 14:59:52 -040085before_script:
Davide Pesavento9fa6a782020-03-10 19:47:06 -040086 - |
87 : Setting environment variables
88 if [[ -n ${COMPILER} ]]; then
89 export CXX=${COMPILER}
90 fi
91 case ${TRAVIS_OS_NAME} in
92 linux) export NODE_LABELS="Linux Ubuntu Ubuntu-18.04" ;;
93 osx) export NODE_LABELS="OSX OSX-$(sw_vers -productVersion | cut -d . -f -2)" ;;
94 esac
95 export WAF_JOBS=2
96 - |
97 : Enabling workarounds
98 case "${TRAVIS_CPU_ARCH},${COMPILER}" in
Davide Pesavento8a2907e2020-04-16 00:02:23 -040099 arm64,g++*)
100 # Avoid exceeding the per-job time limit
101 export JOB_NAME=limited-build
102 ;;
Davide Pesavento9fa6a782020-03-10 19:47:06 -0400103 ppc64le,g++-7)
104 # AddressSanitizer does not seem to be working
105 export DISABLE_ASAN=yes
106 ;;
107 *,clang++-8)
108 # https://bugs.llvm.org/show_bug.cgi?id=40808
109 export DISABLE_ASAN=yes
110 ;;
111 esac
Davide Pesaventof085ed12017-06-30 14:59:52 -0400112 - ${CXX:-c++} --version
113
Joao Pereiraef326da2015-05-27 18:27:40 -0400114script:
Joao Pereiraef326da2015-05-27 18:27:40 -0400115 - ./.jenkins