Skip to content

Commit a0a9795

Browse files
Yi HuangRaymond Liu
authored andcommitted
Migrate Windows Prerelease tests to 1ES hosted pool (microsoft#3732)
Use 1ES pool for windows prerelease tests
1 parent c6e0947 commit a0a9795

File tree

7 files changed

+398
-353
lines changed

7 files changed

+398
-353
lines changed

.azure/azure-pipelines.ci.yml

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -561,14 +561,6 @@ stages:
561561
logProfile: Full.Light
562562
config: Release
563563
extraTestArgs: -SkipUnitTests -EnableSystemVerifier -Filter -*ValidateConfiguration:*ValidAlpnLengths:*ResumeRejection*:*ConnectClientCertificate*
564-
- template: ./templates/run-bvt.yml
565-
parameters:
566-
pool: MsQuic-Win-Latest
567-
platform: windows
568-
tls: schannel
569-
logProfile: Full.Light
570-
config: Release
571-
extraTestArgs: -SkipUnitTests
572564
- template: ./templates/run-bvt.yml
573565
parameters:
574566
image: ubuntu-latest
@@ -597,15 +589,6 @@ stages:
597589
config: Release
598590
kernel: true
599591
extraTestArgs: -Kernel -EnableSystemVerifier -Filter -*ValidateConfiguration:*ValidAlpnLengths:*ResumeRejection*:*ClientCertificate*:*LoadBalanced*
600-
- template: ./templates/run-bvt.yml
601-
parameters:
602-
pool: MsQuic-Win-Latest
603-
platform: windows
604-
tls: schannel
605-
logProfile: Full.Light
606-
config: Release
607-
kernel: true
608-
extraTestArgs: -Kernel
609592

610593
#
611594
# Kernel Build Verification Tests
@@ -625,14 +608,6 @@ stages:
625608
logProfile: Full.Light
626609
extraTestArgs: -Kernel -EnableSystemVerifier -Filter -*ValidateConfiguration:*ValidAlpnLengths:*ResumeRejection*:*ClientCertificate*:*LoadBalanced*
627610
kernel: true
628-
- template: ./templates/run-bvt.yml
629-
parameters:
630-
pool: MsQuic-Win-Latest
631-
platform: windows
632-
tls: schannel
633-
logProfile: Full.Light
634-
extraTestArgs: -Kernel -Filter -*NthAllocFail*
635-
kernel: true
636611

637612
#
638613
# Build Verification Tests
@@ -653,12 +628,6 @@ stages:
653628
logProfile: Full.Light
654629
extraArtifactDir: '_Sanitize'
655630
extraTestArgs: -ExtraArtifactDir Sanitize -Filter -*ValidateConfiguration:*ValidAlpnLengths:*ResumeRejection*:*ClientCertificate*:*LoadBalanced*:TlsTest.InProc*
656-
- template: ./templates/run-bvt.yml
657-
parameters:
658-
pool: MsQuic-Win-Latest
659-
platform: windows
660-
tls: schannel
661-
logProfile: Full.Light
662631
- template: ./templates/run-bvt.yml
663632
parameters:
664633
image: windows-2022
@@ -721,22 +690,6 @@ stages:
721690
logProfile: None
722691
extraTestArgs: -ErrorsAsWarnings
723692

724-
#
725-
# SpinQuic Tests
726-
#
727-
728-
- stage: spinquic
729-
displayName: SpinQuic
730-
dependsOn:
731-
- build_windows_debug
732-
jobs:
733-
- template: ./templates/run-spinquic.yml
734-
parameters:
735-
pool: MsQuic-Win-Latest
736-
platform: windows
737-
tls: schannel
738-
allocFail: 100
739-
740693
#
741694
# DotNet Tests
742695
#
@@ -774,38 +727,6 @@ stages:
774727
arch: universal
775728
tls: openssl
776729

777-
#
778-
# Code Coverage
779-
#
780-
781-
- stage: codecoverage
782-
displayName: Code Coverage
783-
dependsOn:
784-
- build_windows_debug
785-
jobs:
786-
- template: ./templates/run-bvt.yml
787-
parameters:
788-
pool: MsQuic-Win-Latest
789-
platform: windows
790-
tls: schannel
791-
codeCoverage: true
792-
extraPrepareArgs: -InstallCodeCoverage
793-
- template: ./templates/run-spinquic.yml
794-
parameters:
795-
pool: MsQuic-Win-Latest
796-
platform: windows
797-
tls: schannel
798-
allocFail: 100
799-
codeCoverage: true
800-
extraPrepareArgs: -InstallCodeCoverage
801-
- template: ./templates/merge-publish-coverage.yml
802-
parameters:
803-
image: windows-2019
804-
platform: windows
805-
config: Debug
806-
arch: x64
807-
tls: schannel
808-
809730
#
810731
# QuicInterop
811732
#
@@ -817,11 +738,6 @@ stages:
817738
- build_linux_release
818739
- build_macos_release
819740
jobs:
820-
- template: ./templates/run-quicinterop.yml
821-
parameters:
822-
pool: MsQuic-Win-Latest
823-
platform: windows
824-
tls: schannel
825741
- template: ./templates/run-quicinterop.yml
826742
parameters:
827743
image: windows-2019
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
name: Code Coverage
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- release/*
9+
pull_request:
10+
branches:
11+
- main
12+
- release/*
13+
14+
concurrency:
15+
# Cancel any workflow currently in progress for the same PR.
16+
# Allow running concurrently with any other commits.
17+
group: codecoverage-${{ github.event.pull_request.number || github.sha }}
18+
cancel-in-progress: true
19+
20+
permissions: read-all
21+
22+
jobs:
23+
build-windows:
24+
name: Build WinUser
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
vec: [
29+
{ config: "Debug", plat: "windows", os: "windows-2022", arch: "x64", tls: "schannel", test: "-Test" },
30+
]
31+
uses: ./.github/workflows/build-reuse-win.yml
32+
with:
33+
config: ${{ matrix.vec.config }}
34+
plat: ${{ matrix.vec.plat }}
35+
os: ${{ matrix.vec.os }}
36+
arch: ${{ matrix.vec.arch }}
37+
tls: ${{ matrix.vec.tls }}
38+
xdp: ${{ matrix.vec.xdp }}
39+
sanitize: ${{ matrix.vec.sanitize }}
40+
test: ${{ matrix.vec.test }}
41+
42+
bvt-winlatest:
43+
name: BVT WinPrerelease
44+
needs: [build-windows]
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
vec: [
49+
{ config: "Debug", plat: "windows", os: "windows-2022", arch: "x64", tls: "schannel", test: "-Test" },
50+
]
51+
runs-on:
52+
- self-hosted
53+
- "1ES.Pool=msquic-1es-pool"
54+
- "1ES.ImageOverride=WSPrerelease"
55+
steps:
56+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
57+
with:
58+
fetch-depth: 0
59+
- name: Download Build Artifacts
60+
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
61+
with:
62+
name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}${{ matrix.vec.sanitize }}${{ matrix.vec.test }}
63+
path: artifacts
64+
- name: Prepare Machine
65+
run: scripts/prepare-machine.ps1 -Tls ${{ matrix.vec.tls }} -ForTest ${{ matrix.vec.xdp }} -InstallCodeCoverage
66+
shell: pwsh
67+
- name: Install ETW Manifest
68+
shell: pwsh
69+
run: |
70+
$MsQuicDll = ".\artifacts\bin\windows\${{ matrix.vec.arch }}_${{ matrix.vec.config }}_${{ matrix.vec.tls }}\msquic.dll"
71+
$ManifestPath = ".\src\manifest\MsQuicEtw.man"
72+
wevtutil.exe um $ManifestPath
73+
wevtutil.exe im $ManifestPath /rf:$($MsQuicDll) /mf:$($MsQuicDll)
74+
- name: Test
75+
shell: pwsh
76+
timeout-minutes: 120
77+
continue-on-error: true
78+
run: scripts/test.ps1 -NoProgress -IsolationMode Batch -CodeCoverage -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} ${{ matrix.vec.xdp }} ${{ matrix.vec.qtip }}
79+
- name: Upload Results
80+
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
81+
with:
82+
name: BVT-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}${{ matrix.vec.qtip }}${{ matrix.vec.systemcrypto }}${{ matrix.vec.sanitize }}
83+
path: artifacts/coverage/*.cov
84+
85+
stress-winlatest:
86+
name: Stress WinPrerelease
87+
needs: [build-windows]
88+
strategy:
89+
fail-fast: false
90+
matrix:
91+
vec: [
92+
{ config: "Debug", plat: "windows", os: "windows-2022", arch: "x64", tls: "schannel", test: "-Test" },
93+
]
94+
runs-on:
95+
- self-hosted
96+
- "1ES.Pool=msquic-1es-pool"
97+
- "1ES.ImageOverride=WSPrerelease"
98+
env:
99+
main-timeout: 3600000
100+
main-repeat: 100
101+
main-allocfail: 100
102+
pr-timeout: 600000
103+
pr-repeat: 20
104+
pr-allocfail: 100
105+
steps:
106+
- name: Checkout repository
107+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
108+
with:
109+
fetch-depth: 0
110+
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
111+
with:
112+
name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}${{ matrix.vec.sanitize }}${{ matrix.vec.test }}
113+
path: artifacts
114+
- name: Prepare Machine
115+
run: scripts/prepare-machine.ps1 -Tls ${{ matrix.vec.tls }} -ForTest ${{ matrix.vec.xdp }} -InstallCodeCoverage
116+
shell: pwsh
117+
- name: spinquic (PR)
118+
if: github.event_name == 'pull_request'
119+
timeout-minutes: 15
120+
continue-on-error: true
121+
shell: pwsh
122+
run: scripts/spin.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -Timeout ${{ env.pr-timeout }} -RepeatCount ${{ env.pr-repeat }} -AllocFail ${{ env.pr-allocfail }} ${{ matrix.vec.xdp }} -CodeCoverage -LogProfile Basic.Light
123+
- name: spinquic (Official)
124+
if: github.event_name != 'pull_request'
125+
timeout-minutes: 65
126+
continue-on-error: true
127+
shell: pwsh
128+
run: scripts/spin.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -Timeout ${{ env.main-timeout }} -RepeatCount ${{ env.main-repeat }} -AllocFail ${{ env.main-allocfail }} ${{ matrix.vec.xdp }} -CodeCoverage -LogProfile Basic.Light
129+
- name: Upload Results
130+
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
131+
with:
132+
name: Spin-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}${{ matrix.vec.sanitize }}
133+
path: artifacts/coverage/*.cov
134+
135+
merge-coverage:
136+
name: Merge Coverage
137+
needs: [bvt-winlatest, stress-winlatest]
138+
runs-on: windows-2022
139+
steps:
140+
- name: Checkout repository
141+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
142+
with:
143+
fetch-depth: 0
144+
- name: Prepare Machine
145+
run: scripts/prepare-machine.ps1 -ForTest -InstallCodeCoverage
146+
shell: pwsh
147+
- name: Create Folder for Artifacts
148+
shell: pwsh
149+
run: |
150+
New-Item -ItemType Directory -Force -Path artifacts\coverage\windows\x64_Debug_schannel
151+
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
152+
name: Download BVT Coverage Results
153+
with:
154+
name: BVT-Debug-windows-windows-2022-x64-schannel
155+
path: artifacts\coverage\windows\x64_Debug_schannel
156+
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
157+
name: Download SpinQuic Coverage Results
158+
with:
159+
name: Spin-Debug-windows-windows-2022-x64-schannel
160+
path: artifacts\coverage\windows\x64_Debug_schannel
161+
- name: Dir Folder for Artifacts
162+
shell: pwsh
163+
run: |
164+
dir artifacts\coverage\windows\x64_Debug_schannel
165+
- name: Merge
166+
shell: pwsh
167+
run: scripts/merge-coverage.ps1 -Config Debug -Arch x64 -Tls schannel
168+
- name: Upload Results
169+
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
170+
with:
171+
name: merged
172+
path: artifacts\coverage\windows\x64_Debug_schannel\msquiccoverage.xml
173+
174+
publish-coverage:
175+
name: Generate Summary
176+
needs: [merge-coverage]
177+
runs-on: ubuntu-22.04
178+
steps:
179+
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
180+
name: Download Merged Coverage Report
181+
with:
182+
name: merged
183+
- name: Code Coverage Summary Report
184+
uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95
185+
with:
186+
filename: msquiccoverage.xml
187+
badge: true
188+
format: 'markdown'
189+
output: 'both'
190+
- name: Write to Job Summary
191+
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)