Skip to content

Commit 4b1afd9

Browse files
committed
QPID-8635: test with Python 3.8, use qpid-python main
1 parent dd442da commit 4b1afd9

File tree

2 files changed

+34
-14
lines changed

2 files changed

+34
-14
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
fail-fast: false
1010
matrix:
1111
os: [ ubuntu-20.04, windows-latest ]
12+
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
13+
python-version: [ "2.7", "3.8" ]
1214
buildType: [ RelWithDebInfo ]
1315
include:
1416
- os: ubuntu-20.04
@@ -30,9 +32,10 @@ jobs:
3032
- uses: actions/checkout@v3
3133

3234
- name: Setup python
35+
id: python
3336
uses: actions/setup-python@v4
3437
with:
35-
python-version: 2.7
38+
python-version: ${{ matrix.python-version }}
3639
architecture: x64
3740

3841
# Cannot use https://github.com/ilammy/msvc-dev-cmd/blob/a742a854f54111d83b78e97091b5d85ccdaa3e89/index.js#L163
@@ -56,12 +59,6 @@ jobs:
5659
}
5760
shell: pwsh
5861

59-
# it's weird that it needs qpid-python for tests; one would guess this is built in this repo, but it is not
60-
- name: Install python dependencies
61-
run: |
62-
python -m pip install --upgrade pip
63-
python -m pip install setuptools qpid-python
64-
6562
- name: Install Linux dependencies
6663
if: runner.os == 'Linux'
6764
run: |
@@ -80,9 +77,9 @@ jobs:
8077
libibverbs-dev librdmacm-dev \
8178
libdb++-dev libaio-dev \
8279
libqpid-proton11-dev libqpid-proton-core10 libqpid-proton-proactor1 \
83-
swig3.0 python-dev ruby2.6 ruby2.6-dev \
80+
swig3.0 ruby2.6 ruby2.6-dev \
8481
uuid-dev libnss3-dev libnss3-tools libsasl2-dev sasl2-bin \
85-
valgrind
82+
valgrind
8683
8784
sccache_version=v0.4.1
8885
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:
9188
sudo chmod +x /usr/bin/sccache
9289
shell: bash
9390

91+
- name: Install python dependencies
92+
run: |
93+
${{ steps.python.outputs.python-path }} -m pip install --upgrade pip
94+
${{ steps.python.outputs.python-path }} -m pip install setuptools
95+
96+
- name: Fetch qpid-python from git
97+
if: matrix.python-version != '2.7'
98+
uses: actions/checkout@v3
99+
with:
100+
repository: apache/qpid-python
101+
ref: main
102+
path: qpid-python
103+
104+
# We require qpid-python, which is a python2-only library, to run broker tests
105+
- name: Install qpid-python (released version)
106+
if: matrix.python-version == '2.7'
107+
run: |
108+
${{ steps.python.outputs.python-path }} -m pip install qpid-python
109+
110+
- name: Install qpid-python (git version)
111+
if: matrix.python-version != '2.7'
112+
run: |
113+
cd qpid-python
114+
${{ steps.python.outputs.python-path }} setup.py install
115+
94116
- name: Cache scoop (restore) (on Windows)
95117
uses: actions/cache/restore@v3
96118
id: restore-scoop-cache
@@ -183,6 +205,7 @@ jobs:
183205
-DCMAKE_C_COMPILER_LAUNCHER="sccache" -DCMAKE_CXX_COMPILER_LAUNCHER="sccache" `
184206
"-DCMAKE_BUILD_TYPE=${{env.BuildType}}" `
185207
"-DCMAKE_INSTALL_PREFIX=${{env.InstallPrefix}}" `
208+
"-DPYTHON_EXECUTABLE=${{ steps.python.outputs.python-path }}" `
186209
${{matrix.cmake_extra}}
187210
shell: pwsh
188211

@@ -203,7 +226,7 @@ jobs:
203226
- id: ctest
204227
name: ctest
205228
working-directory: ${{env.BuildDir}}
206-
run: PYTHONPATH=${InstallPrefix}/lib/python2.7/site-packages ctest -C ${BuildType} -V -T Test --no-compress-output ${{matrix.ctest_extra}}
229+
run: PYTHONPATH=${InstallPrefix}/lib/python${{ matrix.python-version }}/site-packages ctest -C ${BuildType} -V -T Test --no-compress-output ${{matrix.ctest_extra}}
207230
shell: bash
208231

209232
- name: Upload Test results

.github/workflows/codeql.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,9 @@ jobs:
5858
libxqilla-dev libxerces-c-dev \
5959
libibverbs-dev librdmacm-dev \
6060
libdb++-dev libaio-dev \
61-
swig python2-dev ruby-dev \
61+
swig python3-dev ruby-dev \
6262
uuid-dev libnss3-dev libnss3-tools libsasl2-dev sasl2-bin
6363
64-
curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
65-
python2 get-pip.py
66-
6764
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
6865
# If this step fails, then you should remove it and run the build manually (see below)
6966
- name: Autobuild

0 commit comments

Comments
 (0)