blob: 8ff6d27cc4354fc4965863444f013581c5cd5d69 [file] [log] [blame]
Davide Pesavento264b6f22020-04-16 17:51:46 -04001version: ~> 1.0
Davide Pesavento118a2942018-01-21 22:34:24 -05002language: cpp
Davide Pesavento264b6f22020-04-16 17:51:46 -04003os: linux
Davide Pesavento25464622019-09-26 18:30:49 -04004dist: bionic
Davide Pesavento264b6f22020-04-16 17:51:46 -04005
6arch:
7 - amd64
8 - arm64
9 - ppc64le
10 - s390x
11
Zhiyi Zhang8617a792017-01-17 16:45:56 -080012env:
Davide Pesavento264b6f22020-04-16 17:51:46 -040013 - COMPILER=g++-7
14 - COMPILER=g++-9
15 - COMPILER=clang++-6.0
16 - COMPILER=clang++-9
Davide Pesavento118a2942018-01-21 22:34:24 -050017
Davide Pesavento264b6f22020-04-16 17:51:46 -040018jobs:
Zhiyi Zhang8617a792017-01-17 16:45:56 -080019 include:
Davide Pesavento264b6f22020-04-16 17:51:46 -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 Pesavento35a90d12020-08-07 17:37:43 -040027 - env: COMPILER=clang++-12
Davide Pesavento118a2942018-01-21 22:34:24 -050028
Davide Pesavento264b6f22020-04-16 17:51:46 -040029 # macOS
Davide Pesaventobccde322018-08-18 14:10:25 -040030 - os: osx
31 osx_image: xcode9.4
Davide Pesavento264b6f22020-04-16 17:51:46 -040032 env: # default compiler
Davide Pesavento759d47a2019-03-18 18:58:52 -040033 - os: osx
34 osx_image: xcode10.1
Davide Pesavento264b6f22020-04-16 17:51:46 -040035 env: # default compiler
Davide Pesavento759d47a2019-03-18 18:58:52 -040036 - os: osx
Davide Pesavento25464622019-09-26 18:30:49 -040037 osx_image: xcode10.3
Davide Pesavento264b6f22020-04-16 17:51:46 -040038 env: # default compiler
Davide Pesavento25464622019-09-26 18:30:49 -040039 - os: osx
Davide Pesavento264b6f22020-04-16 17:51:46 -040040 osx_image: xcode11.3
41 env: # default compiler
Davide Pesaventob48bbda2020-07-27 19:41:37 -040042 - os: osx
43 osx_image: xcode11.6
44 env: # default compiler
45 - os: osx
46 osx_image: xcode12
47 env: # default compiler
Davide Pesaventobccde322018-08-18 14:10:25 -040048
49 allow_failures:
Davide Pesavento35a90d12020-08-07 17:37:43 -040050 - env: COMPILER=clang++-12
Davide Pesaventobccde322018-08-18 14:10:25 -040051
52 fast_finish: true
53
Davide Pesavento264b6f22020-04-16 17:51:46 -040054before_install:
55 - |
56 : Adding apt repositories
Davide Pesaventobccde322018-08-18 14:10:25 -040057 case ${COMPILER} in
Davide Pesavento264b6f22020-04-16 17:51:46 -040058 g++-9)
59 # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
Davide Pesaventobccde322018-08-18 14:10:25 -040060 travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
61 travis_retry sudo apt-get -qq update
Davide Pesaventobccde322018-08-18 14:10:25 -040062 ;;
Davide Pesavento264b6f22020-04-16 17:51:46 -040063 clang++-1?)
64 # https://apt.llvm.org/
Davide Pesavento25464622019-09-26 18:30:49 -040065 LLVM_REPO=${COMPILER/clang++/llvm-toolchain-${TRAVIS_DIST}}
66 travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
Davide Pesavento35a90d12020-08-07 17:37:43 -040067 travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/${TRAVIS_DIST}/ ${LLVM_REPO%-12} main"
Davide Pesaventobccde322018-08-18 14:10:25 -040068 travis_retry sudo apt-get -qq update
Davide Pesaventobccde322018-08-18 14:10:25 -040069 ;;
70 esac
Davide Pesavento118a2942018-01-21 22:34:24 -050071
Davide Pesavento25464622019-09-26 18:30:49 -040072install:
Davide Pesavento264b6f22020-04-16 17:51:46 -040073 - |
74 : Installing C++ compiler
75 if [[ -n ${COMPILER} ]]; then
76 travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang}
77 fi
Davide Pesavento25464622019-09-26 18:30:49 -040078
Davide Pesavento118a2942018-01-21 22:34:24 -050079before_script:
Davide Pesavento264b6f22020-04-16 17:51:46 -040080 - |
81 : Setting environment variables
82 if [[ -n ${COMPILER} ]]; then
83 export CXX=${COMPILER}
84 fi
85 case ${TRAVIS_OS_NAME} in
86 linux) export NODE_LABELS="Linux Ubuntu Ubuntu-18.04" ;;
87 osx) export NODE_LABELS="OSX OSX-$(sw_vers -productVersion | cut -d . -f -2)" ;;
88 esac
89 export WAF_JOBS=2
90 - |
91 : Enabling workarounds
92 case "${TRAVIS_CPU_ARCH},${COMPILER}" in
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
Davide Pesavento118a2942018-01-21 22:34:24 -0500102 - ${CXX:-c++} --version
Davide Pesavento118a2942018-01-21 22:34:24 -0500103
Zhiyi Zhang8617a792017-01-17 16:45:56 -0800104script:
105 - ./.jenkins