blob: fd734d65aee1bf64f950b9cbd9176cba0c1908ea [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 Pesaventof2c4c532020-07-01 02:44:33 -040047 - os: osx
48 osx_image: xcode11.6
49 env: # default compiler
50 - os: osx
51 osx_image: xcode12
52 env: # default compiler
Davide Pesavento9412d122018-01-02 21:52:09 -050053
54 allow_failures:
Davide Pesavento71c622b2020-04-24 01:39:01 -040055 - env: COMPILER=g++-5
56 - env: COMPILER=g++-6
57 - env: COMPILER=clang++-4.0
Davide Pesavento97242f72020-02-29 14:28:15 -050058 - env: COMPILER=clang++-11
Davide Pesavento9412d122018-01-02 21:52:09 -050059
60 fast_finish: true
Davide Pesavento71430482017-06-08 20:06:40 -040061
Davide Pesavento97242f72020-02-29 14:28:15 -050062before_install:
63 - |
64 : Adding apt repositories
Davide Pesavento844b0932018-05-07 01:00:16 -040065 case ${COMPILER} in
Davide Pesavento97242f72020-02-29 14:28:15 -050066 g++-9)
67 # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages
Davide Pesavento844b0932018-05-07 01:00:16 -040068 travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
69 travis_retry sudo apt-get -qq update
Davide Pesavento844b0932018-05-07 01:00:16 -040070 ;;
Davide Pesavento97242f72020-02-29 14:28:15 -050071 clang++-1?)
72 # https://apt.llvm.org/
Davide Pesaventocb672522019-09-23 17:40:14 -040073 LLVM_REPO=${COMPILER/clang++/llvm-toolchain-${TRAVIS_DIST}}
74 travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
Davide Pesavento97242f72020-02-29 14:28:15 -050075 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 -040076 travis_retry sudo apt-get -qq update
Davide Pesavento844b0932018-05-07 01:00:16 -040077 ;;
78 esac
79
Davide Pesaventocb672522019-09-23 17:40:14 -040080install:
Davide Pesavento97242f72020-02-29 14:28:15 -050081 - |
82 : Installing C++ compiler
83 if [[ -n ${COMPILER} ]]; then
84 travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang}
85 fi
Davide Pesaventocb672522019-09-23 17:40:14 -040086
Davide Pesavento71430482017-06-08 20:06:40 -040087before_script:
Davide Pesavento97242f72020-02-29 14:28:15 -050088 - |
89 : Setting environment variables
Davide Pesavento53533942020-03-04 23:10:06 -050090 if [[ -n ${COMPILER} ]]; then
91 export CXX=${COMPILER}
92 fi
Davide Pesavento97242f72020-02-29 14:28:15 -050093 case ${TRAVIS_OS_NAME} in
94 linux) export NODE_LABELS="Linux Ubuntu Ubuntu-18.04" ;;
95 osx) export NODE_LABELS="OSX OSX-$(sw_vers -productVersion | cut -d . -f -2)" ;;
96 esac
Davide Pesavento53533942020-03-04 23:10:06 -050097 export JOB_NAME=limited-build
98 export WAF_JOBS=2
Davide Pesavento97242f72020-02-29 14:28:15 -050099 - |
100 : Enabling workarounds
101 case "${TRAVIS_CPU_ARCH},${COMPILER}" in
102 arm64,g++*)
103 # Avoid exceeding the per-job time limit
104 export DISABLE_HEADERS_CHECK=yes
105 ;;
106 ppc64le,g++-7)
107 # AddressSanitizer does not seem to be working
108 export DISABLE_ASAN=yes
109 ;;
110 *,clang++-8)
111 # https://bugs.llvm.org/show_bug.cgi?id=40808
112 export DISABLE_ASAN=yes
113 ;;
114 esac
Davide Pesavento71430482017-06-08 20:06:40 -0400115 - ${CXX:-c++} --version
116
Alexander Afanasyevb4500d92014-01-17 20:43:24 -0800117script:
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -0400118 - ./.jenkins