55
55
echo ============================
56
56
qmake -r PythonQt.pro CONFIG+=release CONFIG+=sanitizer CONFIG+=sanitize_undefined \
57
57
PYTHON_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2) \
58
- PYTHON_DIR =$(which python3 | xargs dirname | xargs dirname)
58
+ PYTHON_PATH =$(which python3 | xargs dirname)
59
59
make -j 2 && make check TESTARGS="-platform offscreen"
60
60
61
61
- name : Generate Wrappers
@@ -115,7 +115,7 @@ jobs:
115
115
echo ============================
116
116
qmake-qt5 -r PythonQt.pro CONFIG+=release \
117
117
PYTHON_VERSION=$(python --version | cut -d " " -f 2 | cut -d "." -f1,2) \
118
- PYTHON_DIR =$(which python | xargs dirname | xargs dirname)
118
+ PYTHON_PATH =$(which python | xargs dirname)
119
119
make -j 2 && make check TESTARGS="-platform offscreen"
120
120
121
121
- name : Generate Wrappers
@@ -173,7 +173,7 @@ jobs:
173
173
set -eu
174
174
PYTHON_VERSION_FULL=$(python --version 2>&1 | cut -f 2 -d ' ')
175
175
PYTHON_VERSION_SHORT=$(cut -f 1,2 -d . <<< $PYTHON_VERSION_FULL)
176
- QT_VERSION_FULL=$($Qt5_DIR /bin/qmake -query QT_VERSION)
176
+ QT_VERSION_FULL=$($Qt5_Dir /bin/qmake -query QT_VERSION)
177
177
QT_VERSION_SHORT=$(cut -f 1,2 -d . <<< $QT_VERSION_FULL)
178
178
MACOS_VERSION_FULL=$(sw_vers -productVersion)
179
179
MACOS_VERSION_SHORT=$(cut -f 1,2 -d . <<< $MACOS_VERSION_FULL)
@@ -197,7 +197,7 @@ jobs:
197
197
do if pkg-config --exists "$i"; then PYTHON_PKGCONFIG_NAME="$i"; break; fi; done
198
198
qmake CONFIG+=release CONFIG+=sanitizer CONFIG+=sanitize_undefined \
199
199
PYTHON_VERSION=${{ steps.versions.outputs.PYTHON_VERSION_SHORT }} \
200
- PYTHON_DIR ="$pythonLocation" \
200
+ PYTHON_PATH ="$pythonLocation" \
201
201
PKGCONFIG+=$PYTHON_PKGCONFIG_NAME \
202
202
-r PythonQt.pro
203
203
make -j 2 && make check TESTARGS="-platform offscreen"
@@ -206,11 +206,114 @@ jobs:
206
206
run : |
207
207
cd generator
208
208
# workaround to allow to find the Qt include dirs for installed standard qt packages
209
- QTDIR=-UNDEFINED- ./pythonqt_generator --include-paths=$Qt5_DIR /lib
209
+ QTDIR=-UNDEFINED- ./pythonqt_generator --include-paths=$Qt5_Dir /lib
210
210
211
211
- name : Upload Wrappers
212
212
uses : actions/upload-artifact@v3
213
213
with :
214
214
name : wrappers_macos${{ steps.versions.outputs.MACOS_VERSION_SHORT }}_qt${{ steps.versions.outputs.QT_VERSION_SHORT }}
215
215
path : generated_cpp
216
216
217
+ windows :
218
+ strategy :
219
+ fail-fast : false
220
+ matrix :
221
+ qt-arch : ['win32_msvc2015']
222
+ python-version : ['2.7']
223
+ qt-version : ['5.9.*']
224
+ python-arch : ['x86']
225
+ pythonqtall-config : ['PythonQtCore PythonQtGui PythonQtMultimedia']
226
+ # msvc-toolset: ['14.0']
227
+ include :
228
+ - qt-arch : ' win64_msvc2017_64'
229
+ python-version : ' 3.6'
230
+ python-arch : ' x64'
231
+ qt-version : ' 5.11.*'
232
+ # msvc-toolset: '14.16'
233
+
234
+ - qt-arch : ' win32_mingw53'
235
+ python-version : ' 2.7'
236
+ python-arch : ' x86'
237
+ qt-version : ' 5.11.*'
238
+
239
+ - qt-arch : ' win64_mingw73'
240
+ python-version : ' 3.10'
241
+ python-arch : ' x64'
242
+ qt-version : ' 5.12.*'
243
+ pythonqtall-config : ' '
244
+
245
+ runs-on : windows-latest
246
+ steps :
247
+
248
+ - name : Checkout PythonQt
249
+ uses : actions/checkout@v3
250
+
251
+ - name : Reset PATH
252
+ uses : egor-tensin/cleanup-path@v3
253
+
254
+ - name : Install MSVC++
255
+ uses : ilammy/msvc-dev-cmd@v1
256
+ if : ${{ contains(matrix.qt-arch, 'msvc') }}
257
+ with :
258
+ arch : amd64${{ contains(matrix.python-arch, 'x86') && '_x86' || '' }}
259
+ # toolset: ${{ matrix.msvc-toolset }}
260
+
261
+ - name : Install Qt
262
+ uses : jurplel/install-qt-action@v3
263
+ with :
264
+ aqtversion : ' ==2.1.*'
265
+ version : ${{ matrix.qt-version }}
266
+ host : ' windows'
267
+ target : ' desktop'
268
+ arch : ${{ matrix.qt-arch }}
269
+ modules : ' qtscript'
270
+ archives : ' qtwinextras qtmultimedia qtbase'
271
+ tools : ${{ contains(matrix.qt-arch, 'mingw') && format('tools_mingw,qt.tools.{0}0', matrix.qt-arch) || '' }}
272
+
273
+ - name : Setup Python ${{ matrix.python-version }}
274
+ uses : actions/setup-python@v4
275
+ with :
276
+ python-version : ' ${{ matrix.python-version }}'
277
+ architecture : ${{ matrix.python-arch }}
278
+
279
+ - name : Detect exact versions
280
+ shell : bash
281
+ id : versions
282
+ run : |
283
+ echo PATH=$PATH
284
+ set -eu
285
+ QT_VERSION_FULL=$($Qt5_Dir/bin/qmake -query QT_VERSION)
286
+ QT_VERSION_SHORT=$(cut -f 1,2 -d . <<< $QT_VERSION_FULL)
287
+ echo "QT_VERSION_FULL=$QT_VERSION_FULL" | tee -a $GITHUB_OUTPUT
288
+ echo "QT_VERSION_SHORT=$QT_VERSION_SHORT" | tee -a $GITHUB_OUTPUT
289
+ echo "CL=/MP" | tee -a $GITHUB_ENV #multicore parallel build for cl.exe
290
+
291
+ - name : Add Qt and MinGW to PATH
292
+ shell : cmd
293
+ run : |
294
+ set "ADDPATH=%Qt5_Dir%\bin"
295
+ ${{ contains(matrix.qt-arch, 'mingw') && format('FOR /F "tokens=1,2 delims=_" %%I IN ("{0}") DO SET "ADDPATH=%ADDPATH%;%IQTA_TOOLS%\%%J0_{1}\bin', matrix.qt-arch, contains(matrix.qt-arch, 'win32') && '32' || '64') || '' }}
296
+ echo PATH=%ADDPATH%;%PATH% >> %GITHUB_ENV%
297
+
298
+ - name : Build PythonQt
299
+ shell : cmd
300
+ run : |
301
+ qmake -query
302
+ qmake -Wall -d CONFIG+=release CONFIG-=debug_and_release CONFIG-=debug_and_release_target "PYTHONQTALL_CONFIG=${{ matrix.pythonqtall-config }}" "PYTHON_PATH=%pythonLocation%" -after "QMAKE_SH=" "QMAKE_LINK_OBJECT_MAX=100" PythonQt.pro
303
+ mingw32-make -j 2 && mingw32-make check "TESTARGS=-platform offscreen" || nmake && nmake check "TESTARGS=-platform offscreen"
304
+
305
+ - name : Generate Wrappers
306
+ shell : cmd
307
+ run : |
308
+ cd generator
309
+ rem Workaround to allow to find the Qt include dirs for installed standard qt packages
310
+ set QTDIR=%Qt5_Dir%
311
+ set PATH=%Qt5_Dir%\bin;%PATH%
312
+ pythonqt_generator
313
+
314
+ - name : Upload Wrappers
315
+ if : false
316
+ uses : actions/upload-artifact@v3
317
+ with :
318
+ name : wrappers_${{ matrix.qt-arch }}_${{ steps.versions.outputs.QT_VERSION_SHORT }}
319
+ path : generated_cpp
0 commit comments