-
Notifications
You must be signed in to change notification settings - Fork 15
500 lines (481 loc) · 19.4 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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
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 }}
xdp: ${{ matrix.xdp }}
build: -Perf
ref: ${{ github.event.client_payload.sha || github.event.client_payload.ref || inputs.ref || 'main' }}
prepare-matrix:
name: Prepare lab matrix, and Azure 1ES matrix.
uses: microsoft/netperf/.github/workflows/prepare-matrix.yml@main
with:
matrix_filename: 'quic_matrix.json'
workflowId: ${{ github.run_id }}-${{ github.run_attempt }}
run-secnetperf-1es:
name: ${{ matrix.optional == 'TRUE' && '[UNRELIABLE]-' || '' }}azure-${{ matrix.os }}-${{ matrix.io }}-${{ matrix.role }}-${{ matrix.tls }}-${{ matrix.arch }}
needs: [prepare-matrix, build-windows, build-windows-kernel, build-unix]
strategy:
fail-fast: false
matrix:
include: ${{fromJson(needs.prepare-matrix.outputs.azure-matrix)}}
continue-on-error: ${{ matrix.optional == 'TRUE' }}
runs-on:
- self-hosted
- 1ES.Pool=${{ matrix.assigned_pool }}
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: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
path: netperfrepo
- name: Prepares 1ES Machine
if: ${{ matrix.env == 'azure' }}
uses: ./netperfrepo/.github/actions/prepare-1es-machine
- 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: Start 1ES Machine
timeout-minutes: 45
uses: ./netperfrepo/.github/actions/start-1es-machine
with:
matrix: '${{ toJson(matrix) }}'
callback-script-path: ${{ github.workspace }}/scripts/quic_callback.ps1
syncer_secret: ${{ secrets.NETPERF_SYNCER_SECRET }}
- name: (Client) Download Watermark_Regression.json file
uses: ./netperfrepo/.github/actions/run-general-pwsh-cmd
with:
run-cmd: |
Write-Host "Downloading Watermark_Regression.json file"
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/microsoft/netperf/sqlite/watermark_regression.json" -OutFile "watermark_regression.json" -UseBasicParsing
- name: Run Secnetperf Script
if: ${{ matrix.role == 'client' }}
timeout-minutes: 40
uses: ./netperfrepo/.github/actions/run-test-script
with:
run-script-cmd: |
./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 || '' }}'
matrix: '${{ toJson(matrix) }}'
syncer-secret: ${{ secrets.NETPERF_SYNCER_SECRET }}
- name: Stop 1ES Machine
if: ${{ always() }}
uses: ./netperfrepo/.github/actions/stop-1es-machine
with:
matrix: '${{ toJson(matrix) }}'
syncer_secret: ${{ secrets.NETPERF_SYNCER_SECRET }}
- name: Upload Test Results JSON
if: ${{ always() }}
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: latency-${{ matrix.env }}-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.tls }}-${{ matrix.io }}
path: latency.txt
if-no-files-found: ignore
#
# Test Jobs.
# NOTE: tag == env
#
run-secnetperf:
name: ${{ matrix.optional == 'TRUE' && '[UNRELIABLE]-' || '' }}lab-${{ matrix.os }}-${{ matrix.io }}-${{ matrix.tls }}-${{ matrix.arch }}
needs: [prepare-matrix, build-windows, build-windows-kernel, build-unix]
strategy:
fail-fast: false
matrix:
include: ${{fromJson(needs.prepare-matrix.outputs.lab-matrix)}}
continue-on-error: ${{ matrix.optional == 'TRUE' }}
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 Kernel Drivers
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 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 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: 50
run: |
$env:netperf_remote_powershell_supported = $true
./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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: latency-${{ matrix.env }}-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.tls }}-${{ matrix.io }}
path: latency.txt
if-no-files-found: ignore
# TODO: Uncomment once we fully transition to a stateless lab.
# observe-lab:
# name: Observe Lab
# needs: [prepare-matrix, build-windows, build-windows-kernel, build-unix]
# uses: microsoft/netperf/.github/workflows/observe-lab.yml@main
# with:
# lab-matrix: ${{ needs.prepare-matrix.outputs.lab-stateless-matrix }}
# project-callee: 'lab-quic-callee'
# sha: ${{ github.event.client_payload.sha || github.event.client_payload.ref || inputs.ref || 'main' }}
# ref: ${{ github.event.client_payload.ref || inputs.ref || 'main' }}
# pr: ${{ github.event.client_payload.pr }}
# secrets:
# NETPERF_SYNCER_SECRET: ${{ secrets.NETPERF_SYNCER_SECRET }}
# operate-lab:
# name: Operate Lab
# needs: [prepare-matrix, build-windows, build-windows-kernel, build-unix]
# uses: microsoft/netperf/.github/workflows/operate-lab.yml@main
# with:
# lab-matrix: ${{ needs.prepare-matrix.outputs.lab-stateless-matrix }}
# secrets:
# NETPERF_SYNCER_SECRET: ${{ secrets.NETPERF_SYNCER_SECRET }}
cleanup-cache:
name: Cleanup Remote Cache Metadata
if: ${{ always() }}
needs: [run-secnetperf-1es] # TODO: Add 'observe-lab' once we fully transition to a stateless lab.
runs-on: 'windows-latest'
steps:
- name: Send cleanup request to endpoint
run: |
$headers = @{
"secret" = "${{ secrets.NETPERF_SYNCER_SECRET }}"
}
$url = "https://netperfapi.azurewebsites.net/cleanuprun?runid=${{ github.run_id }}"
Invoke-WebRequest -Uri $url -Headers $headers
#
# Post Processing Jobs
#
generate-summary:
name: Results
needs: [run-secnetperf, run-secnetperf-1es] # TODO: Add 'observe-lab' once we fully transition to a stateless lab.
runs-on: 'ubuntu-20.04'
continue-on-error: true
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d
with:
path: artifacts/logs
pattern: json-test-results-*
merge-multiple: true
# - uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d
# with:
# path: artifacts/logs
# name: lab-test-results
# merge-multiple: true
# if-no-files-found: ignore
- 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, run-secnetperf-1es] # TODO: Add 'observe-lab' once we fully transition to a stateless lab.
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-*
- name: Remove deprecated python scripts
run: rm -rf *.py
- name: Fetch sql.py and generate_historical_data.py
run: |
wget https://raw.githubusercontent.com/microsoft/netperf/main/pipeline/sql.py
wget https://raw.githubusercontent.com/microsoft/netperf/main/pipeline/generate_historical_data.py
- run: python sql.py
- run: python generate_historical_data.py
- name: Move all generated historical data json files to a new folder
run: |
mkdir history_pages
mv historical*.json history_pages
- run: ls
- name: Upload history pages
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: history_pages
path: history_pages
- run: ls
- name: Git commit
if: ${{ (github.event_name == 'repository_dispatch' && github.event.client_payload.pr == '') || inputs.commit }}
run: 'git config user.name "QUIC Dev[bot]" && git config user.email "[email protected]" && 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:
name: history_pages
path: history_pages
- run: ls
- name: Flatten directory structure
run: |
mv history_pages/*.json .
rm -rf history_pages
- uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d
with:
pattern: "json-test-results-*"
- run: ls
- name: Git commit
if: ${{ (github.event_name == 'repository_dispatch' && github.event.client_payload.pr == '') || inputs.commit }}
run: 'git config user.name "QUIC Dev[bot]" && git config user.email "[email protected]" && 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]
continue-on-error: true
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
if: ${{ (github.event_name == 'repository_dispatch' && github.event.client_payload.pr == '') || inputs.commit }}
run: 'git config user.name "QUIC Dev[bot]" && git config user.email "[email protected]" && git add *.json && git commit -m "Update regression metrics" && git push'