blob: 5b911042e26a95f0230612688ab5e748f77c17a3 [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
Davide Pesaventof2c4c532020-07-01 02:44:33 -040045 osx_image: xcode11.6
46 env: # default compiler
47 - os: osx
48 osx_image: xcode12
49 env: # default compiler
Davide Pesavento9412d122018-01-02 21:52:09 -050050
51 allow_failures:
Davide Pesavento71c622b2020-04-24 01:39:01 -040052 - env: COMPILER=g++-5
53 - env: COMPILER=g++-6
54 - env: COMPILER=clang++-4.0
Davide Pesavento97242f72020-02-29 14:28:15 -050055 - env: COMPILER=clang++-11
Davide Pesavento9412d122018-01-02 21:52:09 -050056
57 fast_finish: true
Davide Pesavento71430482017-06-08 20:06:40 -040058
Davide Pesavento97242f72020-02-29 14:28:15 -050059before_install:
60 - |
61 : Adding apt repositories
Davide Pesavento844b0932018-05-07 01:00:16 -040062 case ${COMPILER} in
Davide Pesavento97242f72020-02-29 14:28:15 -050063 g++-9)
64 # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
Davide Pesavento844b0932018-05-07 01:00:16 -040065 travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
66 travis_retry sudo apt-get -qq update
Davide Pesavento844b0932018-05-07 01:00:16 -040067 ;;
Davide Pesavento97242f72020-02-29 14:28:15 -050068 clang++-1?)
69 # https://apt.llvm.org/
Davide Pesaventocb672522019-09-23 17:40:14 -040070 LLVM_REPO=${COMPILER/clang++/llvm-toolchain-${TRAVIS_DIST}}
71 travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
Davide Pesavento97242f72020-02-29 14:28:15 -050072 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 -040073 travis_retry sudo apt-get -qq update
Davide Pesavento844b0932018-05-07 01:00:16 -040074 ;;
75 esac
76
Davide Pesaventocb672522019-09-23 17:40:14 -040077install:
Davide Pesavento97242f72020-02-29 14:28:15 -050078 - |
79 : Installing C++ compiler
80 if [[ -n ${COMPILER} ]]; then
81 travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang}
82 fi
Davide Pesaventocb672522019-09-23 17:40:14 -040083
Davide Pesavento71430482017-06-08 20:06:40 -040084before_script:
Davide Pesavento97242f72020-02-29 14:28:15 -050085 - |
86 : Setting environment variables
Davide Pesavento53533942020-03-04 23:10:06 -050087 if [[ -n ${COMPILER} ]]; then
88 export CXX=${COMPILER}
89 fi
Davide Pesavento97242f72020-02-29 14:28:15 -050090 case ${TRAVIS_OS_NAME} in
91 linux) export NODE_LABELS="Linux Ubuntu Ubuntu-18.04" ;;
92 osx) export NODE_LABELS="OSX OSX-$(sw_vers -productVersion | cut -d . -f -2)" ;;
93 esac
Davide Pesavento53533942020-03-04 23:10:06 -050094 export JOB_NAME=limited-build
95 export WAF_JOBS=2
Davide Pesavento97242f72020-02-29 14:28:15 -050096 - |
97 : Enabling workarounds
98 case "${TRAVIS_CPU_ARCH},${COMPILER}" in
99 arm64,g++*)
100 # Avoid exceeding the per-job time limit
101 export DISABLE_HEADERS_CHECK=yes
102 ;;
103 ppc64le,g++-7)
104 # AddressSanitizer does not seem to be working
105 export DISABLE_ASAN=yes
106 ;;
107 *,clang++-8)
108 # https://bugs.llvm.org/show_bug.cgi?id=40808
109 export DISABLE_ASAN=yes
110 ;;
111 esac
Davide Pesavento71430482017-06-08 20:06:40 -0400112 - ${CXX:-c++} --version
113
Alexander Afanasyevb4500d92014-01-17 20:43:24 -0800114script:
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -0400115 - ./.jenkins