Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 64 additions & 29 deletions .github/actions/run-test-script/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,40 @@
name: "Run Test Script [NEEDS NETPERF REPO CLONED FIRST]"
description: "This action runs multiple steps as a composite action."
inputs:
run-script-cmd:
description: "The serialized matrix of values to use for the composite action."
log-profile:
description: "The logging profile to use for the test."
type: string
required: true
msquic-commit:
description: "The MsQuic commit or ref to test."
type: string
required: true
environment:
description: "The test environment."
type: string
required: true
platform:
description: "The test platform."
type: string
required: true
os:
description: "The target operating system."
type: string
required: true
arch:
description: "The target architecture."
type: string
required: true
tls:
description: "The TLS provider."
type: string
required: true
io:
description: "The I/O provider."
type: string
required: true
filter:
description: "The test filter."
type: string
required: true
matrix:
Expand All @@ -16,34 +48,37 @@ inputs:
runs:
using: "composite"
steps:
- name: Set context and import the netperf-lib.psm1 library
id: netperf_context
if: ${{ env.HAS_PWSH == 'false' }}
shell: python
run: |
import json
matrix = json.loads("""${{ inputs.matrix }}""")
json_str = json.dumps(matrix).replace('"', '\\"').replace('\n', ' ').replace('\r', ' ')
prep_code = f"./netperfrepo/set-netperf-context.ps1 -Matrix '{json_str}' -SyncerSecret '${{ inputs.syncer-secret }}' -GithubRunId '${{ github.run_id }}-${{ github.run_attempt }}';"
prep_code += "Import-Module ./netperfrepo/netperf-lib.psm1;"
print(f"::set-output name=netperf_context::{prep_code}")
- name: Squeeze code to 1 line
if: ${{ env.HAS_PWSH == 'false' }}
id: squeeze_code
shell: python
run: |
run_script_powershell_code = """${{ inputs.run-script-cmd }}"""
squeezed_code = run_script_powershell_code.replace('\n', '').replace('\r', '').replace('`', ' ')
print(f"::set-output name=squeezed_code::{squeezed_code}")
- name: Run Pwsh Command
- name: Run Windows PowerShell test script
if: ${{ env.HAS_PWSH == 'false' }}
run: |
powershell -Command "${{ steps.netperf_context.outputs.netperf_context }} ${{ steps.squeeze_code.outputs.squeezed_code }}"
shell: cmd
- name: Run Pwsh Command
env:
NETPERF_MATRIX: ${{ inputs.matrix }}
NETPERF_SYNCER_SECRET: ${{ inputs.syncer-secret }}
NETPERF_GITHUB_RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }}
NETPERF_LOG_PROFILE: ${{ inputs.log-profile }}
NETPERF_MSQUIC_COMMIT: ${{ inputs.msquic-commit }}
NETPERF_ENVIRONMENT: ${{ inputs.environment }}
NETPERF_PLATFORM: ${{ inputs.platform }}
NETPERF_OS: ${{ inputs.os }}
NETPERF_ARCH: ${{ inputs.arch }}
NETPERF_TLS: ${{ inputs.tls }}
NETPERF_IO: ${{ inputs.io }}
NETPERF_FILTER: ${{ inputs.filter }}
run: powershell -NoProfile -ExecutionPolicy Bypass -File ".\netperfrepo\.github\actions\run-test-script\run-test-script.ps1"
- name: Run PowerShell test script
if: ${{ env.HAS_PWSH == 'true' }}
run: |
./netperfrepo/set-netperf-context.ps1 -Matrix '${{ inputs.matrix }}' -SyncerSecret '${{ inputs.syncer-secret }}' -GithubRunId '${{ github.run_id }}-${{ github.run_attempt }}'
Import-Module ./netperfrepo/netperf-lib.psm1
${{ inputs.run-script-cmd }}
shell: pwsh
env:
NETPERF_MATRIX: ${{ inputs.matrix }}
NETPERF_SYNCER_SECRET: ${{ inputs.syncer-secret }}
NETPERF_GITHUB_RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }}
NETPERF_LOG_PROFILE: ${{ inputs.log-profile }}
NETPERF_MSQUIC_COMMIT: ${{ inputs.msquic-commit }}
NETPERF_ENVIRONMENT: ${{ inputs.environment }}
NETPERF_PLATFORM: ${{ inputs.platform }}
NETPERF_OS: ${{ inputs.os }}
NETPERF_ARCH: ${{ inputs.arch }}
NETPERF_TLS: ${{ inputs.tls }}
NETPERF_IO: ${{ inputs.io }}
NETPERF_FILTER: ${{ inputs.filter }}
run: ./netperfrepo/.github/actions/run-test-script/run-test-script.ps1
22 changes: 22 additions & 0 deletions .github/actions/run-test-script/run-test-script.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
$ErrorActionPreference = 'Stop'

./netperfrepo/set-netperf-context.ps1 `
-Matrix $env:NETPERF_MATRIX `
-SyncerSecret $env:NETPERF_SYNCER_SECRET `
-GithubRunId $env:NETPERF_GITHUB_RUN_ID

Import-Module ./netperfrepo/netperf-lib.psm1

$secNetPerfParameters = @{
LogProfile = $env:NETPERF_LOG_PROFILE
MsQuicCommit = $env:NETPERF_MSQUIC_COMMIT
environment = $env:NETPERF_ENVIRONMENT
plat = $env:NETPERF_PLATFORM
os = $env:NETPERF_OS
arch = $env:NETPERF_ARCH
tls = $env:NETPERF_TLS
io = $env:NETPERF_IO
filter = $env:NETPERF_FILTER
}

./scripts/secnetperf.ps1 @secNetPerfParameters
12 changes: 9 additions & 3 deletions .github/workflows/auto-reset-parent-or-child-lab-machine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
- name: Check_Dispatched_ID;${{ github.event.client_payload.workflow_id }}
if: ${{ github.event_name == 'repository_dispatch' }}
timeout-minutes: 45
env:
DISPATCH_WORKFLOW_ID: ${{ github.event.client_payload.workflow_id }}
run: |
$headers = @{
"Accept" = "application/vnd.github+json"
Expand All @@ -56,7 +58,7 @@ jobs:
}
$url = "https://api.github.com/repos/microsoft/netperf/actions/runs?status=in_progress"
Write-Debug "GET $url"
$workflow_id_that_dispatched_this_workflow = "${{ github.event.client_payload.workflow_id }}"
$workflow_id_that_dispatched_this_workflow = $env:DISPATCH_WORKFLOW_ID
$stop = $true
while ($true) {
$stop = $true
Expand Down Expand Up @@ -136,14 +138,18 @@ jobs:
- ${{ inputs.parent-or-child }}
steps:
- name: RESET STATE (parent or child)
env:
VM_NAME: ${{ inputs.vm-name }}
run: |
# TODO: Eventually, for WS 2025, we want to instead CRUD the VMs, instead of simply reseting their checkpoints here.
$vmName = "${{ inputs.vm-name }}"
$vmName = $env:VM_NAME
$checkPointName = "LATEST"
Restore-VMSnapshot -VMName $vmName -Name $checkPointName -Confirm:$false
- name: Start VM, wait for online status, alert observer.
env:
VM_NAME: ${{ inputs.vm-name }}
run: |
$vmName = "${{ inputs.vm-name }}"
$vmName = $env:VM_NAME
if ($vmName.Contains("linux") -or $vmName.Contains("ubuntu")) {
Restart-VM -Name $vmName -Force
} else {
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/ebpf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,15 @@ jobs:
runs-on: ubuntu-22.04
steps:
- run: |
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 "guid: $DISPATCH_GUID"
echo "sha: $DISPATCH_SHA"
echo "ref: $DISPATCH_REF"
echo "pr: $DISPATCH_PR"
env:
DISPATCH_GUID: ${{ github.event.client_payload.guid }}
DISPATCH_SHA: ${{ github.event.client_payload.sha }}
DISPATCH_REF: ${{ github.event.client_payload.ref }}
DISPATCH_PR: ${{ github.event.client_payload.pr }}

build_ebpf:
name: Build ebpf-for-windows
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/ebpf_dynamic_vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,15 @@ jobs:
runs-on: ubuntu-24.04
steps:
- run: |
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 "guid: $DISPATCH_GUID"
echo "sha: $DISPATCH_SHA"
echo "ref: $DISPATCH_REF"
echo "pr: $DISPATCH_PR"
env:
DISPATCH_GUID: ${{ github.event.client_payload.guid }}
DISPATCH_SHA: ${{ github.event.client_payload.sha }}
DISPATCH_REF: ${{ github.event.client_payload.ref }}
DISPATCH_PR: ${{ github.event.client_payload.pr }}

build:
name: Build ebpf-for-windows
Expand Down
53 changes: 36 additions & 17 deletions .github/workflows/lab-quic-callee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,28 @@ jobs:
runs-on: windows-latest
steps:
- name: Print input params
env:
ASSIGNED_RUNNER: ${{ github.event.client_payload.assigned_runner }}
UNIQUE_ENV_STR: ${{ github.event.client_payload.unique_env_str }}
TARGET_OS: ${{ github.event.client_payload.os }}
TARGET_IO: ${{ github.event.client_payload.io }}
TARGET_TLS: ${{ github.event.client_payload.tls }}
TARGET_ARCH: ${{ github.event.client_payload.arch }}
CALLER_ID: ${{ github.event.client_payload.caller_id }}
DISPATCH_SHA: ${{ github.event.client_payload.sha }}
DISPATCH_REF: ${{ github.event.client_payload.ref }}
DISPATCH_PR: ${{ github.event.client_payload.pr }}
run: |
echo "assigned_runner: ${{ github.event.client_payload.assigned_runner }}"
echo "unique_env_str: ${{ github.event.client_payload.unique_env_str }}"
echo "os: ${{ github.event.client_payload.os }}"
echo "io: ${{ github.event.client_payload.io }}"
echo "tls: ${{ github.event.client_payload.tls }}"
echo "arch: ${{ github.event.client_payload.arch }}"
echo "caller id: ${{ github.event.client_payload.caller_id }}"
echo "sha: ${{ github.event.client_payload.sha }}"
echo "ref: ${{ github.event.client_payload.ref }}"
echo "pr: ${{ github.event.client_payload.pr }}"
echo "assigned_runner: $env:ASSIGNED_RUNNER"
echo "unique_env_str: $env:UNIQUE_ENV_STR"
echo "os: $env:TARGET_OS"
echo "io: $env:TARGET_IO"
echo "tls: $env:TARGET_TLS"
echo "arch: $env:TARGET_ARCH"
echo "caller id: $env:CALLER_ID"
echo "sha: $env:DISPATCH_SHA"
echo "ref: $env:DISPATCH_REF"
echo "pr: $env:DISPATCH_PR"

run-secnetperf:
name: secnetperf
Expand Down Expand Up @@ -63,18 +74,26 @@ jobs:
- name: Run secnetperf
shell: pwsh
timeout-minutes: 40
env:
NETPERF_LOG_PROFILE: ${{ github.event.client_payload.logs || 'NULL' }}
NETPERF_MSQUIC_COMMIT: ${{ github.event.client_payload.sha || github.event.client_payload.ref || inputs.ref || 'main' }}
NETPERF_OS: ${{ github.event.client_payload.os }}
NETPERF_ARCH: ${{ github.event.client_payload.arch }}
NETPERF_TLS: ${{ github.event.client_payload.tls }}
NETPERF_IO: ${{ github.event.client_payload.io }}
NETPERF_FILTER: ${{ github.event.client_payload.filter || '' }}
run: |
$env:netperf_remote_powershell_supported = $true
./scripts/secnetperf.ps1 `
-LogProfile ${{ github.event.client_payload.logs || 'NULL' }} `
-MsQuicCommit ${{ github.event.client_payload.sha || github.event.client_payload.ref || inputs.ref || 'main' }} `
-LogProfile $env:NETPERF_LOG_PROFILE `
-MsQuicCommit $env:NETPERF_MSQUIC_COMMIT `
-environment lab `
-plat ${{env.OS}} `
-os ${{ github.event.client_payload.os }} `
-arch ${{ github.event.client_payload.arch }} `
-tls ${{ github.event.client_payload.tls }} `
-io ${{ github.event.client_payload.io }} `
-filter '${{ github.event.client_payload.filter || '' }}'
-os $env:NETPERF_OS `
-arch $env:NETPERF_ARCH `
-tls $env:NETPERF_TLS `
-io $env:NETPERF_IO `
-filter $env:NETPERF_FILTER
- name: Upload Test Results JSON
if: ${{ always() }}
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/msquic_kernel_bvt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,21 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Print Parameters
env:
DISPATCH_GUID: ${{ github.event.client_payload.guid }}
DISPATCH_SHA: ${{ github.event.client_payload.sha }}
DISPATCH_REF: ${{ github.event.client_payload.ref }}
DISPATCH_PR: ${{ github.event.client_payload.pr }}
DISPATCH_LOGS: ${{ github.event.client_payload.logs }}
DISPATCH_FILTER: ${{ github.event.client_payload.filter }}
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 }}"
echo "guid: $DISPATCH_GUID"
echo "sha: $DISPATCH_SHA"
echo "ref: $DISPATCH_REF"
echo "pr: $DISPATCH_PR"
echo "logs: $DISPATCH_LOGS"
echo "filter: $DISPATCH_FILTER"

build-windows-kernel:
name: Build WinKernel
Expand Down Expand Up @@ -121,7 +128,9 @@ jobs:
- name: Test
shell: pwsh
timeout-minutes: 90
run: scripts/test.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -OsRunner ${{ matrix.vec.os }} -GHA -LogProfile Full.Light -GenerateXmlResults -Kernel -Filter ${{ github.event.client_payload.filter || inputs.filter || '' }}
env:
TEST_FILTER: ${{ github.event.client_payload.filter || inputs.filter || '' }}
run: scripts/test.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -OsRunner ${{ matrix.vec.os }} -GHA -LogProfile Full.Light -GenerateXmlResults -Kernel -Filter $env:TEST_FILTER
- name: Upload on Failure
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
if: failure()
Expand Down
Loading
Loading