run-quic #1728
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
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 "[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: | |
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 "[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 # TODO: Squash history for this branch to keep size small | |
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' |