blob: 1ab91c55d6a49d46f84893d5949e626f34d62ba2 [file] [log] [blame]
Davide Pesaventoa122abf2020-04-30 21:55:46 -04001version: ~> 1.0
Davide Pesavento437adfe2018-01-11 02:20:42 -05002language: cpp
Davide Pesaventoa122abf2020-04-30 21:55:46 -04003os: linux
Davide Pesaventod21d83d2019-09-30 22:05:44 -04004dist: bionic
Davide Pesaventoa122abf2020-04-30 21:55:46 -04005
6arch:
7 - amd64
8 - arm64
9 - ppc64le
10 - s390x
11
Davide Pesavento813df802017-08-20 20:53:54 -040012env:
Davide Pesaventoa122abf2020-04-30 21:55:46 -040013 - COMPILER=g++-7
14 - COMPILER=g++-9
15 - COMPILER=clang++-6.0
16 - COMPILER=clang++-9
Davide Pesavento6a81b772017-08-20 18:43:46 -040017
Davide Pesaventoa122abf2020-04-30 21:55:46 -040018jobs:
Alexander Afanasyev5ec9ae42016-07-28 14:30:21 -070019 include:
Davide Pesaventoa122abf2020-04-30 21:55:46 -040020 # Linux
21 - env: COMPILER=g++-5
22 - env: COMPILER=g++-6
23 - env: COMPILER=g++-8
24 - env: COMPILER=clang++-4.0
25 - 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 Pesavento4a90b9a2020-08-07 17:44:33 -040030 - env: COMPILER=clang++-12
Davide Pesavento6a81b772017-08-20 18:43:46 -040031
Davide Pesaventoa122abf2020-04-30 21:55:46 -040032 # macOS
Davide Pesavento0b0eddd2019-03-19 14:42:15 -040033 - os: osx
34 osx_image: xcode9.4
Davide Pesaventoa122abf2020-04-30 21:55:46 -040035 env: # default compiler
Davide Pesavento0b0eddd2019-03-19 14:42:15 -040036 - os: osx
37 osx_image: xcode10.1
Davide Pesaventoa122abf2020-04-30 21:55:46 -040038 env: # default compiler
Davide Pesavento0b0eddd2019-03-19 14:42:15 -040039 - os: osx
Davide Pesaventod21d83d2019-09-30 22:05:44 -040040 osx_image: xcode10.3
Davide Pesaventoa122abf2020-04-30 21:55:46 -040041 env: # default compiler
Davide Pesaventod21d83d2019-09-30 22:05:44 -040042 - os: osx
Davide Pesaventoa122abf2020-04-30 21:55:46 -040043 osx_image: xcode11.3
44 env: # default compiler
45 - os: osx
Davide Pesavento4a90b9a2020-08-07 17:44:33 -040046 osx_image: xcode11.6
47 env: # default compiler
48 - os: osx
49 osx_image: xcode12
Davide Pesaventoa122abf2020-04-30 21:55:46 -040050 env: # default compiler
Davide Pesaventoa08dc3f2018-05-24 00:40:28 -040051
52 allow_failures:
Davide Pesaventoa122abf2020-04-30 21:55:46 -040053 - env: COMPILER=g++-5
54 - env: COMPILER=g++-6
55 - env: COMPILER=clang++-4.0
Davide Pesavento4a90b9a2020-08-07 17:44:33 -040056 - env: COMPILER=clang++-12
Davide Pesaventoa08dc3f2018-05-24 00:40:28 -040057
58 fast_finish: true
59
Davide Pesaventoa122abf2020-04-30 21:55:46 -040060before_install:
61 - |
62 : Adding apt repositories
Davide Pesaventoa08dc3f2018-05-24 00:40:28 -040063 case ${COMPILER} in
Davide Pesaventoa122abf2020-04-30 21:55:46 -040064 g++-9)
65 # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
Davide Pesaventoa08dc3f2018-05-24 00:40:28 -040066 travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
67 travis_retry sudo apt-get -qq update
Davide Pesaventoa08dc3f2018-05-24 00:40:28 -040068 ;;
Davide Pesaventoa122abf2020-04-30 21:55:46 -040069 clang++-1?)
70 # https://apt.llvm.org/
Davide Pesaventod21d83d2019-09-30 22:05:44 -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 Pesavento4a90b9a2020-08-07 17:44:33 -040073 travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/${TRAVIS_DIST}/ ${LLVM_REPO%-12} main"
Davide Pesaventoa08dc3f2018-05-24 00:40:28 -040074 travis_retry sudo apt-get -qq update
Davide Pesaventoa08dc3f2018-05-24 00:40:28 -040075 ;;
76 esac
Davide Pesavento6a81b772017-08-20 18:43:46 -040077
Davide Pesaventod21d83d2019-09-30 22:05:44 -040078install:
Davide Pesaventoa122abf2020-04-30 21:55:46 -040079 - |
80 : Installing C++ compiler
81 if [[ -n ${COMPILER} ]]; then
82 travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang}
83 fi
Davide Pesaventod21d83d2019-09-30 22:05:44 -040084
Davide Pesavento6a81b772017-08-20 18:43:46 -040085before_script:
Davide Pesaventoa122abf2020-04-30 21:55:46 -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
99 arm64,g++*)
100 # Avoid exceeding the per-job time limit
101 export JOB_NAME=limited-build
102 ;;
103 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 Pesavento6a81b772017-08-20 18:43:46 -0400112 - ${CXX:-c++} --version
Davide Pesavento6a81b772017-08-20 18:43:46 -0400113
Alexander Afanasyev24ed83a2015-03-30 11:06:50 -0700114script:
115 - ./.jenkins