blob: 15e5888af83a9d8121880370f40ff36e154104a6 [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
tylerliuf237a8a2020-10-12 22:52:41 -07004dist: focal
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
tylerliu4e1b03e2020-10-12 22:52:41 -070028 addons:
29 apt:
30 update: true
tylerliu64fa3512020-10-13 10:57:43 -070031 sources:
32 - sourceline: 'ppa:mhier/libboost-latest'
tylerliu4e1b03e2020-10-12 22:52:41 -070033 packages: boost1.72
Davide Pesavento118a2942018-01-21 22:34:24 -050034
Davide Pesavento264b6f22020-04-16 17:51:46 -040035 # macOS
Davide Pesaventobccde322018-08-18 14:10:25 -040036 - os: osx
37 osx_image: xcode9.4
Davide Pesavento264b6f22020-04-16 17:51:46 -040038 env: # default compiler
Davide Pesavento759d47a2019-03-18 18:58:52 -040039 - os: osx
40 osx_image: xcode10.1
Davide Pesavento264b6f22020-04-16 17:51:46 -040041 env: # default compiler
Davide Pesavento759d47a2019-03-18 18:58:52 -040042 - os: osx
Davide Pesavento25464622019-09-26 18:30:49 -040043 osx_image: xcode10.3
Davide Pesavento264b6f22020-04-16 17:51:46 -040044 env: # default compiler
Davide Pesavento25464622019-09-26 18:30:49 -040045 - os: osx
Davide Pesavento264b6f22020-04-16 17:51:46 -040046 osx_image: xcode11.3
47 env: # default compiler
Davide Pesaventob48bbda2020-07-27 19:41:37 -040048 - os: osx
49 osx_image: xcode11.6
50 env: # default compiler
51 - os: osx
52 osx_image: xcode12
53 env: # default compiler
Davide Pesaventobccde322018-08-18 14:10:25 -040054
55 allow_failures:
Davide Pesavento35a90d12020-08-07 17:37:43 -040056 - env: COMPILER=clang++-12
Davide Pesaventobccde322018-08-18 14:10:25 -040057
58 fast_finish: true
59
Davide Pesavento264b6f22020-04-16 17:51:46 -040060before_install:
61 - |
62 : Adding apt repositories
Davide Pesaventobccde322018-08-18 14:10:25 -040063 case ${COMPILER} in
Davide Pesavento264b6f22020-04-16 17:51:46 -040064 g++-9)
65 # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
Davide Pesaventobccde322018-08-18 14:10:25 -040066 travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
67 travis_retry sudo apt-get -qq update
Davide Pesaventobccde322018-08-18 14:10:25 -040068 ;;
Davide Pesavento264b6f22020-04-16 17:51:46 -040069 clang++-1?)
70 # https://apt.llvm.org/
Davide Pesavento25464622019-09-26 18:30:49 -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 Pesavento35a90d12020-08-07 17:37:43 -040073 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 -040074 travis_retry sudo apt-get -qq update
Davide Pesaventobccde322018-08-18 14:10:25 -040075 ;;
76 esac
Davide Pesavento118a2942018-01-21 22:34:24 -050077
Davide Pesavento25464622019-09-26 18:30:49 -040078install:
Davide Pesavento264b6f22020-04-16 17:51: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 Pesavento25464622019-09-26 18:30:49 -040084
Davide Pesavento118a2942018-01-21 22:34:24 -050085before_script:
Davide Pesavento264b6f22020-04-16 17:51: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 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 Pesavento118a2942018-01-21 22:34:24 -0500108 - ${CXX:-c++} --version
Davide Pesavento118a2942018-01-21 22:34:24 -0500109
Zhiyi Zhang8617a792017-01-17 16:45:56 -0800110script:
111 - ./.jenkins