-
-
Notifications
You must be signed in to change notification settings - Fork 32
93 lines (82 loc) · 2.96 KB
/
build.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: VS 2022
on:
workflow_dispatch:
pull_request:
schedule:
- cron: 0 4 * * WED
push:
branches:
- main
jobs:
build:
name: build (${{ matrix.run-code-analysis && format('{0}, code analysis', matrix.platform) || format('{0}, {1}, {2}', matrix.platform, matrix.toolset, matrix.configuration) }})
runs-on: windows-2022
continue-on-error: ${{ matrix.allowed-failure == true }}
strategy:
matrix:
toolset: ["v143", "clang"]
platform: ["win32", "x64"]
configuration: ["release", "debug"]
run-code-analysis: [false]
include:
- toolset: v143
configuration: release
enable-annotations: true
publish-artefacts: true
- toolset: v143
configuration: release
platform: x64
enable-annotations: true
publish-artefacts: true
- toolset: clang
additional-build-args: '"/p:PlatformToolset=ClangCL;LinkToolExe=link.exe;VcpkgAutoLink=true"'
allowed-failure: true
exclude:
- toolset: v143
configuration: debug
platform: win32
- toolset: clang
configuration: debug
- toolset: clang
platform: win32
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Set up MSBuild
uses: microsoft/[email protected]
- name: Cache dependencies
uses: actions/cache@v3
with:
path: C:\Users\runneradmin\AppData\Local\vcpkg\archives
key: ${{ runner.os }}-vcpkg-archives-${{ hashFiles('vcpkg.json') }}
- name: Set up vcpkg
run: |
git -C C:\vcpkg fetch
vcpkg version
vcpkg integrate install
- name: Set up MSBuild logger
if: matrix.enable-annotations
run: |
Invoke-WebRequest -Uri https://github.com/reupen/msbuild-github-logger/releases/download/v1.0.1/Reupen.MSBuild.GitHubLogger.dll -OutFile "$Env:Temp\Reupen.MSBuild.GitHubLogger.dll"
- name: Build
run: |
msbuild `
/m `
'/p:Platform=${{ matrix.platform }}' `
'/p:Configuration=${{ matrix.configuration }}' `
'/p:RunCodeAnalysis=${{ matrix.run-code-analysis }}' `
${{ matrix.additional-build-args }} `
${{ matrix.enable-annotations && '"/logger:$Env:Temp\Reupen.MSBuild.GitHubLogger.dll"' }} `
vc17\columns_ui-public.sln
- uses: actions/upload-artifact@v3
if: matrix.publish-artefacts
with:
name: Component package (${{ matrix.configuration }}, ${{ matrix.platform }})
path: vc17\release-*\foo_ui_columns*.fb2k-component
- uses: actions/upload-artifact@v3
if: matrix.publish-artefacts
with:
name: Symbols for debugging (${{ matrix.configuration }}, ${{ matrix.platform }})
path: vc17\release-*\foo_ui_columns.pdb