Skip to content

Commit c0370c7

Browse files
authored
refs #12066 - build GUI release for Windows with CMake (danmar#6815)
1 parent f4d15c9 commit c0370c7

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

.github/workflows/CI-windows.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,19 @@ jobs:
6666
- name: Build GUI release (CMake)
6767
if: startsWith(matrix.qt_ver, '6')
6868
run: |
69-
cmake -S . -B build -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On || exit /b !errorlevel!
70-
cmake --build build --target cppcheck-gui || exit /b !errorlevel!
69+
; TODO: enable rules?
70+
; specify Release build so matchcompiler is used
71+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On || exit /b !errorlevel!
72+
cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel!
7173
72-
# TODO: deploy with CMake/Qt6
74+
- name: Deploy GUI
75+
if: startsWith(matrix.qt_ver, '6')
76+
run: |
77+
windeployqt build\bin\Release || exit /b !errorlevel!
78+
del build\bin\Release\cppcheck-gui.ilk || exit /b !errorlevel!
79+
del build\bin\Release\cppcheck-gui.pdb || exit /b !errorlevel!
80+
81+
# TODO: run GUI tests
7382

7483
build:
7584
strategy:

.github/workflows/release-windows.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,21 @@ jobs:
7575
lupdate gui.pro -no-obsolete || exit /b !errorlevel!
7676
lrelease gui.pro -removeidentical || exit /b !errorlevel!
7777
78-
- name: Matchcompiler
79-
run: python tools\matchcompiler.py --write-dir lib || exit /b !errorlevel!
80-
8178
- name: Build x64 release GUI
8279
run: |
83-
cd gui || exit /b !errorlevel!
84-
qmake HAVE_QCHART=yes || exit /b !errorlevel!
85-
nmake release || exit /b !errorlevel!
86-
env:
87-
CL: /MP
80+
; TODO: enable rules?
81+
; specify Release build so matchcompiler is used
82+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On || exit /b !errorlevel!
83+
cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel!
8884
8985
- name: Deploy app
9086
run: |
91-
windeployqt Build\gui || exit /b !errorlevel!
92-
del Build\gui\cppcheck-gui.ilk || exit /b !errorlevel!
93-
del Build\gui\cppcheck-gui.pdb || exit /b !errorlevel!
87+
windeployqt build\bin\Release || exit /b !errorlevel!
88+
del build\bin\Release\cppcheck-gui.ilk || exit /b !errorlevel!
89+
del build\bin\Release\cppcheck-gui.pdb || exit /b !errorlevel!
90+
91+
- name: Matchcompiler
92+
run: python tools\matchcompiler.py --write-dir lib || exit /b !errorlevel!
9493

9594
# TODO: build with boost enabled
9695
- name: Build CLI x64 release configuration using MSBuild
@@ -105,7 +104,7 @@ jobs:
105104
106105
- name: Collect files
107106
run: |
108-
move Build\gui win_installer\files || exit /b !errorlevel!
107+
move build\bin\Release win_installer\files || exit /b !errorlevel!
109108
mkdir win_installer\files\addons || exit /b !errorlevel!
110109
copy addons\*.* win_installer\files\addons || exit /b !errorlevel!
111110
copy addons\dist\misra\*.* win_installer\files\addons || exit /b !errorlevel!

0 commit comments

Comments
 (0)