blob: 569f3f4a7a13fff05a5b91b25eb0639463b2937b [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
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 Pesavento71430482017-06-08 20:06:40 -040027
Davide Pesavento97242f72020-02-29 14:28:15 -050028 # macOS
Davide Pesaventoca660f12018-06-16 14:01:51 -040029 - os: osx
30 osx_image: xcode9.4
Davide Pesavento97242f72020-02-29 14:28:15 -050031 env: # default compiler
Davide Pesaventod89f0022018-04-28 14:48:25 -040032 - os: osx
Davide Pesavento511712d2018-11-03 18:51:10 -040033 osx_image: xcode10.1
Davide Pesavento97242f72020-02-29 14:28:15 -050034 env: # default compiler
Davide Pesavento4fc90802019-02-21 15:20:44 -050035 - os: osx
Davide Pesaventocb672522019-09-23 17:40:14 -040036 osx_image: xcode10.3
Davide Pesavento97242f72020-02-29 14:28:15 -050037 env: # default compiler
Davide Pesavento4fc90802019-02-21 15:20:44 -050038 - os: osx
Davide Pesavento97242f72020-02-29 14:28:15 -050039 osx_image: xcode11.3
40 env: # default compiler
Davide Pesavento9412d122018-01-02 21:52:09 -050041
42 allow_failures:
Davide Pesavento97242f72020-02-29 14:28:15 -050043 - env: COMPILER=clang++-11
Davide Pesavento9412d122018-01-02 21:52:09 -050044
45 fast_finish: true
Davide Pesavento71430482017-06-08 20:06:40 -040046
Davide Pesavento97242f72020-02-29 14:28:15 -050047before_install:
48 - |
49 : Adding apt repositories
Davide Pesavento844b0932018-05-07 01:00:16 -040050 case ${COMPILER} in
Davide Pesavento97242f72020-02-29 14:28:15 -050051 g++-9)
52 # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
Davide Pesavento844b0932018-05-07 01:00:16 -040053 travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
54 travis_retry sudo apt-get -qq update
Davide Pesavento844b0932018-05-07 01:00:16 -040055 ;;
Davide Pesavento97242f72020-02-29 14:28:15 -050056 clang++-1?)
57 # https://apt.llvm.org/
Davide Pesaventocb672522019-09-23 17:40:14 -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 Pesavento97242f72020-02-29 14:28:15 -050060 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 -040061 travis_retry sudo apt-get -qq update
Davide Pesavento844b0932018-05-07 01:00:16 -040062 ;;
63 esac
64
Davide Pesaventocb672522019-09-23 17:40:14 -040065install:
Davide Pesavento97242f72020-02-29 14:28:15 -050066 - |
67 : Installing C++ compiler
68 if [[ -n ${COMPILER} ]]; then
69 travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang}
70 fi
Davide Pesaventocb672522019-09-23 17:40:14 -040071
Davide Pesavento71430482017-06-08 20:06:40 -040072before_script:
Davide Pesavento97242f72020-02-29 14:28:15 -050073 - |
74 : Setting environment variables
Davide Pesavento53533942020-03-04 23:10:06 -050075 if [[ -n ${COMPILER} ]]; then
76 export CXX=${COMPILER}
77 fi
Davide Pesavento97242f72020-02-29 14:28:15 -050078 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
Davide Pesavento53533942020-03-04 23:10:06 -050082 export JOB_NAME=limited-build
83 export WAF_JOBS=2
Davide Pesavento97242f72020-02-29 14:28:15 -050084 - |
85 : Enabling workarounds
86 case "${TRAVIS_CPU_ARCH},${COMPILER}" in
87 arm64,g++*)
88 # Avoid exceeding the per-job time limit
89 export DISABLE_HEADERS_CHECK=yes
90 ;;
91 ppc64le,g++-7)
92 # AddressSanitizer does not seem to be working
93 export DISABLE_ASAN=yes
94 ;;
95 *,clang++-8)
96 # https://bugs.llvm.org/show_bug.cgi?id=40808
97 export DISABLE_ASAN=yes
98 ;;
99 esac
Davide Pesavento71430482017-06-08 20:06:40 -0400100 - ${CXX:-c++} --version
101
Alexander Afanasyevb4500d92014-01-17 20:43:24 -0800102script:
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -0400103 - ./.jenkins