Skip to content

Commit cc29b4e

Browse files
authored
Fix Travis CI jobs; add PowerPC job; externalize script (#53)
1 parent 4493eeb commit cc29b4e

File tree

2 files changed

+134
-107
lines changed

2 files changed

+134
-107
lines changed

.travis.yml

Lines changed: 28 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -21,119 +21,40 @@ language: c
2121
cache: ccache
2222
os: linux
2323
dist: focal
24+
25+
# the test matrix
26+
arch:
27+
- arm64
28+
- ppc64le
29+
- s390x
30+
env:
31+
- PROTON_VERSION=main BUILD_TYPE=RelWithDebInfo RUNTIME_CHECK=asan QD_ENABLE_ASSERTIONS=ON
32+
- PROTON_VERSION=main BUILD_TYPE=RelWithDebInfo RUNTIME_CHECK=tsan QD_ENABLE_ASSERTIONS=OFF
33+
2434
jobs:
2535
fast_finish: true
2636
allow_failures:
27-
- arch: ppc64le
2837
- arch: arm64
38+
- arch: ppc64le
39+
- arch: s390x
40+
exclude:
2941
- arch: s390x
30-
include:
31-
# prepending /usr/bin to PATH to avoid mismatched python interpreters in /opt
32-
- name: "qdrouterd:RelWithDebInfo+MemoryDebug (gcc on focal)"
33-
arch: s390x
34-
os: linux
35-
dist: focal
36-
before_install:
37-
# Install and use the latest Node.js LTS version
38-
- nvm install "lts/*"
39-
# Update pip, it may prevent issues later
40-
- python3 -m pip install --user --upgrade pip
41-
- python3 -m pip install --user tox virtualenv
42-
# Install quart to run the http2 tests.
43-
- python3 -m pip install --user quart
44-
# DISPATCH-1883: Install selectors to run tcp echo server/client tools
45-
- python3 -m pip install --user selectors
46-
# Install grpcio and protobuf to run the grpc tests.
47-
# Installation on s390x currently broken https://github.com/grpc/grpc/pull/25363
48-
# Binary wheel is not available in PyPI for s390x and source install requires fetching git submodules first
49-
- python3 -m pip install --user protobuf
50-
- sudo apt install python3-grpcio
51-
env:
52-
- QPID_SYSTEM_TEST_TIMEOUT=300
53-
- QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True
54-
- PROTON_VERSION=main BUILD_TYPE=RelWithDebInfo
55-
- DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG -DQD_ENABLE_ASSERTIONS=ON -DDISPATCH_TEST_TIMEOUT=500'
56-
- name: "qdrouterd:RelWithDebInfo+MemoryDebug (clang on focal) on arm64"
57-
arch: arm64
58-
os: linux
59-
dist: focal
60-
compiler: clang
61-
before_install:
62-
- sudo apt-get install clang-12 llvm-12-dev
63-
# Install and use the latest Node.js LTS version
64-
- nvm install "lts/*"
65-
# Update pip, it may prevent issues later
66-
- python3 -m pip install --user --upgrade pip
67-
- python3 -m pip install --user tox virtualenv
68-
# Install quart to run the http2 tests.
69-
- python3 -m pip install --user quart
70-
# DISPATCH-1883: Install selectors to run tcp echo server/client tools
71-
- python3 -m pip install --user selectors
72-
# Install grpcio and protobuf to run the grpc tests.
73-
- python3 -m pip install --user grpcio protobuf
74-
env:
75-
- QPID_SYSTEM_TEST_TIMEOUT=300
76-
- QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True
77-
- CC=clang-12
78-
- CXX=clang++-12
79-
- PROTON_VERSION=0.36.0 BUILD_TYPE=RelWithDebInfo
80-
- DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG -DQD_ENABLE_ASSERTIONS=ON -DDISPATCH_TEST_TIMEOUT=500'
81-
- name: "qdrouterd:Default Build"
82-
os: linux
83-
env:
84-
- QPID_SYSTEM_TEST_TIMEOUT=300
85-
- QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True
86-
- PATH="/usr/bin:$PATH" PROTON_VERSION=0.36.0
42+
env: PROTON_VERSION=main BUILD_TYPE=RelWithDebInfo RUNTIME_CHECK=tsan QD_ENABLE_ASSERTIONS=OFF
8743

8844
addons:
8945
apt:
9046
packages:
91-
# Proton requirements
92-
- cmake
93-
- libsasl2-dev
94-
- libssl-dev
95-
- sasl2-bin
96-
- swig
97-
- libnghttp2-dev
98-
# unit test requirement
99-
- tox
100-
# code coverage
101-
- lcov
102-
103-
before_install:
104-
# Install Python 3.6.8
105-
# Travis by itself would activate a virtualenv; CMake < 3.15 deals badly with this
106-
- 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
107-
- sudo tar xjf python-3.6.8.tar.bz2 --directory /
108-
- PATH="/opt/python/3.6.8/bin:${PATH}"
109-
110-
install:
111-
- NPROC=2
112-
- PREFIX=$PWD/install
113-
- git clone --depth=10 --branch=$PROTON_VERSION https://github.com/apache/qpid-proton.git
114-
- cmake -version
115-
116-
# Build and install proton from source.
117-
- mkdir qpid-proton/build
118-
- pushd qpid-proton/build
119-
- cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILD_BINDINGS=python
120-
- cmake --build . --target install -- -j $NPROC
121-
- popd
122-
123-
before_script:
124-
- source qpid-proton/build/config.sh
125-
- mkdir build
126-
- pushd build
127-
- cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${DISPATCH_CMAKE_ARGS}
128-
- . config.sh
129-
- make -j $NPROC
130-
131-
script:
132-
- pushd ../qpid-proton
133-
- echo $(echo "Current proton commit:") $(git rev-parse HEAD) "(${PROTON_VERSION})"
134-
- popd
135-
- ctest --timeout 1200 -V ${DISPATCH_CTEST_EXTRA} && if [ "$BUILD_TYPE" = "Coverage" ]; then cmake --build . --target coverage; fi
136-
137-
after_success:
138-
- cd ${TRAVIS_BUILD_DIR}/build
139-
- if [ "$BUILD_TYPE" = "Coverage" ]; then bash <(curl -s https://codecov.io/bash); fi
47+
# Proton requirements
48+
- cmake
49+
- libpython3-dev
50+
- libsasl2-dev
51+
- libssl-dev
52+
- sasl2-bin
53+
- swig
54+
# Dispatch requirements
55+
- libnghttp2-dev
56+
- libwebsockets-dev
57+
# code coverage
58+
- lcov
59+
60+
script: scripts/travisci_build.sh

scripts/travisci_build.sh

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
#!/usr/bin/env bash
2+
set -Exeuo pipefail
3+
4+
#
5+
# Licensed to the Apache Software Foundation (ASF) under one
6+
# or more contributor license agreements. See the NOTICE file
7+
# distributed with this work for additional information
8+
# regarding copyright ownership. The ASF licenses this file
9+
# to you under the Apache License, Version 2.0 (the
10+
# "License"); you may not use this file except in compliance
11+
# with the License. You may obtain a copy of the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing,
16+
# software distributed under the License is distributed on an
17+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18+
# KIND, either express or implied. See the License for the
19+
# specific language governing permissions and limitations
20+
# under the License.
21+
#
22+
23+
# This is the continuous delivery build script executed after a git
24+
# extract by the Jenkins build process located at the following URL:
25+
# https://builds.apache.org/view/M-R/view/Qpid/job/Qpid-proton-c/
26+
#
27+
28+
PREFIX=$PWD/install
29+
DISPATCH_CMAKE_ARGS="-DRUNTIME_CHECK=${RUNTIME_CHECK} -DQD_ENABLE_ASSERTIONS=${QD_ENABLE_ASSERTIONS} -DDISPATCH_TEST_TIMEOUT=500"
30+
DISPATCH_CTEST_EXTRA='-E ^python-checker$'
31+
export NPROC=3
32+
export QPID_SYSTEM_TEST_TIMEOUT=300
33+
export QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST=True
34+
export QPID_SYSTEM_TEST_SKIP_HTTP2_LARGE_IMAGE_UPLOAD_TEST=True
35+
36+
echo '==='
37+
echo 'Install additional prerequisites'
38+
echo '==='
39+
40+
if [[ ${TRAVIS_CPU_ARCH} == "arm64" ]]; then
41+
sudo apt-get install -y clang-12 llvm-12-dev
42+
export CC=clang-12 CXX=clang++-12
43+
fi
44+
45+
# Update pip, it may prevent issues later
46+
python3 -m pip install --user --upgrade pip
47+
python3 -m pip install --user tox virtualenv
48+
# Install quart to run the http2 tests.
49+
python3 -m pip install --user quart
50+
# DISPATCH-1883: Install selectors to run tcp echo server/client tools
51+
python3 -m pip install --user selectors
52+
# Install grpcio and protobuf to run the grpc tests.
53+
# Installation on s390x currently broken https://github.com/grpc/grpc/pull/25363
54+
# Binary wheel is not available in PyPI for s390x and source install requires fetching git submodules first
55+
if [[ ${TRAVIS_CPU_ARCH} == "aarch64" ]]; then
56+
python3 -m pip install --user grpcio protobuf
57+
else
58+
python3 -m pip install --user protobuf
59+
sudo apt install python3-grpcio
60+
fi
61+
62+
echo '==='
63+
echo 'Build and install qpid-proton from source'
64+
echo '==='
65+
66+
git clone --depth=1 --branch="$PROTON_VERSION" https://github.com/apache/qpid-proton.git
67+
echo "Current proton commit: $(git --git-dir=qpid-proton rev-parse HEAD) (${PROTON_VERSION})"
68+
69+
mkdir qpid-proton/build
70+
pushd qpid-proton/build
71+
cmake .. -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DBUILD_BINDINGS=python
72+
cmake --build . --target install -- -j $NPROC
73+
popd
74+
75+
source qpid-proton/build/config.sh
76+
77+
echo '==='
78+
echo "Build skupper-router and run tests"
79+
echo '==='
80+
81+
# CMake on Ubuntu Focal is 3.16; patch the requirement in skupper-router
82+
sed -i -e 's/cmake_minimum_required(VERSION 3.20)/cmake_minimum_required(VERSION 3.16)/' CMakeLists.txt
83+
84+
mkdir build
85+
pushd build
86+
cmake .. -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" ${DISPATCH_CMAKE_ARGS}
87+
make -j $NPROC
88+
ctest -j $NPROC -V ${DISPATCH_CTEST_EXTRA}
89+
if [[ "${BUILD_TYPE}" == "Coverage" ]]; then
90+
cmake --build . --target coverage
91+
fi
92+
popd
93+
94+
echo '==='
95+
echo "Report coverage"
96+
echo '==='
97+
98+
if [[ "$BUILD_TYPE" = "Coverage" ]]; then
99+
pushd "${TRAVIS_BUILD_DIR}/build"
100+
bash <(curl -s https://codecov.io/bash);
101+
popd
102+
fi
103+
104+
echo '==='
105+
echo "Script completed"
106+
echo '==='

0 commit comments

Comments
 (0)