From 9da31a4b3c79aa93c793a8fb15373cddfe4c49e3 Mon Sep 17 00:00:00 2001 From: firewave Date: Sat, 21 Sep 2024 19:21:42 +0200 Subject: [PATCH 1/4] CI-windows.yml: actually build release with CMake in `build_qt` job --- .github/workflows/CI-windows.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index 420c470fa5a..25b6a7f8abf 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -66,8 +66,10 @@ 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 From 404db585ff195c50a72718d2e98cdfd64f4f30af Mon Sep 17 00:00:00 2001 From: firewave Date: Sat, 21 Sep 2024 19:34:38 +0200 Subject: [PATCH 2/4] CI-windows.yml: deploy GUI with Qt 6 and CMake --- .github/workflows/CI-windows.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index 25b6a7f8abf..06047d7f68e 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -71,7 +71,12 @@ jobs: 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! build: strategy: From 069fdd818c964655ee083b6785db1e3d084b52a0 Mon Sep 17 00:00:00 2001 From: firewave Date: Sat, 21 Sep 2024 19:36:03 +0200 Subject: [PATCH 3/4] release-windows.yml: build with CMake --- .github/workflows/release-windows.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index ced557ae694..ec732c06bcc 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -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 @@ -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! From cbb4864830ea87e27f9e8679d62abd74ea48c6e8 Mon Sep 17 00:00:00 2001 From: firewave Date: Mon, 23 Sep 2024 11:38:10 +0200 Subject: [PATCH 4/4] CI-windows.yml: added TODO --- .github/workflows/CI-windows.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index 06047d7f68e..aa50c4f79c9 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -78,6 +78,8 @@ jobs: 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: matrix: