blob: 8990ac787a63fe2299858280dfe885289fc1f188 [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 Pesavento6a81b772017-08-20 18:43:46 -040030
Davide Pesaventoa122abf2020-04-30 21:55:46 -040031 # macOS
Davide Pesavento0b0eddd2019-03-19 14:42:15 -040032 - os: osx
33 osx_image: xcode9.4
Davide Pesaventoa122abf2020-04-30 21:55:46 -040034 env: # default compiler
Davide Pesavento0b0eddd2019-03-19 14:42:15 -040035 - os: osx
36 osx_image: xcode10.1
Davide Pesaventoa122abf2020-04-30 21:55:46 -040037 env: # default compiler
Davide Pesavento0b0eddd2019-03-19 14:42:15 -040038 - os: osx
Davide Pesaventod21d83d2019-09-30 22:05:44 -040039 osx_image: xcode10.3
Davide Pesaventoa122abf2020-04-30 21:55:46 -040040 env: # default compiler
Davide Pesaventod21d83d2019-09-30 22:05:44 -040041 - os: osx
Davide Pesaventoa122abf2020-04-30 21:55:46 -040042 osx_image: xcode11.3
43 env: # default compiler
44 - os: osx
45 osx_image: xcode11.4
46 env: # default compiler
Davide Pesaventoa08dc3f2018-05-24 00:40:28 -040047
48 allow_failures:
Davide Pesaventoa122abf2020-04-30 21:55:46 -040049 - env: COMPILER=g++-5
50 - env: COMPILER=g++-6
51 - env: COMPILER=clang++-4.0
52 - env: COMPILER=clang++-11
Davide Pesaventoa08dc3f2018-05-24 00:40:28 -040053
54 fast_finish: true
55
Davide Pesaventoa122abf2020-04-30 21:55:46 -040056before_install:
57 - |
58 : Adding apt repositories
Davide Pesaventoa08dc3f2018-05-24 00:40:28 -040059 case ${COMPILER} in
Davide Pesaventoa122abf2020-04-30 21:55:46 -040060 g++-9)
61 # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
Davide Pesaventoa08dc3f2018-05-24 00:40:28 -040062 travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
63 travis_retry sudo apt-get -qq update
Davide Pesaventoa08dc3f2018-05-24 00:40:28 -040064 ;;
Davide Pesaventoa122abf2020-04-30 21:55:46 -040065 clang++-1?)
66 # https://apt.llvm.org/
Davide Pesaventod21d83d2019-09-30 22:05:44 -040067 LLVM_REPO=${COMPILER/clang++/llvm-toolchain-${TRAVIS_DIST}}
68 travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
Davide Pesaventoa122abf2020-04-30 21:55:46 -040069 travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/${TRAVIS_DIST}/ ${LLVM_REPO%-11} main"
Davide Pesaventoa08dc3f2018-05-24 00:40:28 -040070 travis_retry sudo apt-get -qq update
Davide Pesaventoa08dc3f2018-05-24 00:40:28 -040071 ;;
72 esac
Davide Pesavento6a81b772017-08-20 18:43:46 -040073
Davide Pesaventod21d83d2019-09-30 22:05:44 -040074install:
Davide Pesaventoa122abf2020-04-30 21:55:46 -040075 - |
76 : Installing C++ compiler
77 if [[ -n ${COMPILER} ]]; then
78 travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang}
79 fi
Davide Pesaventod21d83d2019-09-30 22:05:44 -040080
Davide Pesavento6a81b772017-08-20 18:43:46 -040081before_script:
Davide Pesaventoa122abf2020-04-30 21:55:46 -040082 - |
83 : Setting environment variables
84 if [[ -n ${COMPILER} ]]; then
85 export CXX=${COMPILER}
86 fi
87 case ${TRAVIS_OS_NAME} in
88 linux) export NODE_LABELS="Linux Ubuntu Ubuntu-18.04" ;;
89 osx) export NODE_LABELS="OSX OSX-$(sw_vers -productVersion | cut -d . -f -2)" ;;
90 esac
91 export WAF_JOBS=2
92 - |
93 : Enabling workarounds
94 case "${TRAVIS_CPU_ARCH},${COMPILER}" in
95 arm64,g++*)
96 # Avoid exceeding the per-job time limit
97 export JOB_NAME=limited-build
98 ;;
99 ppc64le,g++-7)
100 # AddressSanitizer does not seem to be working
101 export DISABLE_ASAN=yes
102 ;;
103 *,clang++-8)
104 # https://bugs.llvm.org/show_bug.cgi?id=40808
105 export DISABLE_ASAN=yes
106 ;;
107 esac
Davide Pesavento6a81b772017-08-20 18:43:46 -0400108 - ${CXX:-c++} --version
Davide Pesavento6a81b772017-08-20 18:43:46 -0400109
Alexander Afanasyev24ed83a2015-03-30 11:06:50 -0700110script:
111 - ./.jenkins