forked from apache/qpid-dispatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
247 lines (239 loc) · 9.91 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
#
# 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
#
language: c
cache: ccache
os: linux
dist: xenial
jobs:
fast_finish: true
allow_failures:
- os: osx
- arch: arm64
- arch: s390x
include:
- name: "apache-rat:check"
os: linux
env: []
language: java
addons:
apt:
packages: []
install: []
before_script: []
script:
- mvn apache-rat:check
before_cache:
- rm -rf $HOME/.m2/repository/org/apache/qpid/*
cache:
directories:
- $HOME/.m2/repository
after_script:
- cat target/rat.txt || true
# prepending /usr/bin to PATH to avoid mismatched python interpreters in /opt
- name: "qdrouterd:Debug (gcc on xenial)"
os: linux
env:
- QPID_SYSTEM_TEST_TIMEOUT=300
- PATH="/usr/bin:$PATH" PROTON_VERSION=main BUILD_TYPE=Debug
- DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan'
- name: "qdrouterd:Coverage"
os: linux
env:
- QPID_SYSTEM_TEST_TIMEOUT=300
- PATH="/usr/bin:$PATH" PROTON_VERSION=0.34.0 BUILD_TYPE=Coverage
- name: "qdrouterd:RelWithDebInfo+MemoryDebug (gcc on xenial)"
os: linux
env:
- QPID_SYSTEM_TEST_TIMEOUT=300
- PATH="/usr/bin:$PATH" PROTON_VERSION=0.34.0 BUILD_TYPE=RelWithDebInfo
- DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG'
- name: "qdrouterd:RelWithDebInfo+MemoryDebug (clang on focal)"
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
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add -
- sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main' -y
- sudo apt-get update -q
- sudo apt-get install -y clang-12 llvm-12-dev -o Debug::pkgProblemResolver=yes
# https://github.com/pypa/virtualenv/issues/1740
# https://github.com/pypa/virtualenv/issues/1873
- python -m pip install --user --upgrade pip
- python -m pip install --user --upgrade tox virtualenv==20.0.23
# Install quart, h2 to run the http2 tests.
- python -m pip install --user quart h2
# DISPATCH-1883: Install selectors to run tcp echo server/client tools
- python -m pip install --user selectors
# Install grpcio and protobuf to run the grpc tests.
- python -m pip install --user grpcio protobuf
env:
- QPID_SYSTEM_TEST_TIMEOUT=300
- CC=clang-12
- CXX=clang++-12
- PATH="/usr/bin:$PATH" PROTON_VERSION=main BUILD_TYPE=RelWithDebInfo
- DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG'
- name: "qdrouterd:RelWithDebInfo+MemoryDebug (gcc on focal)"
arch: s390x
os: linux
dist: focal
before_install:
# Install and use the latest Node.js LTS version
- nvm install "lts/*"
# https://github.com/pypa/virtualenv/issues/1740
# https://github.com/pypa/virtualenv/issues/1873
- python3 -m pip install --user --upgrade pip
- python3 -m pip install --user --upgrade tox virtualenv==20.0.23
# Install quart to run the http2 tests.
- python3 -m pip install --user quart
# DISPATCH-1883: Install selectors to run tcp echo server/client tools
- python3 -m pip install --user selectors
# Install grpcio and protobuf to run the grpc tests.
# Installation on s390x currently broken https://github.com/grpc/grpc/pull/25363
# Binary wheel is not available in PyPI for s390x and source install requires fetching git submodules first
- python3 -m pip install --user protobuf
- sudo apt install python3-grpcio
env:
- QPID_SYSTEM_TEST_TIMEOUT=300
- PROTON_VERSION=main BUILD_TYPE=RelWithDebInfo
- DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG -DQD_ENABLE_ASSERTIONS=ON -DDISPATCH_TEST_TIMEOUT=500'
- name: "qdrouterd:RelWithDebInfo+MemoryDebug (clang on focal) on arm64"
arch: arm64
os: linux
dist: focal
compiler: clang
before_install:
- sudo apt-get install clang-11 llvm-11-dev
# Install and use the latest Node.js LTS version
- nvm install "lts/*"
# https://github.com/pypa/virtualenv/issues/1740
# https://github.com/pypa/virtualenv/issues/1873
- python3 -m pip install --user --upgrade pip
- python3 -m pip install --user --upgrade tox virtualenv==20.0.23
# Install quart to run the http2 tests.
- python3 -m pip install --user quart
# DISPATCH-1883: Install selectors to run tcp echo server/client tools
- python3 -m pip install --user selectors
# Install grpcio and protobuf to run the grpc tests.
- python3 -m pip install --user grpcio protobuf
env:
- QPID_SYSTEM_TEST_TIMEOUT=300
- CC=clang-11
- CXX=clang++-11
- PROTON_VERSION=main BUILD_TYPE=RelWithDebInfo
- DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG -DQD_ENABLE_ASSERTIONS=ON -DDISPATCH_TEST_TIMEOUT=500'
- name: "qdrouterd:Default Build"
os: linux
env:
- QPID_SYSTEM_TEST_TIMEOUT=300
- PATH="/usr/bin:$PATH" PROTON_VERSION=0.34.0
- name: "qdrouterd:TSAN"
os: linux
dist: focal
before_install:
# https://github.com/pypa/virtualenv/issues/1740
# https://github.com/pypa/virtualenv/issues/1873
- python -m pip install --user --upgrade pip
- python -m pip install --user --upgrade tox virtualenv==20.0.23
# Install quart to run the http2 tests.
- python -m pip install --user quart
# DISPATCH-1883: Install selectors to run tcp echo server/client tools
- python -m pip install --user selectors
# Install grpcio and protobuf to run the grpc tests.
- python -m pip install --user grpcio protobuf
env:
- QPID_SYSTEM_TEST_TIMEOUT=300
- PATH="/usr/bin:$PATH" PROTON_VERSION=0.34.0
- DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=tsan'
- name: "qdrouterd:RelWithDebInfo+MemoryDebug (clang on macOS)"
os: osx
osx_image: xcode11
env:
- QPID_SYSTEM_TEST_TIMEOUT=300
- PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:$PATH" PROTON_VERSION=main
- DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG -DQD_ENABLE_ASSERTIONS=ON -DDISPATCH_TEST_TIMEOUT=500'
# exclude tests that require raw_connection functionality; not available in libuv proactor
- DISPATCH_CTEST_EXTRA='-E system_tests_tcp_adaptor|system_tests_http1_adaptor|system_tests_http2|system_tests_grpc|system_tests_http1_over_tcp'
before_install:
- bash ./macports.sh
- export COLUMNS=80
- yes | sudo port install cmake swig swig-python jsoncpp libwebsockets nghttp2 cyrus-sasl2 pkgconfig python37 py37-pip
# PROTON-2351: install libuv @1.40 because proton is broken with 1.41
# https://trac.macports.org/wiki/howto/InstallingOlderPort
- git clone --single-branch https://github.com/macports/macports-ports.git
- pushd macports-ports/devel/libuv; git checkout 425dd6e31f6c31886fabd1f911b5f2aa96c4f27d; yes | sudo port install; popd
# set aliases for CMake's PythonInterp and PythonLibs to find MacPort's `python` on the path first
- sudo port select --set python python37
- sudo port select --set python3 python37
- python -m venv p3venv
- source p3venv/bin/activate
addons:
apt:
packages:
# Proton requirements
- cmake
- libsasl2-dev
- libssl-dev
- sasl2-bin
- swig
- libnghttp2-dev
# documentation
- asciidoc
- asciidoctor
- dblatex
# unit test requirement
- tox
# code coverage
- lcov
before_install:
# Install and use the latest Node.js LTS version
- nvm install "lts/*"
# Install Python 3.6.8
# Travis by itself would activate a virtualenv; CMake < 3.15 deals badly with this
- 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
- sudo tar xjf python-3.6.8.tar.bz2 --directory /
- PATH="/opt/python/3.6.8/bin:${PATH}"
install:
- NPROC=2
- PREFIX=$PWD/install
- git clone --depth=10 --branch=$PROTON_VERSION https://github.com/apache/qpid-proton.git
- cmake -version
# Build and install proton from source.
- mkdir qpid-proton/build
- pushd qpid-proton/build
- cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILD_BINDINGS=python
- cmake --build . --target install -- -j $NPROC
- popd
before_script:
- source qpid-proton/build/config.sh
- mkdir build
- pushd build
- cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${DISPATCH_CMAKE_ARGS}
- . config.sh
- make -j $NPROC
script:
- pushd ../qpid-proton
- echo $(echo "Current proton commit:") $(git rev-parse HEAD) "(${PROTON_VERSION})"
- popd
# Workaround on macOS for PROTON-808 Binaries have their library locations stripped
- if [[ "${OSTYPE}" == "darwin"* ]]; then install_name_tool -add_rpath $PREFIX/lib/. $PREFIX/lib/proton/bindings/python/_cproton.so; fi
- ctest --timeout 1200 -V ${DISPATCH_CTEST_EXTRA} && if [ "$BUILD_TYPE" = "Coverage" ]; then cmake --build . --target coverage; fi
after_success:
- cd ${TRAVIS_BUILD_DIR}/build
- if [ "$BUILD_TYPE" = "Coverage" ]; then bash <(curl -s https://codecov.io/bash); fi