1- name : Qt5 check generated_cpp
1+ name : Check generated_cpp
22
33on :
44 push :
55 branches :
6- - master
6+ - master
77 pull_request :
88
99defaults :
1010 run :
1111 shell : bash
1212
1313jobs :
14- ubuntu :
14+ build :
1515 strategy :
1616 fail-fast : false
1717 matrix :
18+ os : ['ubuntu', 'windows']
1819 qt-version : [ '5.12.*', '5.15.*', '6.5.*' ]
1920 python-version : [ '3.12' ]
20- runs-on : ubuntu -latest
21+ runs-on : ${{ matrix.os }} -latest
2122 steps :
2223
24+ - name : Install MSVC
25+ if : ${{ matrix.os == 'windows' }}
26+ uses : ilammy/msvc-dev-cmd@v1
27+ with :
28+ arch : amd64
29+
2330 - name : Install Qt ${{matrix.qt-version}}
2431 uses : jurplel/install-qt-action@v3
2532 with :
2633 version : ${{ matrix.qt-version }}
2734 modules : ${{startsWith(matrix.qt-version, '6') && 'qt5compat' || '' }}
28- archives : ' qtmultimedia qtlinuxextras qtbase qttools icu qtwayland'
35+ arch : ${{ matrix.os == 'ubuntu' && 'gcc_64' || (startsWith(matrix.qt-version, '5.12') && 'win64_msvc2017_64' || 'win64_msvc2019_64') }}
36+ archives : " qtmultimedia qtbase qttools ${{ matrix.os == 'windows' && 'qtwinextras' || 'qtlinuxextras qtwayland icu' }}"
2937
3038 - name : Setup Python ${{ matrix.python-version }}
3139 uses : actions/setup-python@v4
@@ -43,31 +51,47 @@ jobs:
4351 QT_VERSION_SHORT=$(cut -f 1,2 -d . <<< "${{matrix.qt-version}}")
4452 echo "QT_VERSION_SHORT=$QT_VERSION_SHORT" >> $GITHUB_OUTPUT
4553 QTDIR=$(eval echo "\$Qt${QT_VERSION_MAJOR}_DIR")
54+ PYTHON_VERSION_FULL=$(python --version 2>&1 | cut -f 2 -d ' ')
55+ PYTHON_VERSION_SHORT=$(cut -f 1,2 -d . <<< $PYTHON_VERSION_FULL)
56+ echo "PYTHON_VERSION_SHORT=$PYTHON_VERSION_SHORT" >> $GITHUB_OUTPUT
4657 echo "QTDIR=$QTDIR" >> $GITHUB_ENV
4758 echo "$QTDIR/bin" >> $GITHUB_PATH
4859 echo "$pythonLocation/bin" >> $GITHUB_PATH
4960
50- - name : Build generator
61+ - name : Build generator Ubuntu
62+ shell : bash
63+ if : ${{ matrix.os == 'ubuntu' }}
5164 run : |
5265 cd generator
53- qmake -r generator.pro CONFIG+=release CONFIG+=force_debug_info \
66+ qmake -r generator.pro CONFIG+=release CONFIG-=debug_and_release CONFIG +=force_debug_info \
5467 CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address
5568 make -j $(nproc)
5669
70+ - name : Build generator Windows
71+ shell : cmd
72+ if : ${{ matrix.os == 'windows' }}
73+ run : |
74+ cd generator
75+ qmake CONFIG+=release CONFIG-=debug_and_release CONFIG-=debug_and_release_target generator.pro
76+ nmake
77+
5778 - name : Generate Wrappers
79+ shell : bash
5880 run : |
5981 cd generator
82+ if [[ ${{ matrix.os }} == 'windows' && ${{ matrix.qt-version }} =~ '5.1' ]]; then export QTDIR=$Qt5_Dir; fi
6083 UBSAN_OPTIONS="halt_on_error=1" \
6184 ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \
6285 ./pythonqt_generator
6386
6487 - name : Upload Wrappers
6588 uses : actions/upload-artifact@v3
6689 with :
67- name : wrappers_ubuntu_ ${{ steps.setenv.outputs.QT_VERSION_SHORT }}
90+ name : wrappers_${{ matrix.os }}_ ${{ steps.setenv.outputs.QT_VERSION_SHORT }}
6891 path : generated_cpp
6992
70- - name : Build PythonQt
93+ - name : Build PythonQt Ubuntu
94+ if : ${{ matrix.os == 'ubuntu' }}
7195 run : |
7296 echo ======= SYSTEM INFO ========
7397 uname -a; gcc --version | grep "gcc"; python3 --version; qmake --version
@@ -79,3 +103,17 @@ jobs:
79103 make -j $(nproc)
80104 UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \
81105 make check TESTARGS="-platform offscreen"
106+
107+ - name : Build PythonQt Windows
108+ shell : cmd
109+ if : ${{ matrix.os == 'windows' }}
110+ run : |
111+ qmake -query
112+ python --version
113+ qmake CONFIG+=release CONFIG-=debug_and_release CONFIG-=debug_and_release_target ^
114+ "PYTHONQTALL_CONFIG=${{ matrix.pythonqtall-config }}" ^
115+ "PYTHON_PATH=%pythonLocation%" ^
116+ "PYTHON_VERSION=${{ steps.setenv.outputs.PYTHON_VERSION_SHORT }}" ^
117+ PythonQt.pro
118+ nmake && nmake check "TESTARGS=-platform offscreen"
119+
0 commit comments