blob: ab3e0662f444305fbc6a20d60d6060145a1ddbeb [file] [log] [blame]
Davide Pesavento97242f72020-02-29 14:28:15 -05001version: ~> 1.0
Davide Pesavento9412d122018-01-02 21:52:09 -05002language: cpp
Davide Pesavento97242f72020-02-29 14:28:15 -05003os: linux
Davide Pesaventocb672522019-09-23 17:40:14 -04004dist: bionic
Davide Pesavento97242f72020-02-29 14:28:15 -05005
6arch:
7 - amd64
8 - arm64
9 - ppc64le
10 - s390x
11
Davide Pesavento09348882016-09-17 02:39:44 +020012env:
Davide Pesavento53533942020-03-04 23:10:06 -050013 - COMPILER=g++-7
14 - COMPILER=g++-9
15 - COMPILER=clang++-6.0
16 - COMPILER=clang++-9
Davide Pesavento71430482017-06-08 20:06:40 -040017
Davide Pesavento97242f72020-02-29 14:28:15 -050018jobs:
Alexander Afanasyevce306ca2015-12-09 12:59:05 -080019 include:
Davide Pesavento97242f72020-02-29 14:28:15 -050020 # Linux
Davide Pesavento71c622b2020-04-24 01:39:01 -040021 - env: COMPILER=g++-5
22 - env: COMPILER=g++-6
Davide Pesavento97242f72020-02-29 14:28:15 -050023 - env: COMPILER=g++-8
Davide Pesavento71c622b2020-04-24 01:39:01 -040024 - env: COMPILER=clang++-4.0
Davide Pesavento97242f72020-02-29 14:28:15 -050025 - env: COMPILER=clang++-5.0
26 - env: COMPILER=clang++-7
27 - env: COMPILER=clang++-8
28 - env: COMPILER=clang++-10
29 - env: COMPILER=clang++-11
Davide Pesavento71430482017-06-08 20:06:40 -040030
Davide Pesavento97242f72020-02-29 14:28:15 -050031 # macOS
Davide Pesaventoca660f12018-06-16 14:01:51 -040032 - os: osx
33 osx_image: xcode9.4
Davide Pesavento97242f72020-02-29 14:28:15 -050034 env: # default compiler
Davide Pesaventod89f0022018-04-28 14:48:25 -040035 - os: osx
Davide Pesavento511712d2018-11-03 18:51:10 -040036 osx_image: xcode10.1
Davide Pesavento97242f72020-02-29 14:28:15 -050037 env: # default compiler
Davide Pesavento4fc90802019-02-21 15:20:44 -050038 - os: osx
Davide Pesaventocb672522019-09-23 17:40:14 -040039 osx_image: xcode10.3
Davide Pesavento97242f72020-02-29 14:28:15 -050040 env: # default compiler
Davide Pesavento4fc90802019-02-21 15:20:44 -050041 - os: osx
Davide Pesavento97242f72020-02-29 14:28:15 -050042 osx_image: xcode11.3
43 env: # default compiler
Davide Pesavento71c622b2020-04-24 01:39:01 -040044 - os: osx
45 osx_image: xcode11.4
46 env: # default compiler
Davide Pesavento9412d122018-01-02 21:52:09 -050047
48 allow_failures:
Davide Pesavento71c622b2020-04-24 01:39:01 -040049 - env: COMPILER=g++-5
50 - env: COMPILER=g++-6
51 - env: COMPILER=clang++-4.0
Davide Pesavento97242f72020-02-29 14:28:15 -050052 - env: COMPILER=clang++-11
Davide Pesavento9412d122018-01-02 21:52:09 -050053
54 fast_finish: true
Davide Pesavento71430482017-06-08 20:06:40 -040055
Davide Pesavento97242f72020-02-29 14:28:15 -050056before_install:
57 - |
58 : Adding apt repositories
Davide Pesavento844b0932018-05-07 01:00:16 -040059 case ${COMPILER} in
Davide Pesavento97242f72020-02-29 14:28:15 -050060 g++-9)
61 # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
Davide Pesavento844b0932018-05-07 01:00:16 -040062 travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
63 travis_retry sudo apt-get -qq update
Davide Pesavento844b0932018-05-07 01:00:16 -040064 ;;
Davide Pesavento97242f72020-02-29 14:28:15 -050065 clang++-1?)
66 # https://apt.llvm.org/
Davide Pesaventocb672522019-09-23 17:40:14 -040067 LLVM_REPO=${COMPILER/clang++/llvm-toolchain-${TRAVIS_DIST}}
68 travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
Davide Pesavento97242f72020-02-29 14:28:15 -050069 travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/${TRAVIS_DIST}/ ${LLVM_REPO%-11} main"
Davide Pesavento844b0932018-05-07 01:00:16 -040070 travis_retry sudo apt-get -qq update
Davide Pesavento844b0932018-05-07 01:00:16 -040071 ;;
72 esac
73
Davide Pesaventocb672522019-09-23 17:40:14 -040074install:
Davide Pesavento97242f72020-02-29 14:28:15 -050075 - |
76 : Installing C++ compiler
77 if [[ -n ${COMPILER} ]]; then
78 travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang}
79 fi
Davide Pesaventocb672522019-09-23 17:40:14 -040080
Davide Pesavento71430482017-06-08 20:06:40 -040081before_script:
Davide Pesavento97242f72020-02-29 14:28:15 -050082 - |
83 : Setting environment variables
Davide Pesavento53533942020-03-04 23:10:06 -050084 if [[ -n ${COMPILER} ]]; then
85 export CXX=${COMPILER}
86 fi
Davide Pesavento97242f72020-02-29 14:28:15 -050087 case ${TRAVIS_OS_NAME} in
88 linux) export NODE_LABELS="Linux Ubuntu Ubuntu-18.04" ;;
89 osx) export NODE_LABELS="OSX OSX-$(sw_vers -productVersion | cut -d . -f -2)" ;;
90 esac
Davide Pesavento53533942020-03-04 23:10:06 -050091 export JOB_NAME=limited-build
92 export WAF_JOBS=2
Davide Pesavento97242f72020-02-29 14:28:15 -050093 - |
94 : Enabling workarounds
95 case "${TRAVIS_CPU_ARCH},${COMPILER}" in
96 arm64,g++*)
97 # Avoid exceeding the per-job time limit
98 export DISABLE_HEADERS_CHECK=yes
99 ;;
100 ppc64le,g++-7)
101 # AddressSanitizer does not seem to be working
102 export DISABLE_ASAN=yes
103 ;;
104 *,clang++-8)
105 # https://bugs.llvm.org/show_bug.cgi?id=40808
106 export DISABLE_ASAN=yes
107 ;;
108 esac
Davide Pesavento71430482017-06-08 20:06:40 -0400109 - ${CXX:-c++} --version
110
Alexander Afanasyevb4500d92014-01-17 20:43:24 -0800111script:
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -0400112 - ./.jenkins