Skip to content

Commit

Permalink
Add Windows to CI for checking generated sources
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbean-bremen committed Nov 26, 2023
1 parent 9674bee commit 0480825
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
36 changes: 30 additions & 6 deletions .github/workflows/build_latest.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Qt5 check generated_cpp
name: Check generated_cpp

on:
push:
branches:
- master
# - master
pull_request:

defaults:
Expand All @@ -15,17 +15,25 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['ubuntu', 'windows']
qt-version: [ '5.12.*', '5.15.*', '6.5.*' ]
python-version: [ '3.12' ]
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}-latest
steps:

- name: Install MSVC
if: ${{ matrix.os == 'windows' }}
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64

- name: Install Qt ${{matrix.qt-version}}
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt-version }}
modules: ${{startsWith(matrix.qt-version, '6') && 'qt5compat' || '' }}
archives: 'qtmultimedia qtlinuxextras qtbase qttools icu qtwayland'
arch: ${{ matrix.os == 'ubuntu' && 'gcc_64' || (startsWith(matrix.qt-version, '5.12') && 'win64_msvc2017_64' || 'win64_msvc2019_64') }}
archives: "qtmultimedia qtbase qttools ${{ matrix.os == 'windows' && 'qtwinextras' || 'qtlinuxextras qtwayland icu' }}"

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand Down Expand Up @@ -64,10 +72,11 @@ jobs:
- name: Upload Wrappers
uses: actions/upload-artifact@v3
with:
name: wrappers_ubuntu_${{ steps.setenv.outputs.QT_VERSION_SHORT }}
name: wrappers_${{ matrix.os }}_${{ steps.setenv.outputs.QT_VERSION_SHORT }}
path: generated_cpp

- name: Build PythonQt
- name: Build PythonQt Ubuntu
if: ${{ matrix.os == 'ubuntu' }}
run: |
echo ======= SYSTEM INFO ========
uname -a; gcc --version | grep "gcc"; python3 --version; qmake --version
Expand All @@ -79,3 +88,18 @@ jobs:
make -j $(nproc)
UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \
make check TESTARGS="-platform offscreen"
- name: Build PythonQt Windows
shell: cmd
if: ${{ matrix.os == 'windows' }}
run: |
qmake -query
python --version
qmake CONFIG+=release CONFIG-=debug_and_release CONFIG-=debug_and_release_target ^
"PYTHONQTALL_CONFIG=${{ matrix.pythonqtall-config }}" ^
"PYTHON_PATH=%pythonLocation%" ^
"PYTHON_VERSION=${{ steps.versions.outputs.PYTHON_VERSION_SHORT }}" ^
PythonQt.pro
mingw32-make -j 2 && mingw32-make check "TESTARGS=-platform offscreen" ^
|| nmake && nmake check "TESTARGS=-platform offscreen"
2 changes: 1 addition & 1 deletion generator/generator.pri
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ win32-msvc*{
QMAKE_CXXFLAGS += -wd4996
QMAKE_CFLAGS += -wd4996
#Disable warnings for external headers
greaterThan(QMAKE_MSC_VER, 1599):QMAKE_CXXFLAGS += -external:anglebrackets -external:W0 -external:templates-
greaterThan(QMAKE_MSC_VER, 1599):QMAKE_CXXFLAGS += -external:anglebrackets -external:W0 -external:templates
}
#Do not issue warning to Qt's system includes
gcc:!isEmpty(QT_INSTALL_HEADERS): QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS]
Expand Down

0 comments on commit 0480825

Please sign in to comment.