| # |
| # 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. |
| # |
| |
| name: Build |
| |
| on: [push, pull_request, workflow_dispatch] |
| |
| jobs: |
| compile: |
| name: "Compile (${{matrix.os}}, ${{matrix.runtimeCheck}}, proton ${{matrix.protonGitRef}})" |
| runs-on: ${{ matrix.os }} |
| strategy: |
| fail-fast: false |
| matrix: |
| os: [ubuntu-20.04] |
| buildType: [Debug] |
| runtimeCheck: [asan] |
| protonGitRef: [main, 0.36.0] |
| env: |
| BuildType: ${{matrix.buildType}} |
| ProtonBuildDir: ${{github.workspace}}/qpid-proton/build |
| DispatchBuildDir: ${{github.workspace}}/qpid-dispatch/build |
| InstallPrefix: ${{github.workspace}}/install |
| # ternary in GHA: https://github.com/actions/runner/issues/409#issuecomment-752775072 |
| PythonVersion: "${{ matrix.protonGitRef == 'main' && 3.9 || 3.8 }}" |
| VERBOSE: 1 |
| |
| ProtonCMakeExtraArgs: > |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache |
| -DBUILD_BINDINGS=python |
| -DBUILD_TOOLS=OFF |
| -DBUILD_EXAMPLES=OFF |
| -DBUILD_TESTING=OFF |
| -DENABLE_FUZZ_TESTING=OFF |
| -DRUNTIME_CHECK=${{matrix.runtimeCheck}} |
| DispatchCMakeExtraArgs: > |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache |
| -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG |
| -DCONSOLE_INSTALL=OFF |
| -DUSE_BWRAP=ON |
| -DRUNTIME_CHECK=${{matrix.runtimeCheck}} |
| -DSANITIZE_3RD_PARTY=ON |
| -DBUILD_BENCHMARKS=ON |
| |
| CCACHE_BASEDIR: ${{github.workspace}} |
| CCACHE_DIR: ${{github.workspace}}/.ccache |
| CCACHE_COMPRESS: 'true' |
| CCACHE_MAXSIZE: '400MB' |
| steps: |
| |
| - name: Show environment (Linux) |
| if: ${{ always() && runner.os == 'Linux' }} |
| run: env -0 | sort -z | tr '\0' '\n' |
| |
| - uses: actions/checkout@v4 |
| with: |
| repository: 'apache/qpid-proton' |
| ref: ${{ matrix.protonGitRef }} |
| path: 'qpid-proton' |
| |
| - uses: actions/checkout@v4 |
| with: |
| path: 'qpid-dispatch' |
| |
| # https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/ |
| - name: Prepare ccache timestamp |
| id: ccache_cache_timestamp |
| shell: cmake -P {0} |
| run: | |
| string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) |
| message("::set-output name=timestamp::${current_date}") |
| |
| - uses: actions/cache@v4 |
| env: |
| cache-name: cache-ccache |
| with: |
| path: .ccache |
| key: ${{ matrix.os }}-${{ matrix.runtimeCheck }}-${{ env.cache-name }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }} |
| restore-keys: | |
| ${{ matrix.os }}-${{ matrix.runtimeCheck }}-${{ env.cache-name }} |
| |
| - name: Create Build and Install directories |
| run: mkdir -p "${ProtonBuildDir}" "${DispatchBuildDir}" "${InstallPrefix}" |
| |
| - name: Setup python ${{ env.PythonVersion }} |
| uses: actions/setup-python@v6 |
| with: |
| python-version: ${{ env.PythonVersion }} |
| architecture: x64 |
| |
| - name: Install Python build dependencies |
| run: python -m pip install build setuptools wheel tox cffi |
| |
| - name: Install Linux build dependencies |
| if: ${{ runner.os == 'Linux' }} |
| run: | |
| sudo apt update; sudo apt install -y swig libpython3-dev libsasl2-dev libjsoncpp-dev libwebsockets-dev ccache ninja-build pixz libbenchmark-dev |
| |
| - name: Zero ccache stats |
| run: ccache -z |
| |
| - name: qpid-proton cmake configure |
| working-directory: ${{env.ProtonBuildDir}} |
| run: > |
| cmake "${{github.workspace}}/qpid-proton" \ |
| "-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" \ |
| "-DCMAKE_BUILD_TYPE=${BuildType}" \ |
| "-GNinja" \ |
| ${ProtonCMakeExtraArgs} |
| |
| - name: qpid-proton cmake build/install |
| run: cmake --build "${ProtonBuildDir}" --config ${BuildType} -t install |
| |
| - name: Display ccache stats |
| run: ccache -s |
| |
| - name: qpid-dispatch cmake configure |
| working-directory: ${{env.DispatchBuildDir}} |
| run: > |
| cmake "${{github.workspace}}/qpid-dispatch" \ |
| "-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" \ |
| "-DCMAKE_BUILD_TYPE=${BuildType}" \ |
| "-DPYTHON_TEST_COMMAND='-m;pytest;-vs;--junit-prefix=pytest.\${py_test_module};--junit-xml=junitxmls/\${py_test_module}.xml;--pyargs;\${py_test_module}'" \ |
| "-GNinja" \ |
| ${DispatchCMakeExtraArgs} |
| |
| - name: qpid-dispatch cmake build/install |
| run: cmake --build "${DispatchBuildDir}" --config ${BuildType} -t install |
| |
| - name: Display ccache stats |
| run: ccache -s |
| |
| # github actions/upload-artifact@v4 does not preserve executable permission on binaries |
| - name: Compress build |
| working-directory: ${{github.workspace}} |
| run: > |
| tar \ |
| -I pixz \ |
| -cf /tmp/archive.tar.xz \ |
| --exclude '*.o' \ |
| --exclude '*.pyc' \ |
| --exclude '.git' \ |
| --exclude='qpid-dispatch/build/console' \ |
| qpid-dispatch \ |
| install \ |
| qpid-proton/build/python |
| |
| - name: Upload archive |
| uses: actions/upload-artifact@v4 |
| with: |
| name: qpid_dispatch_wrk_${{matrix.os}}_${{matrix.buildType}}_${{matrix.runtimeCheck}}_${{ matrix.protonGitRef }} |
| path: /tmp/archive.tar.xz |
| |
| test: |
| name: 'Test (${{matrix.os}}, ${{matrix.runtimeCheck}}, proton ${{matrix.protonGitRef}}, shard ${{matrix.shard}} of ${{matrix.shards}})' |
| runs-on: ${{ matrix.os }} |
| needs: [compile] |
| strategy: |
| fail-fast: false |
| matrix: |
| os: [ubuntu-20.04] |
| buildType: [Debug] |
| runtimeCheck: [asan] |
| protonGitRef: [main, 0.36.0] |
| shard: [1, 2] |
| shards: [2] |
| env: |
| BuildType: ${{matrix.buildType}} |
| ProtonBuildDir: ${{github.workspace}}/qpid-proton/build |
| DispatchBuildDir: ${{github.workspace}}/qpid-dispatch/build |
| InstallPrefix: ${{github.workspace}}/install |
| # ternary in GHA: https://github.com/actions/runner/issues/409#issuecomment-752775072 |
| PythonVersion: "${{ matrix.protonGitRef == 'main' && 3.9 || 3.8 }}" |
| # TODO(DISPATCH-2078) re-enable system_tests_authz_service_plugin when the GHA failure is understood and fixed |
| DispatchCTestExtraArgs: "-E 'system_tests_authz_service_plugin'" |
| LD_LIBRARY_PATH: ${{github.workspace}}/install/lib |
| QPID_SYSTEM_TEST_TIMEOUT: 300 |
| QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST: True |
| steps: |
| |
| - name: Show environment (Linux) |
| if: ${{ always() && runner.os == 'Linux' }} |
| run: env -0 | sort -z | tr '\0' '\n' |
| |
| - name: Download Build |
| uses: actions/download-artifact@v4 |
| with: |
| name: qpid_dispatch_wrk_${{matrix.os}}_${{matrix.buildType}}_${{matrix.runtimeCheck}}_${{matrix.protonGitRef}} |
| |
| - name: Setup python ${{ env.PythonVersion }} |
| uses: actions/setup-python@v6 |
| with: |
| python-version: ${{ env.PythonVersion }} |
| architecture: x64 |
| |
| - name: Install Python runtime/test dependencies |
| run: python -m pip install tox websockets pytest |
| |
| - name: Install Linux runtime/test dependencies |
| if: ${{ runner.os == 'Linux' }} |
| run: | |
| sudo apt update; sudo apt install -y libsasl2-2 libsasl2-modules sasl2-bin libjsoncpp1 libwebsockets15 libbenchmark1 pixz bubblewrap curl |
| |
| - name: Unpack archive |
| run: tar -I pixz -xf archive.tar.xz |
| |
| - name: install qpid-proton python wheel |
| run: python -m pip install $(find ${ProtonBuildDir}/python/ -name 'python_qpid_proton*.whl') |
| |
| - name: CTest |
| working-directory: ${{env.DispatchBuildDir}} |
| run: | |
| ulimit -c unlimited |
| ctest --timeout 1200 -C ${BuildType} -V -T Test --no-compress-output -I ${{matrix.shard}},,${{matrix.shards}} -j2 ${{env.DispatchCTestExtraArgs}} |
| |
| - name: Upload test results |
| uses: actions/upload-artifact@v4 |
| if: ${{ ! cancelled() }} |
| with: |
| name: Test_Results_${{matrix.os}}_${{matrix.buildType}}_${{matrix.runtimeCheck}}_${{matrix.protonGitRef}}_${{matrix.shard}} |
| path: ${{env.DispatchBuildDir}}/Testing/**/*.xml |
| |
| - name: Upload log files (if any tests failed) |
| uses: actions/upload-artifact@v4 |
| if: failure() |
| with: |
| name: testLogs_${{matrix.os}}_${{matrix.buildType}}_${{matrix.runtimeCheck}}_${{matrix.protonGitRef}}_${{matrix.shard}} |
| path: | |
| qpid-dispatch/build/tests |
| |
| - name: Upload core files (if any) |
| uses: actions/upload-artifact@v4 |
| if: failure() |
| with: |
| name: cores_${{matrix.os}}_${{matrix.buildType}}_${{matrix.runtimeCheck}}_${{matrix.protonGitRef}}_${{matrix.shard}} |
| path: | |
| **/core |
| |
| compile_and_test: |
| name: "Compile and Test (${{matrix.container}}, ${{matrix.runtimeCheck}}, proton ${{matrix.protonGitRef}}, shard ${{matrix.shard}} of ${{matrix.shards}})" |
| runs-on: ${{ matrix.os }} |
| strategy: |
| fail-fast: false |
| matrix: |
| os: [ubuntu-20.04] |
| container: ['fedora'] |
| containerTag: ['35'] |
| buildType: [RelWithDebInfo] |
| runtimeCheck: [asan, tsan] |
| protonGitRef: [main, 0.36.0] |
| shard: [ 1, 2 ] |
| shards: [ 2 ] |
| include: |
| - os: ubuntu-20.04 |
| container: 'rockylinux' |
| containerTag: 8 |
| buildType: RelWithDebInfo |
| runtimeCheck: OFF |
| protonGitRef: main |
| shard: 1 |
| shards: 2 |
| - os: ubuntu-20.04 |
| container: 'rockylinux' |
| containerTag: 8 |
| buildType: RelWithDebInfo |
| runtimeCheck: OFF |
| protonGitRef: main |
| shard: 2 |
| shards: 2 |
| - os: ubuntu-20.04 |
| container: 'centos' |
| containerTag: 7 |
| buildType: RelWithDebInfo |
| runtimeCheck: OFF |
| protonGitRef: 0.36.0 |
| shard: 1 |
| shards: 2 |
| - os: ubuntu-20.04 |
| container: 'centos' |
| containerTag: 7 |
| buildType: RelWithDebInfo |
| runtimeCheck: OFF |
| protonGitRef: 0.36.0 |
| shard: 2 |
| shards: 2 |
| |
| container: |
| image: 'library/${{ matrix.container }}:${{ matrix.containerTag }}' |
| volumes: |
| - ${{github.workspace}}:${{github.workspace}} |
| # mount the lib64 directory, needed on CentOS 7 for `using: action` steps when image has ancient glibc |
| - "/mnt:/mnt" |
| # manipulate the host from within the job container |
| - "/var/run/docker.sock:/var/run/docker.sock" |
| # permit reading dmesg |
| options: --privileged --security-opt apparmor:unconfined --security-opt seccomp=unconfined --sysctl net.ipv6.conf.all.disable_ipv6=0 |
| |
| env: |
| BuildType: ${{matrix.buildType}} |
| ProtonBuildDir: ${{github.workspace}}/qpid-proton/build |
| DispatchBuildDir: ${{github.workspace}}/qpid-dispatch/build |
| InstallPrefix: ${{github.workspace}}/install |
| # TODO(DISPATCH-2078) re-enable system_tests_authz_service_plugin when the GHA failure is understood and fixed |
| DispatchCTestExtraArgs: "-E 'system_tests_authz_service_plugin'" |
| |
| # TODO(DISPATCH-2144) use -DPython_EXECUTABLE=/usr/bin/python3-debug when issue is fixed, |
| # as that allows for -DSANITIZE_3RD_PARTY=ON on Fedora |
| # TODO(https://github.com/google/sanitizers/issues/1385) some targeted asan suppressions don't work on Fedora |
| ProtonCMakeExtraArgs: > |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache |
| -DBUILD_BINDINGS=python |
| -DPython_EXECUTABLE=/usr/bin/python3 |
| -DBUILD_TOOLS=OFF |
| -DBUILD_EXAMPLES=OFF |
| -DBUILD_TESTING=OFF |
| -DENABLE_FUZZ_TESTING=OFF |
| -DRUNTIME_CHECK=${{matrix.runtimeCheck}} |
| DispatchCMakeExtraArgs: > |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache |
| -DPython_EXECUTABLE=/usr/bin/python3 |
| -DCONSOLE_INSTALL=OFF |
| -DRUNTIME_CHECK=${{matrix.runtimeCheck}} |
| |
| CCACHE_BASEDIR: ${{github.workspace}} |
| CCACHE_DIR: ${{github.workspace}}/.ccache |
| CCACHE_COMPRESS: 'true' |
| CCACHE_MAXSIZE: '400MB' |
| QPID_SYSTEM_TEST_TIMEOUT: 300 |
| QPID_SYSTEM_TEST_SKIP_FALLBACK_SWITCHOVER_TEST: True |
| VERBOSE: 1 |
| |
| steps: |
| |
| - name: Show environment (Linux) |
| if: ${{ always() && runner.os == 'Linux' }} |
| run: env -0 | sort -z | tr '\0' '\n' |
| |
| # Problem: Want to have CentOS 7 CI still around, but there are problems |
| # - CentOS 7 packages have been removed from the CentOS mirrors |
| # - GitHub Actions upgraded to Node20 and they provide a binary of node that |
| # is incompatible with the glibc in CentOS 7 |
| # Solutions: |
| # - CentOS 7 is archived, so we need to use packages from vault.centos.org |
| # - One way to setup a runtime environment for node20 is to copy libs and the link-loader |
| # from a newer Linux distribution and patch the binary to use them. |
| # - Docker containers provide ready-made env, to avoid docker-in-docker, need to mount host docker socket |
| # - For talking to Docker socket from the host we need genuine Docker, Podman will refuse to communicate |
| # - The patchelf tool can update interpreter and rpath for already-compiled binary, alternatively |
| # I looked at chain-loaders, but that is way too much effort to make work |
| # refs: |
| # - https://rootknecht.net/blog/patching-binaries-for-nixos/ |
| # - https://nixos.wiki/wiki/Packaging/Binaries#Manual_Method |
| # - https://tmpout.sh/2/6.html (Preloading the linker for fun and profit) |
| # - https://github.com/nix-community/nix-ld |
| # - https://lieeil.wordpress.com/2009/01/04/rtldi-indirect-runtime-loader/, |
| - name: Install up-to-date /lib64 for CentOS 7 |
| if: ${{ matrix.container == 'centos' && matrix.containerTag == '7' }} |
| run: | |
| set -Eeuxo pipefail |
| rm -rf /etc/yum.repos.d/*.repo |
| |
| cat > /etc/yum.repos.d/CentOS-Linux-BaseOS.repo <<'EOF' |
| [BaseOS] |
| name=CentOS Linux 7 - BaseOS |
| baseurl=https://vault.centos.org/7.9.2009/os/\$basearch/ |
| gpgcheck=1 |
| gpgkey=https://vault.centos.org/7.9.2009/os/x86_64/RPM-GPG-KEY-CentOS-7 |
| EOF |
| |
| cat > /etc/yum.repos.d/CentOS-Linux-Updates.repo <<'EOF' |
| [Updates] |
| name=CentOS Linux 7 - Updates |
| baseurl=https://vault.centos.org/7.9.2009/updates/\$basearch/ |
| gpgcheck=0 |
| EOF |
| |
| # Docker packages are at https://download.docker.com/linux/centos/7/x86_64/stable/Packages/ |
| cat > /etc/yum.repos.d/DockerCE.repo <<'EOF' |
| [docker-ce-stable] |
| name=Docker CE Stable - $basearch |
| baseurl=https://download.docker.com/linux/centos/$releasever/$basearch/stable |
| enabled=1 |
| gpgcheck=1 |
| gpgkey=https://download.docker.com/linux/centos/gpg |
| EOF |
| |
| yum install -y docker-ce-cli |
| |
| # Note: the paths get confusing with two containers being around |
| docker run --rm --volume /:/mnt -i quay.io/centos/centos:stream10 <<'EOF' |
| set -Eeuxo pipefail |
| # fedora and ubuntu have patchelf in packages, centos does not |
| curl -L https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0-x86_64.tar.gz | \ |
| tar --strip 2 -C . -xzf - ./bin/patchelf |
| # `patchelf` may fail to patch correctly if new interpreter path is longer than the previous interpreter path |
| # this would manifest as strange segfault when running the binary |
| find /mnt/home/runner/runners/*/externals -type f -executable -exec ./patchelf --set-interpreter /ld-linux-x86-64.so.2 --set-rpath /mnt/usr/lib64 {} ';' |
| mkdir -p /mnt/mnt/usr |
| cp -R /usr/lib64 /mnt/mnt/usr/lib64 |
| EOF |
| |
| # Note: this is outside the container now |
| cp /mnt/usr/lib64/ld-linux-x86-64.so.2 / |
| env: |
| DOCKER_HOST: "unix:///var/run/docker.sock" |
| |
| - name: Check that Node20 works inside in-docker steps |
| run: /__e/node20/bin/node -e 'console.log("Hello World")' |
| |
| - uses: actions/checkout@v4 |
| with: |
| repository: 'apache/qpid-proton' |
| ref: ${{ matrix.protonGitRef }} |
| path: 'qpid-proton' |
| |
| - uses: actions/checkout@v4 |
| with: |
| path: 'qpid-dispatch' |
| |
| # Again, it's gone, can't do `yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm` |
| - name: Install EPEL (on CentOS 7) |
| if: ${{ matrix.container == 'centos' && matrix.containerTag == '7' }} |
| run: | |
| cat > /etc/yum.repos.d/epel.repo <<'EOF' |
| [epel] |
| name=EPEL 7 |
| baseurl=https://archives.fedoraproject.org/pub/archive/epel/$releasever/$basearch/ |
| enabled=1 |
| gpgcheck=0 |
| EOF |
| |
| # https://wiki.rockylinux.org/rocky/repo/#notes-on-epel |
| - name: Install EPEL (on RockyLinux 8) |
| if: ${{ matrix.container == 'rockylinux' && matrix.containerTag == '8' }} |
| run: | |
| dnf install -y epel-release |
| crb enable |
| |
| - name: Install Linux build dependencies |
| if: ${{ runner.os == 'Linux' }} |
| run: | |
| yum install -y gcc gcc-c++ cmake libuuid-devel openssl-devel cyrus-sasl-devel cyrus-sasl-plain swig make libwebsockets-devel ccache libasan libubsan libtsan |
| |
| - name: Install Linux build dependencies (Fedora, CentOS) |
| if: ${{ matrix.container == 'fedora' || matrix.container == 'centos' }} |
| run: yum install -y python3-devel python3-pip |
| |
| - name: Install Linux build dependencies (RockyLinux 8) |
| if: ${{ matrix.container == 'rockylinux' && matrix.containerTag == '8' }} |
| run: dnf install -y python39-devel python39-pip |
| |
| - name: Install Python build dependencies |
| run: python3 -m pip install build setuptools wheel tox cffi |
| |
| # https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/ |
| - name: Prepare ccache timestamp |
| id: ccache_cache_timestamp |
| shell: cmake -P {0} |
| run: | |
| string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) |
| message("::set-output name=timestamp::${current_date}") |
| |
| - uses: actions/cache@v4 |
| env: |
| cache-name: cache-ccache |
| with: |
| path: .ccache |
| key: ${{ matrix.container }}-${{ matrix.runtimeCheck }}-${{ env.cache-name }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }} |
| restore-keys: | |
| ${{ matrix.container }}-${{ matrix.runtimeCheck }}-${{ env.cache-name }} |
| |
| - name: Create Build and Install directories |
| run: mkdir -p "${ProtonBuildDir}" "${DispatchBuildDir}" "{InstallPrefix}" |
| |
| - name: Zero ccache stats |
| run: ccache -z |
| |
| - name: qpid-proton cmake configure |
| working-directory: ${{env.ProtonBuildDir}} |
| run: > |
| cmake "${{github.workspace}}/qpid-proton" \ |
| "-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" \ |
| "-DCMAKE_BUILD_TYPE=${BuildType}" \ |
| ${ProtonCMakeExtraArgs} |
| |
| - name: qpid-proton cmake build/install |
| run: cmake --build "${ProtonBuildDir}" --config ${BuildType} --target install |
| |
| - name: Display ccache stats |
| run: ccache -s |
| |
| - name: enable asserts on asan build |
| if: matrix.runtimeCheck == 'asan' || matrix.runtimeCheck == 'OFF' |
| run: echo "DispatchCMakeAsserts=ON" >> $GITHUB_ENV |
| |
| - name: disable asserts on tsan build |
| if: matrix.runtimeCheck == 'tsan' |
| run: echo "DispatchCMakeAsserts=OFF" >> $GITHUB_ENV |
| |
| - name: qpid-dispatch cmake configure |
| working-directory: ${{env.DispatchBuildDir}} |
| run: > |
| cmake "${{github.workspace}}/qpid-dispatch" \ |
| "-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" \ |
| "-DCMAKE_BUILD_TYPE=${BuildType}" \ |
| "-DPYTHON_TEST_COMMAND='-m;pytest;-vs;--junit-prefix=pytest.\${py_test_module};--junit-xml=junitxmls/\${py_test_module}.xml;--pyargs;\${py_test_module}'" \ |
| ${DispatchCMakeExtraArgs} -DQD_ENABLE_ASSERTIONS=${DispatchCMakeAsserts} |
| |
| - name: qpid-dispatch cmake build/install |
| run: cmake --build "${DispatchBuildDir}" --config ${BuildType} --target install |
| |
| - name: Display ccache stats |
| run: ccache -s |
| |
| - name: Show environment (Linux) |
| if: ${{ always() && runner.os == 'Linux' }} |
| run: env -0 | sort -z | tr '\0' '\n' |
| |
| - name: Install Python runtime/test dependencies |
| run: python3 -m pip install tox websockets pytest |
| |
| - name: Install Linux runtime/test dependencies |
| if: ${{ runner.os == 'Linux' }} |
| run: | |
| yum install -y curl findutils |
| |
| - name: Install Linux runtime/test dependencies (for sanitizers) |
| if: ${{ matrix.runtimeCheck != 'OFF' }} |
| run: | |
| dnf install -y binutils |
| |
| - name: install qpid-proton python wheel |
| run: python3 -m pip install $(find ${ProtonBuildDir}/python/ -name 'python_qpid_proton*.whl') |
| |
| - name: CTest |
| working-directory: ${{env.DispatchBuildDir}} |
| run: | |
| ulimit -c unlimited |
| ctest --timeout 1200 -C ${BuildType} -V -T Test --output-on-failure --no-compress-output -I ${{matrix.shard}},,${{matrix.shards}} -j2 ${{env.DispatchCTestExtraArgs}} |
| |
| - name: Upload test results |
| uses: actions/upload-artifact@v4 |
| if: ${{ ! cancelled() }} |
| with: |
| name: Test_Results_${{matrix.container}}_${{matrix.buildType}}_${{matrix.runtimeCheck}}_${{matrix.protonGitRef}}_${{matrix.shard}} |
| path: ${{env.DispatchBuildDir}}/Testing/**/*.xml |
| |
| - name: Upload log files (if any tests failed) |
| uses: actions/upload-artifact@v4 |
| if: failure() |
| with: |
| name: testLogs_${{matrix.container}}_${{matrix.buildType}}_${{matrix.runtimeCheck}}_${{matrix.protonGitRef}}_${{matrix.shard}} |
| path: | |
| qpid-dispatch/build/tests |
| |
| - name: Upload core files (if any) |
| uses: actions/upload-artifact@v4 |
| if: failure() |
| with: |
| name: cores_${{matrix.container}}_${{matrix.buildType}}_${{matrix.runtimeCheck}}_${{matrix.protonGitRef}}_${{matrix.shard}} |
| path: | |
| **/core |
| |
| - name: Dump dmesg (on failure) |
| if: ${{ failure() }} |
| run: dmesg |
| |
| python: |
| name: 'Python Checker (${{ matrix.os }})' |
| runs-on: '${{ matrix.os }}' |
| strategy: |
| matrix: |
| os: [ 'ubuntu-20.04' ] |
| |
| env: |
| DispatchBuildDir: ${{github.workspace}}/build |
| InstallPrefix: ${{github.workspace}}/install |
| DispatchCMakeExtraArgs: > |
| -GNinja |
| |
| steps: |
| |
| - name: Add Qpid PPA repository |
| if: ${{ runner.os == 'Linux' }} |
| # the `testing` ppa is less likely to be out-of-date |
| run: | |
| sudo add-apt-repository ppa:qpid/testing && sudo apt-get update |
| |
| - name: Install Linux build dependencies |
| if: ${{ runner.os == 'Linux' }} |
| run: | |
| sudo apt update; sudo apt install -y libqpid-proton-proactor1-dev python3-qpid-proton libpython3-dev ninja-build |
| |
| - name: Install python-checker test dependencies |
| run: python3 -m pip install tox |
| |
| - uses: actions/checkout@v4 |
| |
| - name: Create Build and Install directories |
| run: mkdir -p "${DispatchBuildDir}" "{InstallPrefix}" |
| |
| - name: qpid-dispatch cmake configure |
| working-directory: ${{env.DispatchBuildDir}} |
| run: > |
| cmake "${{github.workspace}}" \ |
| "-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" \ |
| ${DispatchCMakeExtraArgs} |
| |
| - name: CTest -R python-checker |
| working-directory: ${{env.DispatchBuildDir}} |
| run: ctest -VV -R python-checker |
| |
| docs: |
| name: 'Docs (${{ matrix.os }})' |
| runs-on: ${{ matrix.os }} |
| strategy: |
| matrix: |
| os: [ ubuntu-20.04 ] |
| buildType: [ RelWithDebInfo ] |
| env: |
| DispatchBuildDir: ${{github.workspace}}/build |
| InstallPrefix: ${{github.workspace}}/install |
| DispatchCMakeExtraArgs: > |
| -GNinja |
| -DDOC_XMLLINT=ON |
| -DCONSOLE_INSTALL=OFF |
| steps: |
| |
| - uses: actions/checkout@v4 |
| |
| - name: Create Build and Install directories |
| run: mkdir -p "${DispatchBuildDir}" "{InstallPrefix}" |
| |
| - name: Add Qpid PPA repository |
| if: ${{ runner.os == 'Linux' }} |
| # the `released` ppa does not yet have Proton 0.33.0, have to use `testing` |
| run: | |
| sudo add-apt-repository ppa:qpid/testing && sudo apt-get update |
| |
| - name: Install Linux build dependencies |
| if: ${{ runner.os == 'Linux' }} |
| run: | |
| sudo apt update; sudo apt install -y libqpid-proton-proactor1-dev python3-qpid-proton libpython3-dev libwebsockets-dev ninja-build |
| |
| - name: Install Linux docs dependencies |
| if: ${{ runner.os == 'Linux' }} |
| run: | |
| sudo apt update; sudo apt install -y asciidoc asciidoctor ruby-asciidoctor-pdf dblatex libxml2-utils |
| |
| - name: qpid-dispatch cmake configure |
| working-directory: ${{env.DispatchBuildDir}} |
| run: > |
| cmake "${{github.workspace}}" \ |
| "-DCMAKE_INSTALL_PREFIX=${InstallPrefix}" \ |
| ${DispatchCMakeExtraArgs} |
| |
| - name: CMake build for docs |
| run: cmake --build "${DispatchBuildDir}" -t docs |
| |
| - name: Store the rendered user-guide |
| uses: actions/upload-artifact@v4 |
| with: |
| name: UserGuide |
| path: ${{env.DispatchBuildDir}}/docs/books/user-guide |
| |
| - name: Store the rendered html man pages |
| uses: actions/upload-artifact@v4 |
| with: |
| name: Manpages |
| path: ${{env.DispatchBuildDir}}/docs/man/*.html |
| |
| - name: Build the PDF version of the Dispatch book |
| run: asciidoctor-pdf --failure-level INFO ${{github.workspace}}/docs/books/user-guide/book.adoc |
| |
| - name: Store the rendered Dispatch book PDF |
| uses: actions/upload-artifact@v4 |
| with: |
| name: book.pdf |
| path: ${{github.workspace}}/docs/books/user-guide/book.pdf |
| |
| console-test: |
| name: Console Tests |
| runs-on: ubuntu-latest |
| steps: |
| - uses: actions/checkout@v4 |
| |
| - name: Install Dependencies |
| run: cd console/react && npm ci |
| |
| - name: Run Tests |
| run: cd console/react && npm run test |
| |
| console-eslint: |
| name: Console ESLint |
| runs-on: ubuntu-latest |
| steps: |
| - uses: actions/checkout@v4 |
| |
| - name: Install Dependencies |
| run: cd console/react && npm ci |
| |
| - name: Run ESLint |
| run: cd console/react && npx eslint --max-warnings 0 . |
| |
| rat_check: |
| name: RAT Check |
| runs-on: ubuntu-latest |
| steps: |
| - uses: actions/checkout@v4 |
| - uses: actions/cache@v4 |
| with: |
| path: ~/.m2/repository |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
| restore-keys: | |
| ${{ runner.os }}-maven- |
| |
| - name: Install JDK ${{ matrix.java }} |
| uses: actions/setup-java@v4 |
| with: |
| distribution: 'adopt' |
| java-version: 11 |
| |
| - name: RAT Check |
| run: mvn apache-rat:check |
| |
| - name: Output |
| if: ${{ ! cancelled() }} |
| run: cat target/rat.txt || echo "Unable to print output" |
| |
| container-images: |
| name: Container Images |
| runs-on: ubuntu-latest |
| strategy: |
| fail-fast: false |
| matrix: |
| # TODO(jdanek): commented out Dockerfiles are broken and don't build |
| dockerfile: |
| - Dockerfile |
| # - dockerfiles/Dockerfile-centos7 |
| - dockerfiles/Dockerfile-debian |
| #- dockerfiles/Dockerfile-fedora |
| #- dockerfiles/Dockerfile-ubuntu |
| steps: |
| - uses: actions/checkout@v4 |
| |
| - name: Build Debian image |
| uses: docker/build-push-action@v6 |
| with: |
| file: ${{ matrix.dockerfile }} |
| context: . |