Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into ssl-idle-timeout-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Attila Kun authored and Attila Kun committed Aug 13, 2020
2 parents ad31c53 + 7f1531a commit 24cf576
Show file tree
Hide file tree
Showing 80 changed files with 3,901 additions and 864 deletions.
36 changes: 26 additions & 10 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,49 @@
version: '{branch}.{build}'
configuration: RelWithDebInfo
environment:
PYTHON: C:\Python35\python.exe

matrix:
# https://www.appveyor.com/docs/build-environment/
# https://www.appveyor.com/docs/windows-images-software
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
CMAKE_GENERATOR: Visual Studio 16 2019
# TODO (jdanek) upgrade to Python 38 when it can be made to work; or whichever is latest at the time
PYTHON: "C:\\Python37-x64"
QPID_PROTON_CMAKE_ARGS: "-A x64"
VCPKG_INTEGRATION: '-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake'
VCPKG_DEFAULT_TRIPLET: x64-windows
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMAKE_GENERATOR: Visual Studio 15
CMAKE_GENERATOR: Visual Studio 15 2017
PYTHON: "C:\\Python37-x64"
QPID_PROTON_CMAKE_ARGS: "-A x64"
VCPKG_INTEGRATION: '-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake'
- CMAKE_GENERATOR: Visual Studio 12
- CMAKE_GENERATOR: Visual Studio 10
VCPKG_DEFAULT_TRIPLET: x64-windows
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
CMAKE_GENERATOR: Visual Studio 14 2015
PYTHON: "C:\\Python36-x64"
QPID_PROTON_CMAKE_ARGS: "-A x64"
# vcpkg is supported on VS2015, we are just not enabling the CMake integration
# https://docs.microsoft.com/en-us/cpp/build/vcpkg?view=vs-2015

install:
- cinst -y swig
# https://www.appveyor.com/docs/lang/cpp/#vc-packaging-tool
- cd C:\Tools\vcpkg
- git pull
- .\bootstrap-vcpkg.bat
- cd %APPVEYOR_BUILD_FOLDER%
- vcpkg install jsoncpp:x86-windows
- vcpkg install jsoncpp:x64-windows
- vcpkg install jsoncpp
- vcpkg integrate install
- "%PYTHON% -m pip install --user --upgrade pip"
- "%PYTHON% -m pip install --user --upgrade setuptools wheel tox"
# https://pythonhosted.org/CodeChat/appveyor.yml.html
- "%PYTHON%\\python.exe -m pip install --user --upgrade pip"
- "%PYTHON%\\python.exe -m pip install --user --upgrade setuptools wheel tox"
cache:
- C:\ProgramData\chocolatey\bin -> .appveyor.yml
- C:\ProgramData\chocolatey\lib -> .appveyor.yml
- C:\Tools\vcpkg\installed -> .appveyor.yml
before_build:
- mkdir BLD
- cd BLD
- cmake %VCPKG_INTEGRATION% -G "%CMAKE_GENERATOR%" -DPYTHON_EXECUTABLE=%PYTHON% %QPID_PROTON_CMAKE_ARGS% ..
- cmake %VCPKG_INTEGRATION% -G "%CMAKE_GENERATOR%" -DPYTHON_EXECUTABLE=%PYTHON%\\python.exe %QPID_PROTON_CMAKE_ARGS% ..
- cd ..
build:
project: BLD/Proton.sln
Expand Down
95 changes: 95 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Build

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
buildType: [RelWithDebInfo]
include:
- os: windows-latest
cmake_extra: '-A x64 -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake'
cmake_generator: '-G "Visual Studio 16 2019"'
- os: macOS-latest
pkg_config_path: '/usr/local/opt/[email protected]/lib/pkgconfig'
cmake_extra: '-DBUILD_RUBY=no'
env:
BuildType: ${{matrix.buildType}}
BuildDir: ${{github.workspace}}/BLD
InstallPrefix: ${{github.workspace}}/INSTALL
PKG_CONFIG_PATH: ${{matrix.pkg_config_path}}
VCPKG_DEFAULT_TRIPLET: x64-windows
steps:
- uses: actions/checkout@v2
- name: Create Build and Install directories
run: mkdir -p "${BuildDir}" "{InstallPrefix}"
shell: bash
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.6
architecture: x64
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel tox unittest2
- name: Install Linux dependencies
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt install -y swig libpython3-dev libsasl2-dev libjsoncpp-dev
- name: Install Windows dependencies
if: ${{ runner.os == 'Windows' }}
run: |
choco install -y swig --version=4.0.1
vcpkg install jsoncpp
vcpkg integrate install
- name: Install MacOS dependencies
if: ${{ runner.os == 'macOS' }}
run: |
brew install libuv swig pkgconfig jsoncpp
- name: cmake configure
working-directory: ${{env.BuildDir}}
run: cmake "${{github.workspace}}" "-DCMAKE_BUILD_TYPE=${BuildType}" "-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" ${{matrix.cmake_extra}}
shell: bash
- name: cmake build/install
run: cmake --build "${BuildDir}" --config ${BuildType} -t install
shell: bash
- name: Upload Install
uses: actions/upload-artifact@v2
with:
name: qpid_proton_pkg_${{matrix.os}}_${{matrix.buildType}}
path: ${{env.InstallPrefix}}
- name: Upload python packages
uses: actions/upload-artifact@v2
with:
name: python-pkgs
path: ${{env.BuildDir}}/python/pkgs
- name: ctest
continue-on-error: true
working-directory: ${{env.BuildDir}}
run: ctest -C ${BuildType} -V -T Test --no-compress-output
shell: bash
- name: Upload Test results
uses: actions/upload-artifact@v2
with:
name: Test_Results_${{matrix.os}}_${{matrix.buildType}}
path: ${{env.BuildDir}}/Testing/**/*.xml
- name: Upload Python & C build directories on failure
uses: actions/upload-artifact@v2
if: failure()
with:
name: Debug-python-C-BLD_${{matrix.os}}_${{matrix.buildType}}
path: |
${{env.BuildDir}}/c
${{env.BuildDir}}/python
- name: Environment (Linux/Windows)
if: ${{ always() && runner.os != 'macOS' }}
run: env -0 | sort -z | tr '\0' '\n'
shell: bash
- name: Environment (macOS)
if: ${{ always() && runner.os == 'macOS' }}
run: env | sort
shell: bash
84 changes: 57 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@
# under the License
#

sudo: false
language: cpp

matrix:
jobs:
include:
- os: linux
dist: bionic
dist: xenial
sudo: true
language: cpp
compiler: gcc
env:
Expand All @@ -37,44 +32,75 @@ matrix:
env:
- OPENSSL_ia32cap='0x00000000'
# c-threaderciser test hangs on older clang
- QPID_PROTON_CMAKE_ARGS='-DENABLE_LINKTIME_OPTIMIZATION=OFF'
- QPID_PROTON_CTEST_ARGS="--exclude-regex 'c-threaderciser'"
- os: linux
dist: bionic
sudo: true
compiler:
- gcc
- name: static libs
os: linux
dist: focal
language: cpp
compiler: gcc
env:
- PYTHON=python3
- QPID_PROTON_CMAKE_ARGS='-DBUILD_STATIC_LIBS=ON'
- name: benchmarks
os: linux
dist: focal
language: cpp
compiler: gcc
env:
- PYTHON=python3
- QPID_PROTON_CMAKE_ARGS='-DENABLE_BENCHMARKS=ON -DRUNTIME_CHECK=OFF'
before_install:
- sudo apt-get install -y libbenchmark-dev
- os: linux
dist: bionic
compiler: gcc
- name: gcc asan
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-tox-test fails and ruby tests segfault
- QPID_PROTON_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DENABLE_TOX_TEST=OFF'
- QPID_PROTON_CTEST_ARGS='-E ^ruby.*'
- os: linux
dist: bionic
compiler: clang
- name: clang asan
os: linux
dist: focal
before_install:
- sudo apt-get install -y clang-10
env:
- QPID_PROTON_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DENABLE_TOX_TEST=OFF'
- CC=clang-10
- CXX=clang++-10
- PYTHON=python3
- QPID_PROTON_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DENABLE_LINKTIME_OPTIMIZATION=OFF -DENABLE_TOX_TEST=OFF'
# otherwise, on Travis ldd gives `libclang_rt.asan-x86_64.so => not found` and binaries don't work
- LD_LIBRARY_PATH=/usr/local/clang-7.0.0/lib/clang/7.0.0/lib/linux/
- os: linux
dist: bionic
- LD_LIBRARY_PATH=/usr/lib/llvm-10/lib/clang/10.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'
- QPID_PROTON_CTEST_ARGS="-E 'python-test|python-integration-test'"
- os: linux
- name: coverage
os: linux
dist: bionic
language: cpp
compiler: gcc
env:
- QPID_PROTON_CMAKE_ARGS='-DCMAKE_BUILD_TYPE=Coverage'
after_success:
- bash <(curl -s https://codecov.io/bash)

- os: osx
osx_image: xcode9.4
language: cpp
compiler: clang
env:
- PATH="/usr/local/opt/python/libexec/bin:/usr/local/bin:$PATH"
Expand All @@ -86,6 +112,7 @@ matrix:

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

addons:
# Ubuntu 16.04 APT dependencies, https://packages.ubuntu.com/
# Ubuntu APT dependencies, https://packages.ubuntu.com/
apt:
packages:
- cmake
Expand All @@ -123,14 +150,17 @@ addons:
update: true

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

before_script:
- mkdir build
- cd build
- cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/install ${QPID_PROTON_CMAKE_ARGS}
- cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/install -DPYTHON_EXECUTABLE="$(which ${PYTHON})" ${QPID_PROTON_CMAKE_ARGS}

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

0 comments on commit 24cf576

Please sign in to comment.