@@ -173,7 +173,7 @@ jobs:
173173 set -eu
174174 PYTHON_VERSION_FULL=$(python --version 2>&1 | cut -f 2 -d ' ')
175175 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)
177177 QT_VERSION_SHORT=$(cut -f 1,2 -d . <<< $QT_VERSION_FULL)
178178 MACOS_VERSION_FULL=$(sw_vers -productVersion)
179179 MACOS_VERSION_SHORT=$(cut -f 1,2 -d . <<< $MACOS_VERSION_FULL)
@@ -197,7 +197,7 @@ jobs:
197197 do if pkg-config --exists "$i"; then PYTHON_PKGCONFIG_NAME="$i"; break; fi; done
198198 qmake CONFIG+=release CONFIG+=sanitizer CONFIG+=sanitize_undefined \
199199 PYTHON_VERSION=${{ steps.versions.outputs.PYTHON_VERSION_SHORT }} \
200- PYTHON_DIR ="$pythonLocation" \
200+ PYTHON_PATH ="$pythonLocation" \
201201 PKGCONFIG+=$PYTHON_PKGCONFIG_NAME \
202202 -r PythonQt.pro
203203 make -j 2 && make check TESTARGS="-platform offscreen"
@@ -206,11 +206,120 @@ jobs:
206206 run : |
207207 cd generator
208208 # 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
210210
211211 - name : Upload Wrappers
212212 uses : actions/upload-artifact@v3
213213 with :
214214 name : wrappers_macos${{ steps.versions.outputs.MACOS_VERSION_SHORT }}_qt${{ steps.versions.outputs.QT_VERSION_SHORT }}
215215 path : generated_cpp
216216
217+ windows :
218+ strategy :
219+ fail-fast : false
220+ matrix :
221+ qt-arch : ['win64_mingw73']
222+ python-version : ['3.10']
223+ qt-version : ['5.12.*']
224+ python-arch : ['x64']
225+ pythonqtall-config : ['']
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+ # Either MSVC2015 is sick or Qt5.9 is buggy :(
240+ # Main problem is QBasicMutex with default ctor, that (by no means) is missing in dll-export of QtCore, but linker tries to find it
241+ # - qt-arch: 'win32_msvc2015'
242+ # python-version: '2.7'
243+ # python-arch: 'x86'
244+ # qt-version: '5.9.*'
245+ # pythonqtall-config: 'PythonQtCore PythonQtGui PythonQtMultimedia'
246+
247+ runs-on : windows-latest
248+ steps :
249+
250+ - name : Checkout PythonQt
251+ uses : actions/checkout@v3
252+
253+ - name : Reset PATH
254+ uses : egor-tensin/cleanup-path@v3
255+
256+ - name : Install MSVC++
257+ uses : ilammy/msvc-dev-cmd@v1
258+ if : ${{ contains(matrix.qt-arch, 'msvc') }}
259+ with :
260+ arch : amd64${{ contains(matrix.python-arch, 'x86') && '_x86' || '' }}
261+
262+ - name : Install Qt
263+ uses : jurplel/install-qt-action@v3
264+ with :
265+ aqtversion : ' ==2.1.*'
266+ version : ${{ matrix.qt-version }}
267+ host : ' windows'
268+ target : ' desktop'
269+ arch : ${{ matrix.qt-arch }}
270+ modules : ' qtscript'
271+ archives : ' qtwinextras qtmultimedia qtbase'
272+ tools : ${{ contains(matrix.qt-arch, 'mingw') && format('tools_mingw,qt.tools.{0}0', matrix.qt-arch) || '' }}
273+
274+ - name : Setup Python ${{ matrix.python-version }}
275+ uses : actions/setup-python@v4
276+ with :
277+ python-version : ' ${{ matrix.python-version }}'
278+ architecture : ${{ matrix.python-arch }}
279+
280+ - name : Detect exact versions
281+ shell : bash
282+ id : versions
283+ run : |
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+ PYTHON_VERSION_FULL=$(python --version 2>&1 | cut -f 2 -d ' ')
288+ PYTHON_VERSION_SHORT=$(cut -f 1,2 -d . <<< $PYTHON_VERSION_FULL)
289+ echo "QT_VERSION_FULL=$QT_VERSION_FULL" | tee -a $GITHUB_OUTPUT
290+ echo "QT_VERSION_SHORT=$QT_VERSION_SHORT" | tee -a $GITHUB_OUTPUT
291+ echo "PYTHON_VERSION_SHORT=$PYTHON_VERSION_SHORT" | tee -a $GITHUB_OUTPUT
292+
293+ - name : Add Qt and MinGW to PATH
294+ shell : cmd
295+ run : |
296+ set "ADDPATH=%Qt5_Dir%\bin"
297+ ${{ 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') || '' }}
298+ echo PATH=%ADDPATH%;%PATH% >> %GITHUB_ENV%
299+ echo CL=/MP >> $GITHUB_ENV
300+
301+ - name : Build PythonQt
302+ shell : cmd
303+ run : |
304+ qmake -query
305+ python --version
306+ qmake CONFIG+=release CONFIG-=debug_and_release CONFIG-=debug_and_release_target ^
307+ "PYTHONQTALL_CONFIG=${{ matrix.pythonqtall-config }}" ^
308+ "PYTHON_PATH=%pythonLocation%" ^
309+ "PYTHON_VERSION=${{ steps.versions.outputs.PYTHON_VERSION_SHORT }}" ^
310+ PythonQt.pro
311+ mingw32-make -j 2 && mingw32-make check "TESTARGS=-platform offscreen" ^
312+ || nmake && nmake check "TESTARGS=-platform offscreen"
313+
314+ - name : Generate Wrappers
315+ shell : cmd
316+ run : |
317+ cd generator
318+ set QTDIR=%Qt5_Dir%
319+ pythonqt_generator
320+
321+ - name : Upload Wrappers
322+ uses : actions/upload-artifact@v3
323+ with :
324+ name : wrappers_${{ matrix.qt-arch }}_${{ steps.versions.outputs.QT_VERSION_SHORT }}
325+ path : generated_cpp
0 commit comments