Skip to content

Commit

Permalink
refs #12066 - build GUI release for Windows with CMake (danmar#6815)
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave authored and Ludvig Gunne Lindström committed Oct 19, 2024
1 parent a781300 commit 6ef3512
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/CI-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,19 @@ jobs:
- name: Build GUI release (CMake)
if: startsWith(matrix.qt_ver, '6')
run: |
cmake -S . -B build -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On || exit /b !errorlevel!
cmake --build build --target cppcheck-gui || exit /b !errorlevel!
; TODO: enable rules?
; specify Release build so matchcompiler is used
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On || exit /b !errorlevel!
cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel!
# TODO: deploy with CMake/Qt6
- name: Deploy GUI
if: startsWith(matrix.qt_ver, '6')
run: |
windeployqt build\bin\Release || exit /b !errorlevel!
del build\bin\Release\cppcheck-gui.ilk || exit /b !errorlevel!
del build\bin\Release\cppcheck-gui.pdb || exit /b !errorlevel!
# TODO: run GUI tests

build:
strategy:
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/release-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,21 @@ jobs:
lupdate gui.pro -no-obsolete || exit /b !errorlevel!
lrelease gui.pro -removeidentical || exit /b !errorlevel!
- name: Matchcompiler
run: python tools\matchcompiler.py --write-dir lib || exit /b !errorlevel!

- name: Build x64 release GUI
run: |
cd gui || exit /b !errorlevel!
qmake HAVE_QCHART=yes || exit /b !errorlevel!
nmake release || exit /b !errorlevel!
env:
CL: /MP
; TODO: enable rules?
; specify Release build so matchcompiler is used
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On || exit /b !errorlevel!
cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel!
- name: Deploy app
run: |
windeployqt Build\gui || exit /b !errorlevel!
del Build\gui\cppcheck-gui.ilk || exit /b !errorlevel!
del Build\gui\cppcheck-gui.pdb || exit /b !errorlevel!
windeployqt build\bin\Release || exit /b !errorlevel!
del build\bin\Release\cppcheck-gui.ilk || exit /b !errorlevel!
del build\bin\Release\cppcheck-gui.pdb || exit /b !errorlevel!
- name: Matchcompiler
run: python tools\matchcompiler.py --write-dir lib || exit /b !errorlevel!

# TODO: build with boost enabled
- name: Build CLI x64 release configuration using MSBuild
Expand All @@ -105,7 +104,7 @@ jobs:
- name: Collect files
run: |
move Build\gui win_installer\files || exit /b !errorlevel!
move build\bin\Release win_installer\files || exit /b !errorlevel!
mkdir win_installer\files\addons || exit /b !errorlevel!
copy addons\*.* win_installer\files\addons || exit /b !errorlevel!
copy addons\dist\misra\*.* win_installer\files\addons || exit /b !errorlevel!
Expand Down

0 comments on commit 6ef3512

Please sign in to comment.