Skip to content

Commit 24cf576

Browse files
Attila KunAttila Kun
authored andcommitted
Merge remote-tracking branch 'origin/master' into ssl-idle-timeout-fix
2 parents ad31c53 + 7f1531a commit 24cf576

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+3901
-864
lines changed

.appveyor.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,49 @@
11
version: '{branch}.{build}'
22
configuration: RelWithDebInfo
33
environment:
4-
PYTHON: C:\Python35\python.exe
5-
64
matrix:
5+
# https://www.appveyor.com/docs/build-environment/
6+
# https://www.appveyor.com/docs/windows-images-software
7+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
8+
CMAKE_GENERATOR: Visual Studio 16 2019
9+
# TODO (jdanek) upgrade to Python 38 when it can be made to work; or whichever is latest at the time
10+
PYTHON: "C:\\Python37-x64"
11+
QPID_PROTON_CMAKE_ARGS: "-A x64"
12+
VCPKG_INTEGRATION: '-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake'
13+
VCPKG_DEFAULT_TRIPLET: x64-windows
714
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
8-
CMAKE_GENERATOR: Visual Studio 15
15+
CMAKE_GENERATOR: Visual Studio 15 2017
16+
PYTHON: "C:\\Python37-x64"
17+
QPID_PROTON_CMAKE_ARGS: "-A x64"
918
VCPKG_INTEGRATION: '-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake'
10-
- CMAKE_GENERATOR: Visual Studio 12
11-
- CMAKE_GENERATOR: Visual Studio 10
19+
VCPKG_DEFAULT_TRIPLET: x64-windows
20+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
21+
CMAKE_GENERATOR: Visual Studio 14 2015
22+
PYTHON: "C:\\Python36-x64"
23+
QPID_PROTON_CMAKE_ARGS: "-A x64"
24+
# vcpkg is supported on VS2015, we are just not enabling the CMake integration
25+
# https://docs.microsoft.com/en-us/cpp/build/vcpkg?view=vs-2015
26+
1227
install:
1328
- cinst -y swig
29+
# https://www.appveyor.com/docs/lang/cpp/#vc-packaging-tool
1430
- cd C:\Tools\vcpkg
1531
- git pull
1632
- .\bootstrap-vcpkg.bat
1733
- cd %APPVEYOR_BUILD_FOLDER%
18-
- vcpkg install jsoncpp:x86-windows
19-
- vcpkg install jsoncpp:x64-windows
34+
- vcpkg install jsoncpp
2035
- vcpkg integrate install
21-
- "%PYTHON% -m pip install --user --upgrade pip"
22-
- "%PYTHON% -m pip install --user --upgrade setuptools wheel tox"
36+
# https://pythonhosted.org/CodeChat/appveyor.yml.html
37+
- "%PYTHON%\\python.exe -m pip install --user --upgrade pip"
38+
- "%PYTHON%\\python.exe -m pip install --user --upgrade setuptools wheel tox"
2339
cache:
2440
- C:\ProgramData\chocolatey\bin -> .appveyor.yml
2541
- C:\ProgramData\chocolatey\lib -> .appveyor.yml
2642
- C:\Tools\vcpkg\installed -> .appveyor.yml
2743
before_build:
2844
- mkdir BLD
2945
- cd BLD
30-
- cmake %VCPKG_INTEGRATION% -G "%CMAKE_GENERATOR%" -DPYTHON_EXECUTABLE=%PYTHON% %QPID_PROTON_CMAKE_ARGS% ..
46+
- cmake %VCPKG_INTEGRATION% -G "%CMAKE_GENERATOR%" -DPYTHON_EXECUTABLE=%PYTHON%\\python.exe %QPID_PROTON_CMAKE_ARGS% ..
3147
- cd ..
3248
build:
3349
project: BLD/Proton.sln

.github/workflows/build.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest, windows-latest, macOS-latest]
11+
buildType: [RelWithDebInfo]
12+
include:
13+
- os: windows-latest
14+
cmake_extra: '-A x64 -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake'
15+
cmake_generator: '-G "Visual Studio 16 2019"'
16+
- os: macOS-latest
17+
pkg_config_path: '/usr/local/opt/[email protected]/lib/pkgconfig'
18+
cmake_extra: '-DBUILD_RUBY=no'
19+
env:
20+
BuildType: ${{matrix.buildType}}
21+
BuildDir: ${{github.workspace}}/BLD
22+
InstallPrefix: ${{github.workspace}}/INSTALL
23+
PKG_CONFIG_PATH: ${{matrix.pkg_config_path}}
24+
VCPKG_DEFAULT_TRIPLET: x64-windows
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Create Build and Install directories
28+
run: mkdir -p "${BuildDir}" "{InstallPrefix}"
29+
shell: bash
30+
- name: Setup python
31+
uses: actions/setup-python@v2
32+
with:
33+
python-version: 3.6
34+
architecture: x64
35+
- name: Install python dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
python -m pip install setuptools wheel tox unittest2
39+
- name: Install Linux dependencies
40+
if: ${{ runner.os == 'Linux' }}
41+
run: |
42+
sudo apt install -y swig libpython3-dev libsasl2-dev libjsoncpp-dev
43+
- name: Install Windows dependencies
44+
if: ${{ runner.os == 'Windows' }}
45+
run: |
46+
choco install -y swig --version=4.0.1
47+
vcpkg install jsoncpp
48+
vcpkg integrate install
49+
- name: Install MacOS dependencies
50+
if: ${{ runner.os == 'macOS' }}
51+
run: |
52+
brew install libuv swig pkgconfig jsoncpp
53+
- name: cmake configure
54+
working-directory: ${{env.BuildDir}}
55+
run: cmake "${{github.workspace}}" "-DCMAKE_BUILD_TYPE=${BuildType}" "-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" ${{matrix.cmake_extra}}
56+
shell: bash
57+
- name: cmake build/install
58+
run: cmake --build "${BuildDir}" --config ${BuildType} -t install
59+
shell: bash
60+
- name: Upload Install
61+
uses: actions/upload-artifact@v2
62+
with:
63+
name: qpid_proton_pkg_${{matrix.os}}_${{matrix.buildType}}
64+
path: ${{env.InstallPrefix}}
65+
- name: Upload python packages
66+
uses: actions/upload-artifact@v2
67+
with:
68+
name: python-pkgs
69+
path: ${{env.BuildDir}}/python/pkgs
70+
- name: ctest
71+
continue-on-error: true
72+
working-directory: ${{env.BuildDir}}
73+
run: ctest -C ${BuildType} -V -T Test --no-compress-output
74+
shell: bash
75+
- name: Upload Test results
76+
uses: actions/upload-artifact@v2
77+
with:
78+
name: Test_Results_${{matrix.os}}_${{matrix.buildType}}
79+
path: ${{env.BuildDir}}/Testing/**/*.xml
80+
- name: Upload Python & C build directories on failure
81+
uses: actions/upload-artifact@v2
82+
if: failure()
83+
with:
84+
name: Debug-python-C-BLD_${{matrix.os}}_${{matrix.buildType}}
85+
path: |
86+
${{env.BuildDir}}/c
87+
${{env.BuildDir}}/python
88+
- name: Environment (Linux/Windows)
89+
if: ${{ always() && runner.os != 'macOS' }}
90+
run: env -0 | sort -z | tr '\0' '\n'
91+
shell: bash
92+
- name: Environment (macOS)
93+
if: ${{ always() && runner.os == 'macOS' }}
94+
run: env | sort
95+
shell: bash

.travis.yml

Lines changed: 57 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,10 @@
1717
# under the License
1818
#
1919

20-
sudo: false
21-
language: cpp
22-
23-
matrix:
20+
jobs:
2421
include:
2522
- os: linux
26-
dist: bionic
2723
dist: xenial
28-
sudo: true
2924
language: cpp
3025
compiler: gcc
3126
env:
@@ -37,44 +32,75 @@ matrix:
3732
env:
3833
- OPENSSL_ia32cap='0x00000000'
3934
# c-threaderciser test hangs on older clang
35+
- QPID_PROTON_CMAKE_ARGS='-DENABLE_LINKTIME_OPTIMIZATION=OFF'
4036
- QPID_PROTON_CTEST_ARGS="--exclude-regex 'c-threaderciser'"
41-
- os: linux
42-
dist: bionic
43-
sudo: true
44-
compiler:
45-
- gcc
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'
45+
- name: benchmarks
46+
os: linux
47+
dist: focal
48+
language: cpp
49+
compiler: gcc
4650
env:
51+
- PYTHON=python3
4752
- QPID_PROTON_CMAKE_ARGS='-DENABLE_BENCHMARKS=ON -DRUNTIME_CHECK=OFF'
4853
before_install:
4954
- sudo apt-get install -y libbenchmark-dev
50-
- os: linux
51-
dist: bionic
52-
compiler: gcc
55+
- name: gcc asan
56+
os: linux
57+
dist: focal
58+
before_install:
59+
- sudo apt-get install -y gcc-10 g++-10
5360
env:
61+
- CC=gcc-10
62+
- CXX=g++-10
63+
- PYTHON=python3
5464
# python-tox-test fails and ruby tests segfault
5565
- QPID_PROTON_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DENABLE_TOX_TEST=OFF'
5666
- QPID_PROTON_CTEST_ARGS='-E ^ruby.*'
57-
- os: linux
58-
dist: bionic
59-
compiler: clang
67+
- name: clang asan
68+
os: linux
69+
dist: focal
70+
before_install:
71+
- sudo apt-get install -y clang-10
6072
env:
61-
- QPID_PROTON_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DENABLE_TOX_TEST=OFF'
73+
- CC=clang-10
74+
- CXX=clang++-10
75+
- PYTHON=python3
76+
- QPID_PROTON_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DENABLE_LINKTIME_OPTIMIZATION=OFF -DENABLE_TOX_TEST=OFF'
6277
# otherwise, on Travis ldd gives `libclang_rt.asan-x86_64.so => not found` and binaries don't work
63-
- LD_LIBRARY_PATH=/usr/local/clang-7.0.0/lib/clang/7.0.0/lib/linux/
64-
- os: linux
65-
dist: bionic
78+
- LD_LIBRARY_PATH=/usr/lib/llvm-10/lib/clang/10.0.0/lib/linux/
79+
- name: gcc tsan
80+
os: linux
81+
dist: focal
82+
before_install:
83+
- sudo apt-get install -y gcc-10 g++-10
6684
env:
85+
- CC=gcc-10
86+
- CXX=g++-10
87+
- PYTHON=python3
6788
# python-test, python-integration-test, and python-tox-test segfault
6889
- QPID_PROTON_CMAKE_ARGS='-DRUNTIME_CHECK=tsan -DENABLE_TOX_TEST=OFF'
6990
- QPID_PROTON_CTEST_ARGS="-E 'python-test|python-integration-test'"
70-
- os: linux
91+
- name: coverage
92+
os: linux
93+
dist: bionic
94+
language: cpp
95+
compiler: gcc
7196
env:
7297
- QPID_PROTON_CMAKE_ARGS='-DCMAKE_BUILD_TYPE=Coverage'
7398
after_success:
7499
- bash <(curl -s https://codecov.io/bash)
75100

76101
- os: osx
77102
osx_image: xcode9.4
103+
language: cpp
78104
compiler: clang
79105
env:
80106
- PATH="/usr/local/opt/python/libexec/bin:/usr/local/bin:$PATH"
@@ -86,6 +112,7 @@ matrix:
86112

87113
- os: osx
88114
osx_image: xcode11.3
115+
language: cpp
89116
compiler: clang
90117
env:
91118
- PATH="/usr/local/opt/python/libexec/bin:/usr/local/bin:$PATH"
@@ -96,7 +123,7 @@ matrix:
96123
- QPID_PROTON_CTEST_ARGS="--exclude-regex 'c-threaderciser|python-tox-test|ruby.*'"
97124

98125
addons:
99-
# Ubuntu 16.04 APT dependencies, https://packages.ubuntu.com/
126+
# Ubuntu APT dependencies, https://packages.ubuntu.com/
100127
apt:
101128
packages:
102129
- cmake
@@ -123,14 +150,17 @@ addons:
123150
update: true
124151

125152
install:
126-
- python -m pip install --user --upgrade pip
127-
- python -m pip install --user coverage setuptools wheel tox
128-
- gem install minitest simplecov codecov
153+
- echo "Using PYTHON=${PYTHON:=python}"
154+
# use older version of virtualenv to workaround https://github.com/pypa/virtualenv/issues/1873
155+
- ${PYTHON} -m pip install --user --upgrade pip
156+
- ${PYTHON} -m pip install --user coverage setuptools wheel tox virtualenv==20.0.23
157+
# PROTON-2125 suppress annoying deprecation warning from Minitest in Ruby tests
158+
- gem install minitest:4.3.2 simplecov codecov
129159

130160
before_script:
131161
- mkdir build
132162
- cd build
133-
- cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/install ${QPID_PROTON_CMAKE_ARGS}
163+
- cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/install -DPYTHON_EXECUTABLE="$(which ${PYTHON})" ${QPID_PROTON_CMAKE_ARGS}
134164

135165
script:
136166
- cmake --build . --target install -- -j$(nproc) && eval ctest -V ${QPID_PROTON_CTEST_ARGS}

0 commit comments

Comments
 (0)