blob: 54ce73326d9d268c7d20576ac5517212a36dbe7e [file] [log] [blame]
Davide Pesaventodbee9bf2020-04-02 16:20:12 -04001version: ~> 1.0
Davide Pesavento4a9395b2018-05-24 00:23:22 -04002language: cpp
Davide Pesaventodbee9bf2020-04-02 16:20:12 -04003os: linux
Davide Pesaventodfd704a2019-09-26 00:17:11 -04004dist: bionic
Davide Pesaventodbee9bf2020-04-02 16:20:12 -04005
6arch:
7 - amd64
8 - arm64
9 - ppc64le
10 - s390x
11
Alexander Afanasyevf3192eb2016-12-19 17:11:20 -080012env:
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040013 - COMPILER=g++-7
14 - COMPILER=g++-9
15 - COMPILER=clang++-6.0
16 - COMPILER=clang++-9
Davide Pesaventoc2489b42017-10-28 17:19:08 -040017
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040018jobs:
Alexander Afanasyevf3192eb2016-12-19 17:11:20 -080019 include:
Davide Pesaventodbee9bf2020-04-02 16:20:12 -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 Pesaventoc2489b42017-10-28 17:19:08 -040027
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040028 # macOS
Davide Pesavento5188f312019-03-18 18:38:45 -040029 - os: osx
30 osx_image: xcode9.4
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040031 env: # default compiler
Davide Pesavento5188f312019-03-18 18:38:45 -040032 - os: osx
33 osx_image: xcode10.1
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040034 env: # default compiler
Davide Pesavento5188f312019-03-18 18:38:45 -040035 - os: osx
Davide Pesaventodfd704a2019-09-26 00:17:11 -040036 osx_image: xcode10.3
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040037 env: # default compiler
Davide Pesaventodfd704a2019-09-26 00:17:11 -040038 - os: osx
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040039 osx_image: xcode11.3
40 env: # default compiler
Davide Pesavento4a9395b2018-05-24 00:23:22 -040041
42 allow_failures:
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040043 - arch: s390x # bug 5098
44 - env: COMPILER=clang++-11
Davide Pesavento4a9395b2018-05-24 00:23:22 -040045
46 fast_finish: true
47
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040048before_install:
49 - |
50 : Adding apt repositories
Davide Pesavento4a9395b2018-05-24 00:23:22 -040051 case ${COMPILER} in
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040052 g++-9)
53 # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
Davide Pesavento4a9395b2018-05-24 00:23:22 -040054 travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
55 travis_retry sudo apt-get -qq update
Davide Pesavento4a9395b2018-05-24 00:23:22 -040056 ;;
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040057 clang++-1?)
58 # https://apt.llvm.org/
Davide Pesaventodfd704a2019-09-26 00:17:11 -040059 LLVM_REPO=${COMPILER/clang++/llvm-toolchain-${TRAVIS_DIST}}
60 travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040061 travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/${TRAVIS_DIST}/ ${LLVM_REPO%-11} main"
Davide Pesavento4a9395b2018-05-24 00:23:22 -040062 travis_retry sudo apt-get -qq update
Davide Pesavento4a9395b2018-05-24 00:23:22 -040063 ;;
64 esac
Davide Pesaventoc2489b42017-10-28 17:19:08 -040065
Davide Pesaventodfd704a2019-09-26 00:17:11 -040066install:
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040067 - |
68 : Installing C++ compiler
69 if [[ -n ${COMPILER} ]]; then
70 travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang}
71 fi
Davide Pesaventodfd704a2019-09-26 00:17:11 -040072
Davide Pesaventoc2489b42017-10-28 17:19:08 -040073before_script:
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040074 - |
75 : Setting environment variables
76 if [[ -n ${COMPILER} ]]; then
77 export CXX=${COMPILER}
78 fi
79 case ${TRAVIS_OS_NAME} in
80 linux) export NODE_LABELS="Linux Ubuntu Ubuntu-18.04" ;;
81 osx) export NODE_LABELS="OSX OSX-$(sw_vers -productVersion | cut -d . -f -2)" ;;
82 esac
83 export WAF_JOBS=2
84 - |
85 : Enabling workarounds
86 case "${TRAVIS_CPU_ARCH},${COMPILER}" in
87 ppc64le,g++-7)
88 # AddressSanitizer does not seem to be working
89 export DISABLE_ASAN=yes
90 ;;
91 *,clang++-8)
92 # https://bugs.llvm.org/show_bug.cgi?id=40808
93 export DISABLE_ASAN=yes
94 ;;
95 esac
Davide Pesaventoc2489b42017-10-28 17:19:08 -040096 - ${CXX:-c++} --version
Davide Pesaventoc2489b42017-10-28 17:19:08 -040097
Yingdi Yu906c2ea2014-10-31 11:24:50 -070098script:
99 - ./.jenkins