-
Notifications
You must be signed in to change notification settings - Fork 11
340 lines (325 loc) · 12 KB
/
quic.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
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
name: QUIC
on:
workflow_call:
inputs:
ref:
description: 'MsQuic Branch or Commit'
required: false
default: 'main'
type: string
filter:
description: 'Custom Test Filter'
required: false
default: ''
type: string
logprofile:
description: 'Logging WPR Profile'
required: false
default: "NULL"
type: string
commit:
description: 'Publish Results'
required: false
default: false
type: boolean
workflow_dispatch:
inputs:
ref:
description: 'MsQuic Branch or Commit'
required: false
default: 'main'
type: string
filter:
description: 'Custom Test Filter'
required: false
default: ''
type: string
logprofile:
description: 'Logging WPR Profile'
required: false
default: "NULL"
type: choice
options:
- "NULL"
- Stacks.Light
- Stacks.Verbose
- Basic.Light
- Basic.Verbose
- Performance.Light
- Performance.Verbose
- RPS.Light
- RPS.Verbose
- Datapath.Light
- Datapath.Verbose
- Full.Light
- Full.Verbose
commit:
description: 'Publish Results'
required: false
default: false
type: boolean
pull_request:
branches:
- main
paths:
- .github/workflows/quic.yml
- .github/workflows/generate-summary.ps1
- .github/workflows/quic_matrix.json
- .github/workflows/manage-azure-vms.ps1
repository_dispatch:
types: [run-quic]
# Args: { guid, sha, ref, pr, logs, filter }
concurrency:
group: quic-${{ github.event.client_payload.pr || github.event.client_payload.sha || inputs.ref || github.event.pull_request.number || 'main' }}
cancel-in-progress: true
permissions: write-all
jobs:
# For automated identification of the workflow.
name:
name: For ${{ github.event.client_payload.guid }}
needs: []
runs-on: ubuntu-20.04
steps:
- name: Print Parameters
if: ${{ github.event_name == 'repository_dispatch' }}
run: |
echo "Parameters from repository_dispatch:"
echo "guid: ${{ github.event.client_payload.guid }}"
echo "sha: ${{ github.event.client_payload.sha }}"
echo "ref: ${{ github.event.client_payload.ref }}"
echo "pr: ${{ github.event.client_payload.pr }}"
echo "logs: ${{ github.event.client_payload.logs }}"
echo "filter: ${{ github.event.client_payload.filter }}"
- name: Validate inputs for workflow dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
if [ "${{ inputs.commit }}" = "true" ] && [ "${{ inputs.ref }}" = "main" ]; then
echo "Error: If commit is set to true, ref should not be 'main'"
exit 1
fi
- name: Validate inputs for workflow call
if: ${{ github.event_name == 'workflow_call' }}
run: |
if [ "${{ inputs.commit }}" = "true" ] && [ "${{ inputs.ref }}" = "main" ]; then
echo "Error: If commit is set to true, ref should not be 'main'"
exit 1
fi
- name: Validate inputs for repository dispatch
if: ${{ github.event_name == 'repository_dispatch' }}
run: |
if [ "${{ github.event.client_payload.ref }}" = "main" ] && [ '${{ github.event.client_payload.pr }}' = '' ]; then
echo "Repository dispatch on merge events must have ref set to a SHA instead of a branch name."
exit 1
fi
#
# Build Jobs
#
build-windows:
name: Build WinUser
needs: []
strategy:
fail-fast: false
matrix:
os: ['windows-2022']
tls: [schannel] # , openssl, openssl3]
uses: microsoft/msquic/.github/workflows/build-reuse-win.yml@main
with:
os: ${{ matrix.os }}
tls: ${{ matrix.tls }}
build: -Perf
ref: ${{ github.event.client_payload.sha || github.event.client_payload.ref || inputs.ref || 'main' }}
build-windows-kernel:
name: Build WinKernel
needs: []
strategy:
fail-fast: false
matrix:
os: ['windows-2022']
uses: microsoft/msquic/.github/workflows/build-reuse-winkernel.yml@main
with:
os: ${{ matrix.os }}
ref: ${{ github.event.client_payload.sha || github.event.client_payload.ref || inputs.ref || 'main' }}
build-unix:
name: Build Unix
needs: []
strategy:
fail-fast: false
matrix:
include:
- os: 'ubuntu-20.04'
tls: 'openssl'
- os: 'ubuntu-22.04'
tls: 'openssl3'
uses: microsoft/msquic/.github/workflows/build-reuse-unix.yml@main
with:
os: ${{ matrix.os }}
tls: ${{ matrix.tls }}
build: -Perf
ref: ${{ github.event.client_payload.sha || github.event.client_payload.ref || inputs.ref || 'main' }}
#
# Manage and create temporary VMs
# NOTE: tag == env
#
create-azure-vms:
name: Manage and Create Temporary VMs
uses: microsoft/netperf/.github/workflows/create-azure-vms.yml@main
with:
matrix_filename: 'quic_matrix.json'
workflowId: ${{ github.run_id }}
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
VM_PASSWORD: ${{ secrets.VM_PASSWORD }}
#
# Test Jobs.
# NOTE: tag == env
#
run-secnetperf: # This would be 1 enumeration, after CTS has setup the environment with the correct OS type and version.
name: secnetperf
needs: [build-unix, build-windows, build-windows-kernel, create-azure-vms]
strategy:
fail-fast: false
matrix:
include: ${{fromJson(needs.create-azure-vms.outputs.full-matrix)}}
runs-on:
- self-hosted
- ${{ matrix.runner_id || matrix.env }} # Use auto-generated 'runner id' if present, otherwise assign to 'env'.
- os-${{ matrix.os }}
- ${{ matrix.arch }}
steps:
- name: Checkout microsoft/msquic
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
repository: microsoft/msquic
ref: ${{ github.event.client_payload.sha || github.event.client_payload.ref || inputs.ref || 'main' }}
- name: Lowercase runner.os
shell: pwsh
run: echo "OS=$('${{runner.os}}'.ToLower())" >> $env:GITHUB_ENV
- name: Download Artifacts
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d
with:
name: Release-${{env.OS}}-${{ matrix.os == 'windows-2025' && 'windows-2022' || matrix.os }}-${{ matrix.arch }}-${{ matrix.tls }}-Perf
path: artifacts
- name: Download Kernel Artifacts
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d
if: ${{ matrix.io == 'wsk' }}
with:
name: Release-winkernel-${{ matrix.os == 'windows-2025' && 'windows-2022' || matrix.os }}-${{ matrix.arch }}-${{ matrix.tls }}
path: artifacts
- name: Download Regression.json file
run: Invoke-WebRequest -Uri "https://raw.githubusercontent.com/microsoft/netperf/sqlite/regression.json" -OutFile "regression.json"
shell: pwsh
- name: Download Watermark_Regression.json file
run: Invoke-WebRequest -Uri "https://raw.githubusercontent.com/microsoft/netperf/sqlite/watermark_regression.json" -OutFile "watermark_regression.json"
shell: pwsh
- name: Run secnetperf
shell: pwsh
timeout-minutes: 20
run: ./scripts/secnetperf.ps1 `
-LogProfile ${{ github.event.client_payload.logs || inputs.logprofile || 'NULL' }} `
-MsQuicCommit ${{ github.event.client_payload.sha || github.event.client_payload.ref || inputs.ref || 'main' }} `
-environment ${{ matrix.env }} `
-plat ${{env.OS}} `
-os ${{ matrix.os }} `
-arch ${{ matrix.arch }} `
-tls ${{ matrix.tls }} `
-io ${{ matrix.io }} `
-filter '${{ github.event.client_payload.filter || inputs.filter || '' }}'
- name: Upload Test Results JSON
if: ${{ always() }}
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: json-test-results-${{ matrix.env }}-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.tls }}-${{ matrix.io }}.json
path: json-test-results-${{ matrix.env }}-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.tls }}-${{ matrix.io }}.json
- name: Upload Logs
if: ${{ always() }}
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: logs-${{ matrix.env }}-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.tls }}-${{ matrix.io }}
path: artifacts/logs
if-no-files-found: ignore
- name: Upload Full Latency Curves
if: ${{ always() }}
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: latency-${{ matrix.env }}-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.tls }}-${{ matrix.io }}
path: latency.txt
if-no-files-found: ignore
#
# Post Processing Jobs
#
generate-summary:
name: Results
needs: [run-secnetperf]
runs-on: 'ubuntu-20.04'
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d
with:
path: artifacts/logs
pattern: json-test-results-*
merge-multiple: true
- name: Generate Summary
shell: pwsh # We never block the workflow if its a git merge or someone manually triggered a run with publish_results = true.
run: ./.github/workflows/generate-summary.ps1 -BlockOnFailure ${{ github.event.client_payload.pr != '' && !inputs.commit }}
save-test-results:
permissions: write-all
name: Persist Results in DB
needs: [run-secnetperf]
if: ${{ (github.event_name == 'repository_dispatch' && github.event.client_payload.pr == '') || inputs.commit }}
strategy:
fail-fast: false
runs-on: 'ubuntu-20.04'
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
repository: microsoft/netperf
ref: sqlite
- uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d
with:
pattern: json-test-results-*
- run: python sql.py --featureint 2
- run: ls
- name: Git commit
run: 'git config user.name "QUIC Dev[bot]" && git config user.email "quicdev@microsoft.com" && git add netperf.sqlite && git add full_latencies && git commit -m "Update DB" && git push'
update-intermediary-dashboard-json:
permissions: write-all
name: Update Dashboard Files
needs: [save-test-results]
strategy:
fail-fast: false
runs-on: 'ubuntu-20.04'
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
repository: microsoft/netperf
ref: deploy
- run: 'rm -rf *.json'
- uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d
with:
pattern: "json-test-results-*"
- run: python generate_historical_data.py
- name: Git commit
run: 'git config user.name "QUIC Dev[bot]" && git config user.email "quicdev@microsoft.com" && git pull && git add *.json && git commit -m "Update intermediary dashboard files" && git push'
regression-detection:
permissions: write-all
name: Update Regression Metrics
needs: [update-intermediary-dashboard-json]
strategy:
fail-fast: false
runs-on: 'ubuntu-20.04'
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
repository: microsoft/netperf
ref: sqlite
- run: ls
- run: python regression.py
- name: Git commit # TODO: Squash history for this branch to keep size small
run: 'git config user.name "QUIC Dev[bot]" && git config user.email "quicdev@microsoft.com" && git add *.json && git commit -m "Update regression metrics" && git push'