| 1 |
# |
| 2 |
# Licensed to the Apache Software Foundation (ASF) under one |
| 3 |
# or more contributor license agreements. See the NOTICE file |
| 4 |
# distributed with this work for additional information |
| 5 |
# regarding copyright ownership. The ASF licenses this file |
| 6 |
# to you under the Apache License, Version 2.0 (the |
| 7 |
# "License"); you may not use this file except in compliance |
| 8 |
# with the License. You may obtain a copy of the License at |
| 9 |
# |
| 10 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 11 |
# |
| 12 |
# Unless required by applicable law or agreed to in writing, |
| 13 |
# software distributed under the License is distributed on an |
| 14 |
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 |
# KIND, either express or implied. See the License for the |
| 16 |
# specific language governing permissions and limitations |
| 17 |
# under the License |
| 18 |
# |
| 19 |
|
| 20 |
jobs: |
| 21 |
include: |
| 22 |
- os: linux |
| 23 |
dist: xenial |
| 24 |
language: cpp |
| 25 |
compiler: gcc |
| 26 |
env: |
| 27 |
- OPENSSL_ia32cap='0x00000000' |
| 28 |
- os: linux |
| 29 |
dist: xenial |
| 30 |
language: cpp |
| 31 |
compiler: clang |
| 32 |
env: |
| 33 |
- OPENSSL_ia32cap='0x00000000' |
| 34 |
# c-threaderciser test hangs on older clang |
| 35 |
- QPID_PROTON_CMAKE_ARGS='-DENABLE_LINKTIME_OPTIMIZATION=OFF -DTHREADERCISER=ON' |
| 36 |
- QPID_PROTON_CTEST_ARGS='--exclude-regex c-threaderciser' |
| 37 |
- name: static libs |
| 38 |
os: linux |
| 39 |
dist: focal |
| 40 |
language: cpp |
| 41 |
compiler: gcc |
| 42 |
env: |
| 43 |
- PYTHON=python3 |
| 44 |
- QPID_PROTON_CMAKE_ARGS='-DBUILD_STATIC_LIBS=ON -DTHREADERCISER=ON' |
| 45 |
- name: benchmarks |
| 46 |
os: linux |
| 47 |
dist: focal |
| 48 |
language: cpp |
| 49 |
compiler: gcc |
| 50 |
env: |
| 51 |
- PYTHON=python3 |
| 52 |
- QPID_PROTON_CMAKE_ARGS='-DENABLE_BENCHMARKS=ON -DRUNTIME_CHECK=OFF -DTHREADERCISER=ON' |
| 53 |
before_install: |
| 54 |
- sudo apt-get install -y libbenchmark-dev |
| 55 |
- name: gcc asan |
| 56 |
os: linux |
| 57 |
dist: focal |
| 58 |
before_install: |
| 59 |
# https://travis-ci.community/t/clang-10-was-recently-broken-on-linux-unmet-dependencies-for-clang-10-clang-tidy-10-valgrind/11527 |
| 60 |
- sudo apt-get install -yq --allow-downgrades libc6=2.31-0ubuntu9.2 libc6-dev=2.31-0ubuntu9.2 |
| 61 |
- sudo apt-get install -y gcc-10 g++-10 |
| 62 |
env: |
| 63 |
- CC=gcc-10 |
| 64 |
- CXX=g++-10 |
| 65 |
- PYTHON=python3 |
| 66 |
# python-tox-test fails and ruby tests segfault |
| 67 |
- QPID_PROTON_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DENABLE_TOX_TEST=OFF -DTHREADERCISER=ON' |
| 68 |
- QPID_PROTON_CTEST_ARGS='-E ^ruby.*' |
| 69 |
- name: clang asan |
| 70 |
os: linux |
| 71 |
dist: focal |
| 72 |
before_install: |
| 73 |
# https://travis-ci.community/t/clang-10-was-recently-broken-on-linux-unmet-dependencies-for-clang-10-clang-tidy-10-valgrind/11527 |
| 74 |
- sudo apt-get install -yq --allow-downgrades libc6=2.31-0ubuntu9.2 libc6-dev=2.31-0ubuntu9.2 |
| 75 |
- sudo apt-get install -y clang-11 llvm-11-dev |
| 76 |
env: |
| 77 |
- CC=clang-11 |
| 78 |
- CXX=clang++-11 |
| 79 |
- PYTHON=python3 |
| 80 |
- QPID_PROTON_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DENABLE_TOX_TEST=OFF -DTHREADERCISER=ON' |
| 81 |
# otherwise, on Travis ldd gives `libclang_rt.asan-x86_64.so => not found` and binaries don't work |
| 82 |
- LD_LIBRARY_PATH=/usr/lib/llvm-11/lib/clang/11.0.0/lib/linux/ |
| 83 |
- name: gcc tsan |
| 84 |
os: linux |
| 85 |
dist: focal |
| 86 |
before_install: |
| 87 |
- sudo apt-get install -y gcc-10 g++-10 |
| 88 |
env: |
| 89 |
- CC=gcc-10 |
| 90 |
- CXX=g++-10 |
| 91 |
- PYTHON=python3 |
| 92 |
# python-test, python-integration-test, and python-tox-test segfault |
| 93 |
- QPID_PROTON_CMAKE_ARGS='-DRUNTIME_CHECK=tsan -DENABLE_TOX_TEST=OFF -DTHREADERCISER=ON' |
| 94 |
- QPID_PROTON_CTEST_ARGS="-E 'python-test|python-integration-test'" |
| 95 |
- name: coverage |
| 96 |
os: linux |
| 97 |
dist: bionic |
| 98 |
language: cpp |
| 99 |
compiler: gcc |
| 100 |
env: |
| 101 |
- QPID_PROTON_CMAKE_ARGS='-DCMAKE_BUILD_TYPE=Coverage -DTHREADERCISER=ON' |
| 102 |
after_success: |
| 103 |
- bash <(curl -s https://codecov.io/bash) |
| 104 |
|
| 105 |
- os: osx |
| 106 |
osx_image: xcode12.2 |
| 107 |
language: cpp |
| 108 |
compiler: clang |
| 109 |
env: |
| 110 |
- PATH="/usr/local/opt/python/libexec/bin:/usr/local/bin:$PATH" |
| 111 |
- PKG_CONFIG_PATH='/usr/local/opt/[email protected]/lib/pkgconfig' |
| 112 |
- QPID_PROTON_CMAKE_ARGS='-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DTHREADERCISER=ON' |
| 113 |
# TODO PROTON-2225: c-threaderciser sometimes fails with assertion error |
| 114 |
# python-tox-test segfaults and ruby tests do not start due to dynamic library issues |
| 115 |
- QPID_PROTON_CTEST_ARGS="--exclude-regex 'c-threaderciser|python-tox-test|ruby.*'" |
| 116 |
|
| 117 |
addons: |
| 118 |
# Ubuntu APT dependencies, https://packages.ubuntu.com/ |
| 119 |
apt: |
| 120 |
packages: |
| 121 |
- cmake |
| 122 |
- libssl-dev |
| 123 |
- libsasl2-dev |
| 124 |
- sasl2-bin |
| 125 |
- swig |
| 126 |
- python-dev |
| 127 |
- ruby |
| 128 |
- ruby-dev |
| 129 |
- python3-dev |
| 130 |
- python3-pip |
| 131 |
- golang |
| 132 |
- lcov |
| 133 |
- libjsoncpp-dev |
| 134 |
# macOS Homebrew dependencies, https://formulae.brew.sh/ |
| 135 |
homebrew: |
| 136 |
packages: |
| 137 |
- jsoncpp |
| 138 |
- libuv |
| 139 |
- swig |
| 140 |
# update:true workaround as of Feb. 22/20 as per |
| 141 |
# https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/10 |
| 142 |
update: true |
| 143 |
|
| 144 |
before_install: |
| 145 |
# https://travis-ci.community/t/clang-10-was-recently-broken-on-linux-unmet-dependencies-for-clang-10-clang-tidy-10-valgrind/11527 |
| 146 |
- if [[ "${TRAVIS_DIST}" == "focal" ]]; then sudo apt-get install -yq --allow-downgrades libc6=2.31-0ubuntu9.2 libc6-dev=2.31-0ubuntu9.2; fi |
| 147 |
- if [[ "${TRAVIS_DIST}" == "focal" ]]; then sudo -E apt-get -yq --no-install-suggests --no-install-recommends --allow-downgrades --allow-remove-essential --allow-change-held-packages install valgrind -o Debug::pkgProblemResolver=yes; fi |
| 148 |
# install Python 3.6.8; Travis has a mechanism for this, but that would activate it in a venv, which older CMake does not deal well with |
| 149 |
- if [[ "${TRAVIS_DIST}" == "xenial" ]]; then curl -sSf --retry 5 -o python-3.6.8.tar.bz2 https://storage.googleapis.com/travis-ci-language-archives/python/binaries/ubuntu/16.04/x86_64/python-3.6.8.tar.bz2; fi |
| 150 |
- if [[ "${TRAVIS_DIST}" == "xenial" ]]; then sudo tar xjf python-3.6.8.tar.bz2 --directory /; fi |
| 151 |
- if [[ "${TRAVIS_DIST}" == "xenial" ]]; then PATH="/opt/python/3.6.8/bin:${PATH}"; fi |
| 152 |
# same thing for bionic |
| 153 |
- if [[ "${TRAVIS_DIST}" == "bionic" ]]; then curl -sSf --retry 5 -o python-3.6.8.tar.bz2 https://storage.googleapis.com/travis-ci-language-archives/python/binaries/ubuntu/18.04/x86_64/python-3.6.8.tar.bz2; fi |
| 154 |
- if [[ "${TRAVIS_DIST}" == "bionic" ]]; then sudo tar xjf python-3.6.8.tar.bz2 --directory /; fi |
| 155 |
- if [[ "${TRAVIS_DIST}" == "bionic" ]]; then PATH="/opt/python/3.6.8/bin:${PATH}"; fi |
| 156 |
|
| 157 |
install: |
| 158 |
- echo "Using PYTHON=${PYTHON:=python}" |
| 159 |
- ${PYTHON} -m pip install --user --upgrade pip |
| 160 |
- ${PYTHON} -m pip install --user coverage setuptools wheel tox virtualenv |
| 161 |
# PROTON-2125 suppress annoying deprecation warning from Minitest in Ruby tests |
| 162 |
- gem install minitest:4.3.2 simplecov:0.18.0 codecov |
| 163 |
|
| 164 |
before_script: |
| 165 |
- mkdir build |
| 166 |
- cd build |
| 167 |
- cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/install -DPython_EXECUTABLE="$(which ${PYTHON})" ${QPID_PROTON_CMAKE_ARGS} |
| 168 |
|
| 169 |
script: |
| 170 |
# travis timeouts a job after 600 s elapses without any new output being printed; use 360 s here to preempt that |
| 171 |
- cmake --build . --target install -- -j$(nproc) && eval ctest --timeout 360 -V ${QPID_PROTON_CTEST_ARGS} |