You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jd...@apache.org on 2023/04/14 20:54:42 UTC
[qpid-cpp] 03/03: QPID-8635: test with Python 3.8, use qpid-python main
This is an automated email from the ASF dual-hosted git repository.
jdanek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-cpp.git
commit 4b1afd99fdec64847a2d516a6b4f3ec5468e0fe4
Author: Jiri Daněk <jd...@redhat.com>
AuthorDate: Fri Apr 14 13:40:51 2023 +0200
QPID-8635: test with Python 3.8, use qpid-python main
---
.github/workflows/build.yml | 43 +++++++++++++++++++++++++++++++++----------
.github/workflows/codeql.yml | 5 +----
2 files changed, 34 insertions(+), 14 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 2db19c4ec..5b3c11a39 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -9,6 +9,8 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-20.04, windows-latest ]
+ # https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
+ python-version: [ "2.7", "3.8" ]
buildType: [ RelWithDebInfo ]
include:
- os: ubuntu-20.04
@@ -30,9 +32,10 @@ jobs:
- uses: actions/checkout@v3
- name: Setup python
+ id: python
uses: actions/setup-python@v4
with:
- python-version: 2.7
+ python-version: ${{ matrix.python-version }}
architecture: x64
# Cannot use https://github.com/ilammy/msvc-dev-cmd/blob/a742a854f54111d83b78e97091b5d85ccdaa3e89/index.js#L163
@@ -56,12 +59,6 @@ jobs:
}
shell: pwsh
- # it's weird that it needs qpid-python for tests; one would guess this is built in this repo, but it is not
- - name: Install python dependencies
- run: |
- python -m pip install --upgrade pip
- python -m pip install setuptools qpid-python
-
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
@@ -80,9 +77,9 @@ jobs:
libibverbs-dev librdmacm-dev \
libdb++-dev libaio-dev \
libqpid-proton11-dev libqpid-proton-core10 libqpid-proton-proactor1 \
- swig3.0 python-dev ruby2.6 ruby2.6-dev \
+ swig3.0 ruby2.6 ruby2.6-dev \
uuid-dev libnss3-dev libnss3-tools libsasl2-dev sasl2-bin \
- valgrind
+ valgrind
sccache_version=v0.4.1
wget -q https://github.com/mozilla/sccache/releases/download/${sccache_version}/sccache-${sccache_version}-x86_64-unknown-linux-musl.tar.gz
@@ -91,6 +88,31 @@ jobs:
sudo chmod +x /usr/bin/sccache
shell: bash
+ - name: Install python dependencies
+ run: |
+ ${{ steps.python.outputs.python-path }} -m pip install --upgrade pip
+ ${{ steps.python.outputs.python-path }} -m pip install setuptools
+
+ - name: Fetch qpid-python from git
+ if: matrix.python-version != '2.7'
+ uses: actions/checkout@v3
+ with:
+ repository: apache/qpid-python
+ ref: main
+ path: qpid-python
+
+ # We require qpid-python, which is a python2-only library, to run broker tests
+ - name: Install qpid-python (released version)
+ if: matrix.python-version == '2.7'
+ run: |
+ ${{ steps.python.outputs.python-path }} -m pip install qpid-python
+
+ - name: Install qpid-python (git version)
+ if: matrix.python-version != '2.7'
+ run: |
+ cd qpid-python
+ ${{ steps.python.outputs.python-path }} setup.py install
+
- name: Cache scoop (restore) (on Windows)
uses: actions/cache/restore@v3
id: restore-scoop-cache
@@ -183,6 +205,7 @@ jobs:
-DCMAKE_C_COMPILER_LAUNCHER="sccache" -DCMAKE_CXX_COMPILER_LAUNCHER="sccache" `
"-DCMAKE_BUILD_TYPE=${{env.BuildType}}" `
"-DCMAKE_INSTALL_PREFIX=${{env.InstallPrefix}}" `
+ "-DPYTHON_EXECUTABLE=${{ steps.python.outputs.python-path }}" `
${{matrix.cmake_extra}}
shell: pwsh
@@ -203,7 +226,7 @@ jobs:
- id: ctest
name: ctest
working-directory: ${{env.BuildDir}}
- run: PYTHONPATH=${InstallPrefix}/lib/python2.7/site-packages ctest -C ${BuildType} -V -T Test --no-compress-output ${{matrix.ctest_extra}}
+ run: PYTHONPATH=${InstallPrefix}/lib/python${{ matrix.python-version }}/site-packages ctest -C ${BuildType} -V -T Test --no-compress-output ${{matrix.ctest_extra}}
shell: bash
- name: Upload Test results
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 717b81560..31de0aadb 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -58,12 +58,9 @@ jobs:
libxqilla-dev libxerces-c-dev \
libibverbs-dev librdmacm-dev \
libdb++-dev libaio-dev \
- swig python2-dev ruby-dev \
+ swig python3-dev ruby-dev \
uuid-dev libnss3-dev libnss3-tools libsasl2-dev sasl2-bin
- curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
- python2 get-pip.py
-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org