-
Notifications
You must be signed in to change notification settings - Fork 9
179 lines (171 loc) · 6.21 KB
/
Copy pathci.yml
File metadata and controls
179 lines (171 loc) · 6.21 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
name: CI
on:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
- release/*
concurrency:
# Cancel any workflow currently in progress for the same PR.
# Allow running concurrently with any other commits.
group: ci-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions: read-all
jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
os: [2022, 2025]
configuration: [Release, Debug]
platform: [x64, arm64]
runs-on: windows-${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
submodules: recursive
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v3
with:
msbuild-architecture: x64
- name: Prepare Machine
shell: PowerShell
run: tools/prepare-machine.ps1 -ForBuild -Verbose
- name: Nuget Restore
run: nuget.exe restore wnt.sln
- name: Build
run: msbuild wnt.sln /m /p:configuration=${{ matrix.configuration }} /p:platform=${{ matrix.platform }} /p:SignMode=TestSign
- name: Upload Artifacts
if: matrix.os == 2022
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: bin_${{ matrix.configuration }}_${{ matrix.platform }}
path: |
artifacts/bin
!artifacts/bin/**/*.ilk
!artifacts/bin/**/*.exp
!artifacts/bin/**/*.lastcodeanalysissucceeded
functional_tests:
name: Tests
needs: build
env:
# For PRs
prRuntime: 5 # Minutes. Update timeout-minutes with any changes.
prIters: 1
# For 'main' commits
fullRuntime: 50 # Minutes. Update timeout-minutes with any changes.
fullIters: 10
strategy:
fail-fast: false
matrix:
apimode: [UserMode, KernelMode]
os: [2022, 2025]
configuration: [Release, Debug]
platform: [x64]
runs-on: windows-${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
sparse-checkout: tools
- name: Prepare Machine
shell: PowerShell
run: tools/prepare-machine.ps1 -ForFunctionalTest -NoReboot -Verbose
- name: Download Artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: bin_${{ matrix.configuration }}_${{ matrix.platform }}
path: artifacts/bin
- name: Run Tests (PR)
if: ${{ github.event_name == 'pull_request' }}
shell: PowerShell
timeout-minutes: 10 # Intentionally 5 more than the test timeout to allow for watchdog timeout processing.
run: tools/functional.ps1 -Verbose -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Iterations ${{ env.prIters }} -Timeout ${{ env.prRuntime }} -${{ matrix.apimode }}
- name: Run Tests (main)
if: ${{ github.event_name != 'pull_request' }}
shell: PowerShell
timeout-minutes: 55 # Intentionally 5 more than the test timeout to allow for watchdog timeout processing.
run: tools/functional.ps1 -Verbose -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Iterations ${{ env.fullIters }} -Timeout ${{ env.fullRuntime }}
- name: Convert Logs
if: ${{ always() }}
timeout-minutes: 5
shell: PowerShell
run: tools/log.ps1 -Convert -Name fnfunc* -Verbose -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }}
- name: Upload Logs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
if: ${{ always() }}
with:
name: logs_func_${{ matrix.apimode }}_${{ matrix.os }}_${{ matrix.configuration }}_${{ matrix.platform }}
path: artifacts/logs
create_dev_artifacts:
name: Create Dev Artifacts
needs: build
strategy:
fail-fast: false
matrix:
configuration: [Release]
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Download x64 Artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: bin_${{ matrix.configuration }}_x64
path: artifacts/bin
- name: Download arm64 Artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: bin_${{ matrix.configuration }}_arm64
path: artifacts/bin
- name: Create Nuget Package
shell: PowerShell
run: tools/create-nuget-package.ps1 -Config ${{ matrix.configuration }} -Platform x64, arm64
- name: Upload Release Artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: release_dev_artifacts_${{ matrix.configuration }}
path: |
artifacts/pkg/**/*.nupkg
create_runtime_artifacts:
name: Create Runtime Artifacts
needs: build
strategy:
fail-fast: false
matrix:
configuration: [Release]
platform: [x64, arm64]
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Download Artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: bin_${{ matrix.configuration }}_${{ matrix.platform }}
path: artifacts/bin
- name: Create Runtime Kit
shell: PowerShell
run: tools/create-runtimekit.ps1 -Config ${{ matrix.configuration }} -Platform ${{ matrix.platform }}
- name: Upload Release Artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: release_runtime_artifacts_${{ matrix.configuration }}_${{ matrix.platform }}
path: |
artifacts/kit/**/*.zip
Complete:
name: Complete
if: always()
needs: [build, functional_tests, create_dev_artifacts, create_runtime_artifacts]
runs-on: ubuntu-latest
permissions: {} # No need for any permissions.
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
with:
jobs: ${{ toJSON(needs) }}