Skip to content

run-quic

run-quic #976

Workflow file for this run

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'