blob: 2e7caabf9e8af546a4d1d660cd849a253df1a2fc [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 Pesavento5f408ae2020-07-15 21:17:04 -040041 - os: osx
42 osx_image: xcode11.6
43 env: # default compiler
44 - os: osx
45 osx_image: xcode12
46 env: # default compiler
Davide Pesavento4a9395b2018-05-24 00:23:22 -040047
48 allow_failures:
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040049 - arch: s390x # bug 5098
50 - env: COMPILER=clang++-11
Davide Pesavento4a9395b2018-05-24 00:23:22 -040051
52 fast_finish: true
53
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040054before_install:
55 - |
56 : Adding apt repositories
Davide Pesavento4a9395b2018-05-24 00:23:22 -040057 case ${COMPILER} in
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040058 g++-9)
59 # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
Davide Pesavento4a9395b2018-05-24 00:23:22 -040060 travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
61 travis_retry sudo apt-get -qq update
Davide Pesavento4a9395b2018-05-24 00:23:22 -040062 ;;
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040063 clang++-1?)
64 # https://apt.llvm.org/
Davide Pesaventodfd704a2019-09-26 00:17:11 -040065 LLVM_REPO=${COMPILER/clang++/llvm-toolchain-${TRAVIS_DIST}}
66 travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040067 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 -040068 travis_retry sudo apt-get -qq update
Davide Pesavento4a9395b2018-05-24 00:23:22 -040069 ;;
70 esac
Davide Pesaventoc2489b42017-10-28 17:19:08 -040071
Davide Pesaventodfd704a2019-09-26 00:17:11 -040072install:
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040073 - |
74 : Installing C++ compiler
75 if [[ -n ${COMPILER} ]]; then
76 travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang}
77 fi
Davide Pesaventodfd704a2019-09-26 00:17:11 -040078
Davide Pesaventoc2489b42017-10-28 17:19:08 -040079before_script:
Davide Pesaventodbee9bf2020-04-02 16:20:12 -040080 - |
81 : Setting environment variables
82 if [[ -n ${COMPILER} ]]; then
83 export CXX=${COMPILER}
84 fi
85 case ${TRAVIS_OS_NAME} in
86 linux) export NODE_LABELS="Linux Ubuntu Ubuntu-18.04" ;;
87 osx) export NODE_LABELS="OSX OSX-$(sw_vers -productVersion | cut -d . -f -2)" ;;
88 esac
89 export WAF_JOBS=2
90 - |
91 : Enabling workarounds
92 case "${TRAVIS_CPU_ARCH},${COMPILER}" in
93 ppc64le,g++-7)
94 # AddressSanitizer does not seem to be working
95 export DISABLE_ASAN=yes
96 ;;
97 *,clang++-8)
98 # https://bugs.llvm.org/show_bug.cgi?id=40808
99 export DISABLE_ASAN=yes
100 ;;
101 esac
Davide Pesaventoc2489b42017-10-28 17:19:08 -0400102 - ${CXX:-c++} --version
Davide Pesaventoc2489b42017-10-28 17:19:08 -0400103
Yingdi Yu906c2ea2014-10-31 11:24:50 -0700104script:
105 - ./.jenkins