blob: 37330c3306ac19d10e773646b04e07625631cc75 [file] [log] [blame]
Davide Pesavento5653b642020-04-02 23:00:03 -04001version: ~> 1.0
Davide Pesavento1526fee2019-03-18 19:31:55 -04002language: cpp
Davide Pesavento5653b642020-04-02 23:00:03 -04003os: linux
Davide Pesaventof9adc5a2019-09-26 00:23:14 -04004dist: bionic
Davide Pesavento5653b642020-04-02 23:00:03 -04005
6arch:
7 - amd64
8 - arm64
9 - ppc64le
10 - s390x
11
Davide Pesavento1526fee2019-03-18 19:31:55 -040012env:
Davide Pesavento5653b642020-04-02 23:00:03 -040013 - COMPILER=g++-7
14 - COMPILER=g++-9
15 - COMPILER=clang++-6.0
16 - COMPILER=clang++-9
Davide Pesavento1526fee2019-03-18 19:31:55 -040017
Davide Pesavento5653b642020-04-02 23:00:03 -040018jobs:
Davide Pesavento1526fee2019-03-18 19:31:55 -040019 include:
Davide Pesavento5653b642020-04-02 23:00:03 -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 Pesavento87d4e202020-08-09 01:18:52 -040027 - env: COMPILER=clang++-12
Davide Pesavento1526fee2019-03-18 19:31:55 -040028
Davide Pesavento5653b642020-04-02 23:00:03 -040029 # macOS
Davide Pesavento1526fee2019-03-18 19:31:55 -040030 - os: osx
31 osx_image: xcode9.4
Davide Pesavento5653b642020-04-02 23:00:03 -040032 env: # default compiler
Davide Pesavento1526fee2019-03-18 19:31:55 -040033 - os: osx
34 osx_image: xcode10.1
Davide Pesavento5653b642020-04-02 23:00:03 -040035 env: # default compiler
Davide Pesavento1526fee2019-03-18 19:31:55 -040036 - os: osx
Davide Pesaventof9adc5a2019-09-26 00:23:14 -040037 osx_image: xcode10.3
Davide Pesavento5653b642020-04-02 23:00:03 -040038 env: # default compiler
Davide Pesaventof9adc5a2019-09-26 00:23:14 -040039 - os: osx
Davide Pesavento5653b642020-04-02 23:00:03 -040040 osx_image: xcode11.3
41 env: # default compiler
Davide Pesavento042dfb32020-07-23 21:07:16 -040042 - os: osx
43 osx_image: xcode11.6
44 env: # default compiler
45 - os: osx
46 osx_image: xcode12
47 env: # default compiler
Davide Pesavento1526fee2019-03-18 19:31:55 -040048
49 allow_failures:
Davide Pesavento5653b642020-04-02 23:00:03 -040050 - arch: s390x # bug 4818
Davide Pesavento87d4e202020-08-09 01:18:52 -040051 - env: COMPILER=clang++-12
Davide Pesavento1526fee2019-03-18 19:31:55 -040052
53 fast_finish: true
54
Davide Pesavento5653b642020-04-02 23:00:03 -040055before_install:
56 - |
57 : Adding apt repositories
Davide Pesavento1526fee2019-03-18 19:31:55 -040058 case ${COMPILER} in
Davide Pesavento5653b642020-04-02 23:00:03 -040059 g++-9)
60 # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
Davide Pesavento1526fee2019-03-18 19:31:55 -040061 travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
62 travis_retry sudo apt-get -qq update
Davide Pesavento1526fee2019-03-18 19:31:55 -040063 ;;
Davide Pesavento5653b642020-04-02 23:00:03 -040064 clang++-1?)
65 # https://apt.llvm.org/
Davide Pesaventof9adc5a2019-09-26 00:23:14 -040066 LLVM_REPO=${COMPILER/clang++/llvm-toolchain-${TRAVIS_DIST}}
67 travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
Davide Pesavento87d4e202020-08-09 01:18:52 -040068 travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/${TRAVIS_DIST}/ ${LLVM_REPO%-12} main"
Davide Pesavento1526fee2019-03-18 19:31:55 -040069 travis_retry sudo apt-get -qq update
Davide Pesavento1526fee2019-03-18 19:31:55 -040070 ;;
71 esac
72
Davide Pesaventof9adc5a2019-09-26 00:23:14 -040073install:
Davide Pesavento5653b642020-04-02 23:00:03 -040074 - |
75 : Installing C++ compiler
76 if [[ -n ${COMPILER} ]]; then
77 travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang}
78 fi
Davide Pesaventof9adc5a2019-09-26 00:23:14 -040079
Davide Pesavento1526fee2019-03-18 19:31:55 -040080before_script:
Davide Pesavento5653b642020-04-02 23:00:03 -040081 - |
82 : Setting environment variables
83 if [[ -n ${COMPILER} ]]; then
84 export CXX=${COMPILER}
85 fi
86 case ${TRAVIS_OS_NAME} in
87 linux) export NODE_LABELS="Linux Ubuntu Ubuntu-18.04" ;;
88 osx) export NODE_LABELS="OSX OSX-$(sw_vers -productVersion | cut -d . -f -2)" ;;
89 esac
90 export WAF_JOBS=2
91 - |
92 : Enabling workarounds
93 case "${TRAVIS_CPU_ARCH},${COMPILER}" in
94 ppc64le,g++-7)
95 # AddressSanitizer does not seem to be working
96 export DISABLE_ASAN=yes
97 ;;
98 *,clang++-8)
99 # https://bugs.llvm.org/show_bug.cgi?id=40808
100 export DISABLE_ASAN=yes
101 ;;
102 esac
Davide Pesavento1526fee2019-03-18 19:31:55 -0400103 - ${CXX:-c++} --version
Davide Pesavento1526fee2019-03-18 19:31:55 -0400104
105script:
106 - ./.jenkins