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
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
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 : |
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
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
0 commit comments