Skip to content

Bump submodules/googletest from c875c4e to 455fcb7 #210

Bump submodules/googletest from c875c4e to 455fcb7

Bump submodules/googletest from c875c4e to 455fcb7 #210

Workflow file for this run

name: Code Coverage
on:
workflow_dispatch:
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: codecoverage-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions: read-all
jobs:
build-windows:
name: Build WinUser
strategy:
fail-fast: false
matrix:
vec: [
{ config: "Debug", plat: "windows", os: "windows-2022", arch: "x64", tls: "schannel", test: "-Test" },
]
uses: ./.github/workflows/build-reuse-win.yml
with:
config: ${{ matrix.vec.config }}
plat: ${{ matrix.vec.plat }}
os: ${{ matrix.vec.os }}
arch: ${{ matrix.vec.arch }}
tls: ${{ matrix.vec.tls }}
xdp: ${{ matrix.vec.xdp }}
sanitize: ${{ matrix.vec.sanitize }}
test: ${{ matrix.vec.test }}
bvt-winlatest:
name: BVT WinPrerelease
needs: [build-windows]
strategy:
fail-fast: false
matrix:
vec: [
{ config: "Debug", plat: "windows", os: "windows-2022", arch: "x64", tls: "schannel", test: "-Test" },
]
runs-on:
- self-hosted
- "1ES.Pool=1es-msquic-pool"
- "1ES.ImageOverride=WSPrerelease"
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
fetch-depth: 0
- name: Download Build Artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
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 }}
path: artifacts
- name: Prepare Machine
run: scripts/prepare-machine.ps1 -Tls ${{ matrix.vec.tls }} -ForTest ${{ matrix.vec.xdp }} -InstallCodeCoverage
shell: pwsh
- name: Install ETW Manifest
shell: pwsh
run: |
$MsQuicDll = ".\artifacts\bin\windows\${{ matrix.vec.arch }}_${{ matrix.vec.config }}_${{ matrix.vec.tls }}\msquic.dll"
$ManifestPath = ".\src\manifest\MsQuicEtw.man"
wevtutil.exe um $ManifestPath
wevtutil.exe im $ManifestPath /rf:$($MsQuicDll) /mf:$($MsQuicDll)
- name: Test
shell: pwsh
timeout-minutes: 120
continue-on-error: true
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 }}
- name: Upload Results
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
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 }}
path: artifacts/coverage/*.cov
stress-winlatest:
name: Stress WinPrerelease
needs: [build-windows]
strategy:
fail-fast: false
matrix:
vec: [
{ config: "Debug", plat: "windows", os: "windows-2022", arch: "x64", tls: "schannel", test: "-Test" },
]
runs-on:
- self-hosted
- "1ES.Pool=1es-msquic-pool"
- "1ES.ImageOverride=WSPrerelease"
env:
main-timeout: 3600000
main-repeat: 100
main-allocfail: 100
pr-timeout: 600000
pr-repeat: 20
pr-allocfail: 100
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
fetch-depth: 0
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
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 }}
path: artifacts
- name: Prepare Machine
run: scripts/prepare-machine.ps1 -Tls ${{ matrix.vec.tls }} -ForTest ${{ matrix.vec.xdp }} -InstallCodeCoverage
shell: pwsh
- name: spinquic (PR)
if: github.event_name == 'pull_request'
timeout-minutes: 15
continue-on-error: true
shell: pwsh
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
- name: spinquic (Official)
if: github.event_name != 'pull_request'
timeout-minutes: 65
continue-on-error: true
shell: pwsh
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
- name: Upload Results
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: Spin-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}${{ matrix.vec.sanitize }}
path: artifacts/coverage/*.cov
merge-coverage:
name: Merge Coverage
needs: [bvt-winlatest, stress-winlatest]
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
fetch-depth: 0
- name: Prepare Machine
run: scripts/prepare-machine.ps1 -ForTest -InstallCodeCoverage
shell: pwsh
- name: Create Folder for Artifacts
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path artifacts\coverage\windows\x64_Debug_schannel
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
name: Download BVT Coverage Results
with:
name: BVT-Debug-windows-windows-2022-x64-schannel
path: artifacts\coverage\windows\x64_Debug_schannel
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
name: Download SpinQuic Coverage Results
with:
name: Spin-Debug-windows-windows-2022-x64-schannel
path: artifacts\coverage\windows\x64_Debug_schannel
- name: Dir Folder for Artifacts
shell: pwsh
run: |
dir artifacts\coverage\windows\x64_Debug_schannel
- name: Merge
shell: pwsh
run: scripts/merge-coverage.ps1 -Config Debug -Arch x64 -Tls schannel
- name: Upload Results
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: merged
path: artifacts\coverage\windows\x64_Debug_schannel\msquiccoverage.xml
publish-coverage:
name: Generate Summary
needs: [merge-coverage]
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
name: Download Merged Coverage Report
with:
name: merged
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
with:
files: msquiccoverage.xml
- name: Code Coverage Summary Report
uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95
with:
filename: msquiccoverage.xml
badge: true
format: 'markdown'
output: 'both'
- name: Write to Job Summary
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY