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