-
Notifications
You must be signed in to change notification settings - Fork 1.6k
73 lines (59 loc) · 2.07 KB
/
Copy pathCI-windows.yml
File metadata and controls
73 lines (59 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
name: CI-windows
on:
push:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
permissions:
contents: read
defaults:
run:
shell: cmd
jobs:
build_qt:
strategy:
matrix:
os: [windows-2025]
qt_ver: [6.10.0]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Visual Studio environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install Qt ${{ matrix.qt_ver }}
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt_ver }}
modules: 'qtcharts'
setup-python: 'false'
cache: true
- name: Run CMake
run: |
rem TODO: enable rules?
cmake -S . -B build -Werror=dev --warn-uninitialized -DCMAKE_BUILD_TYPE=Debug -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DBUILD_TESTING=Off -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DBUILD_ONLINE_HELP=On -DISABLE_DMAKE=On -DCMAKE_INSTALL_PREFIX=cppcheck-cmake-install -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel!
- name: Build GUI
run: |
cmake --build build --config Debug --target cppcheck-gui || exit /b !errorlevel!
# TODO: can this be done in CMake?
- name: Deploy GUI
run: |
windeployqt --no-translations build\bin\Debug || exit /b !errorlevel!
del build\bin\Debug\cppcheck-gui.pdb || exit /b !errorlevel!
# TODO: run GUI tests
- name: Run CMake install
run: |
rem TODO: the Qt DLLs are not being installed
cmake --build build --config Debug --target install
rem TODO: validate the installed files
rem TODO: the structure does not match an actual Windows installation