-
Notifications
You must be signed in to change notification settings - Fork 29
75 lines (63 loc) · 2.07 KB
/
cmake-windows.yml
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
74
75
name: CMake (Windows)
on: [push, pull_request]
env:
BUILD_TYPE: RelWithDebInfo
BUILD_NUMBER: ${{github.run_number}}
CMAKE_BUILD_PARALLEL_LEVEL: 4
jobs:
build:
runs-on: ${{ matrix.image }}
strategy:
matrix:
vcver: [142, 143]
include:
- vcver: 142
image: windows-2019
- vcver: 143
image: windows-2022
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Prepare vcpkg and libraries
uses: lukka/run-vcpkg@v7
with:
vcpkgArguments: gtest openssl
vcpkgTriplet: x64-windows
vcpkgGitCommitId: 1f619be01b436b796dab797dd1e1721c5676f8ac
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 6.7.2
arch: win64_msvc2019_64
- name: Setup MS Visual C++ dev env
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install WiX
run: |
dotnet tool install --global wix --version 5.0.1
wix extension -g add WixToolset.UI.wixext/5.0.1
wix extension -g add WixToolset.Util.wixext/5.0.1
wix extension -g add WixToolset.BootstrapperApplications.wixext/5.0.1
- name: Configure
run: |
cmake "-GNinja" -S . -B build `
"-DCMAKE_TOOLCHAIN_FILE=${env:RUNVCPKG_VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" `
"-DCMAKE_BUILD_TYPE=${env:BUILD_TYPE}"
- name: Build
run: |
cmake --build build --config ${env:BUILD_TYPE}
cmake --build build --config ${env:BUILD_TYPE} --target installer
cmake --build build --config ${env:BUILD_TYPE} --target bundle
- name: Test
run: ctest -V -C ${env:BUILD_TYPE} --test-dir build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: web-eid-app-windows-build-VC${{matrix.vcver}}-${{github.run_number}}
path: |
build/src/app/*.msi
build/src/app/*.exe
build/**/*.pdb