blob: 429d56cc4860d12d0bb68eb261fd0b334bf9b017 [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
tylerliu4e1b03e2020-10-12 22:52:41 -070022 addons:
23 apt:
24 update: true
25 packages: boost1.72
Davide Pesavento264b6f22020-04-16 17:51:46 -040026 - env: COMPILER=clang++-5.0
tylerliu4e1b03e2020-10-12 22:52:41 -070027 addons:
28 apt:
29 update: true
30 packages: boost1.72
Davide Pesavento264b6f22020-04-16 17:51:46 -040031 - env: COMPILER=clang++-7
tylerliu4e1b03e2020-10-12 22:52:41 -070032 addons:
33 apt:
34 update: true
35 packages: boost1.72
Davide Pesavento264b6f22020-04-16 17:51:46 -040036 - env: COMPILER=clang++-8
tylerliu4e1b03e2020-10-12 22:52:41 -070037 addons:
38 apt:
39 update: true
40 packages: boost1.72
Davide Pesavento264b6f22020-04-16 17:51:46 -040041 - env: COMPILER=clang++-10
tylerliu4e1b03e2020-10-12 22:52:41 -070042 addons:
43 apt:
44 update: true
45 packages: boost1.72
Davide Pesavento264b6f22020-04-16 17:51:46 -040046 - env: COMPILER=clang++-11
tylerliu4e1b03e2020-10-12 22:52:41 -070047 addons:
48 apt:
49 update: true
50 packages: boost1.72
Davide Pesavento35a90d12020-08-07 17:37:43 -040051 - env: COMPILER=clang++-12
tylerliu4e1b03e2020-10-12 22:52:41 -070052 addons:
53 apt:
54 update: true
55 packages: boost1.72
Davide Pesavento118a2942018-01-21 22:34:24 -050056
Davide Pesavento264b6f22020-04-16 17:51:46 -040057 # macOS
Davide Pesaventobccde322018-08-18 14:10:25 -040058 - os: osx
59 osx_image: xcode9.4
Davide Pesavento264b6f22020-04-16 17:51:46 -040060 env: # default compiler
Davide Pesavento759d47a2019-03-18 18:58:52 -040061 - os: osx
62 osx_image: xcode10.1
Davide Pesavento264b6f22020-04-16 17:51:46 -040063 env: # default compiler
Davide Pesavento759d47a2019-03-18 18:58:52 -040064 - os: osx
Davide Pesavento25464622019-09-26 18:30:49 -040065 osx_image: xcode10.3
Davide Pesavento264b6f22020-04-16 17:51:46 -040066 env: # default compiler
Davide Pesavento25464622019-09-26 18:30:49 -040067 - os: osx
Davide Pesavento264b6f22020-04-16 17:51:46 -040068 osx_image: xcode11.3
69 env: # default compiler
Davide Pesaventob48bbda2020-07-27 19:41:37 -040070 - os: osx
71 osx_image: xcode11.6
72 env: # default compiler
73 - os: osx
74 osx_image: xcode12
75 env: # default compiler
Davide Pesaventobccde322018-08-18 14:10:25 -040076
77 allow_failures:
Davide Pesavento35a90d12020-08-07 17:37:43 -040078 - env: COMPILER=clang++-12
Davide Pesaventobccde322018-08-18 14:10:25 -040079
80 fast_finish: true
81
Davide Pesavento264b6f22020-04-16 17:51:46 -040082before_install:
83 - |
84 : Adding apt repositories
Davide Pesaventobccde322018-08-18 14:10:25 -040085 case ${COMPILER} in
Davide Pesavento264b6f22020-04-16 17:51:46 -040086 g++-9)
87 # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
Davide Pesaventobccde322018-08-18 14:10:25 -040088 travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
89 travis_retry sudo apt-get -qq update
Davide Pesaventobccde322018-08-18 14:10:25 -040090 ;;
Davide Pesavento264b6f22020-04-16 17:51:46 -040091 clang++-1?)
92 # https://apt.llvm.org/
Davide Pesavento25464622019-09-26 18:30:49 -040093 LLVM_REPO=${COMPILER/clang++/llvm-toolchain-${TRAVIS_DIST}}
94 travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
Davide Pesavento35a90d12020-08-07 17:37:43 -040095 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 -040096 travis_retry sudo apt-get -qq update
Davide Pesaventobccde322018-08-18 14:10:25 -040097 ;;
98 esac
Davide Pesavento118a2942018-01-21 22:34:24 -050099
Davide Pesavento25464622019-09-26 18:30:49 -0400100install:
Davide Pesavento264b6f22020-04-16 17:51:46 -0400101 - |
102 : Installing C++ compiler
103 if [[ -n ${COMPILER} ]]; then
104 travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang}
105 fi
Davide Pesavento25464622019-09-26 18:30:49 -0400106
Davide Pesavento118a2942018-01-21 22:34:24 -0500107before_script:
Davide Pesavento264b6f22020-04-16 17:51:46 -0400108 - |
109 : Setting environment variables
110 if [[ -n ${COMPILER} ]]; then
111 export CXX=${COMPILER}
112 fi
113 case ${TRAVIS_OS_NAME} in
114 linux) export NODE_LABELS="Linux Ubuntu Ubuntu-18.04" ;;
115 osx) export NODE_LABELS="OSX OSX-$(sw_vers -productVersion | cut -d . -f -2)" ;;
116 esac
117 export WAF_JOBS=2
118 - |
119 : Enabling workarounds
120 case "${TRAVIS_CPU_ARCH},${COMPILER}" in
121 ppc64le,g++-7)
122 # AddressSanitizer does not seem to be working
123 export DISABLE_ASAN=yes
124 ;;
125 *,clang++-8)
126 # https://bugs.llvm.org/show_bug.cgi?id=40808
127 export DISABLE_ASAN=yes
128 ;;
129 esac
Davide Pesavento118a2942018-01-21 22:34:24 -0500130 - ${CXX:-c++} --version
Davide Pesavento118a2942018-01-21 22:34:24 -0500131
Zhiyi Zhang8617a792017-01-17 16:45:56 -0800132script:
133 - ./.jenkins