9
9
fail-fast : false
10
10
matrix :
11
11
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" ]
12
14
buildType : [ RelWithDebInfo ]
13
15
include :
14
16
- os : ubuntu-20.04
30
32
- uses : actions/checkout@v3
31
33
32
34
- name : Setup python
35
+ id : python
33
36
uses : actions/setup-python@v4
34
37
with :
35
- python-version : 2.7
38
+ python-version : ${{ matrix.python-version }}
36
39
architecture : x64
37
40
38
41
# Cannot use https://github.com/ilammy/msvc-dev-cmd/blob/a742a854f54111d83b78e97091b5d85ccdaa3e89/index.js#L163
56
59
}
57
60
shell : pwsh
58
61
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
-
65
62
- name : Install Linux dependencies
66
63
if : runner.os == 'Linux'
67
64
run : |
80
77
libibverbs-dev librdmacm-dev \
81
78
libdb++-dev libaio-dev \
82
79
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 \
84
81
uuid-dev libnss3-dev libnss3-tools libsasl2-dev sasl2-bin \
85
- valgrind
82
+ valgrind
86
83
87
84
sccache_version=v0.4.1
88
85
wget -q https://github.com/mozilla/sccache/releases/download/${sccache_version}/sccache-${sccache_version}-x86_64-unknown-linux-musl.tar.gz
91
88
sudo chmod +x /usr/bin/sccache
92
89
shell : bash
93
90
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
+
94
116
- name : Cache scoop (restore) (on Windows)
95
117
uses : actions/cache/restore@v3
96
118
id : restore-scoop-cache
@@ -183,6 +205,7 @@ jobs:
183
205
-DCMAKE_C_COMPILER_LAUNCHER="sccache" -DCMAKE_CXX_COMPILER_LAUNCHER="sccache" `
184
206
"-DCMAKE_BUILD_TYPE=${{env.BuildType}}" `
185
207
"-DCMAKE_INSTALL_PREFIX=${{env.InstallPrefix}}" `
208
+ "-DPYTHON_EXECUTABLE=${{ steps.python.outputs.python-path }}" `
186
209
${{matrix.cmake_extra}}
187
210
shell : pwsh
188
211
@@ -203,7 +226,7 @@ jobs:
203
226
- id : ctest
204
227
name : ctest
205
228
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}}
207
230
shell : bash
208
231
209
232
- name : Upload Test results
0 commit comments