blob: 7c63efd73f12fe5bf75b0aab11cfeef984fb3715 [file] [log] [blame]
Davide Pesavento2e25a272020-04-14 01:50:15 -04001version: ~> 1.0
Davide Pesavento759214f2018-03-11 21:03:32 -04002language: cpp
Davide Pesavento2e25a272020-04-14 01:50:15 -04003os: linux
Davide Pesaventob4a7b3f2019-09-26 18:28:29 -04004dist: bionic
Davide Pesavento2e25a272020-04-14 01:50:15 -04005
6arch:
7 - amd64
8 - arm64
9 - ppc64le
10 - s390x
11
Alexander Afanasyevf34a3552017-08-13 21:17:05 -040012env:
Davide Pesavento2e25a272020-04-14 01:50:15 -040013 - COMPILER=g++-7
14 - COMPILER=g++-9
15 - COMPILER=clang++-6.0
16 - COMPILER=clang++-9
Alexander Afanasyevf34a3552017-08-13 21:17:05 -040017
Davide Pesavento2e25a272020-04-14 01:50:15 -040018jobs:
Alexander Afanasyevf34a3552017-08-13 21:17:05 -040019 include:
Davide Pesavento2e25a272020-04-14 01:50:15 -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
Alexander Afanasyevf34a3552017-08-13 21:17:05 -040027
Davide Pesavento2e25a272020-04-14 01:50:15 -040028 # macOS
Davide Pesavento4b76cb42019-03-18 18:46:09 -040029 - os: osx
30 osx_image: xcode9.4
Davide Pesavento2e25a272020-04-14 01:50:15 -040031 env: # default compiler
Davide Pesavento4b76cb42019-03-18 18:46:09 -040032 - os: osx
33 osx_image: xcode10.1
Davide Pesavento2e25a272020-04-14 01:50:15 -040034 env: # default compiler
Davide Pesavento4b76cb42019-03-18 18:46:09 -040035 - os: osx
Davide Pesaventob4a7b3f2019-09-26 18:28:29 -040036 osx_image: xcode10.3
Davide Pesavento2e25a272020-04-14 01:50:15 -040037 env: # default compiler
Davide Pesaventob4a7b3f2019-09-26 18:28:29 -040038 - os: osx
Davide Pesavento2e25a272020-04-14 01:50:15 -040039 osx_image: xcode11.3
40 env: # default compiler
Alexander Afanasyevf34a3552017-08-13 21:17:05 -040041
Davide Pesavento98ff2bc2018-05-24 00:10:31 -040042 allow_failures:
Davide Pesavento2e25a272020-04-14 01:50:15 -040043 - env: COMPILER=clang++-11
Davide Pesavento98ff2bc2018-05-24 00:10:31 -040044
45 fast_finish: true
46
Davide Pesavento2e25a272020-04-14 01:50:15 -040047before_install:
48 - |
49 : Adding apt repositories
Davide Pesavento98ff2bc2018-05-24 00:10:31 -040050 case ${COMPILER} in
Davide Pesavento2e25a272020-04-14 01:50:15 -040051 g++-9)
52 # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
Davide Pesavento98ff2bc2018-05-24 00:10:31 -040053 travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
54 travis_retry sudo apt-get -qq update
Davide Pesavento98ff2bc2018-05-24 00:10:31 -040055 ;;
Davide Pesavento2e25a272020-04-14 01:50:15 -040056 clang++-1?)
57 # https://apt.llvm.org/
Davide Pesaventob4a7b3f2019-09-26 18:28:29 -040058 LLVM_REPO=${COMPILER/clang++/llvm-toolchain-${TRAVIS_DIST}}
59 travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
Davide Pesavento2e25a272020-04-14 01:50:15 -040060 travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/${TRAVIS_DIST}/ ${LLVM_REPO%-11} main"
Davide Pesavento98ff2bc2018-05-24 00:10:31 -040061 travis_retry sudo apt-get -qq update
Davide Pesavento98ff2bc2018-05-24 00:10:31 -040062 ;;
63 esac
64
Davide Pesaventob4a7b3f2019-09-26 18:28:29 -040065install:
Davide Pesavento2e25a272020-04-14 01:50:15 -040066 - |
67 : Installing C++ compiler
68 if [[ -n ${COMPILER} ]]; then
69 travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang}
70 fi
Davide Pesaventob4a7b3f2019-09-26 18:28:29 -040071
Alexander Afanasyevf34a3552017-08-13 21:17:05 -040072before_script:
Davide Pesavento2e25a272020-04-14 01:50:15 -040073 - |
74 : Setting environment variables
75 if [[ -n ${COMPILER} ]]; then
76 export CXX=${COMPILER}
77 fi
78 case ${TRAVIS_OS_NAME} in
79 linux) export NODE_LABELS="Linux Ubuntu Ubuntu-18.04" ;;
80 osx) export NODE_LABELS="OSX OSX-$(sw_vers -productVersion | cut -d . -f -2)" ;;
81 esac
82 export WAF_JOBS=2
83 - |
84 : Enabling workarounds
85 case "${TRAVIS_CPU_ARCH},${COMPILER}" in
86 ppc64le,g++-7)
87 # AddressSanitizer does not seem to be working
88 export DISABLE_ASAN=yes
89 ;;
90 *,clang++-8)
91 # https://bugs.llvm.org/show_bug.cgi?id=40808
92 export DISABLE_ASAN=yes
93 ;;
94 esac
Alexander Afanasyevf34a3552017-08-13 21:17:05 -040095 - ${CXX:-c++} --version
Alexander Afanasyevf34a3552017-08-13 21:17:05 -040096
97script:
98 - ./.jenkins