Skip to content
Merged
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
113 changes: 106 additions & 7 deletions .github/workflows/cts_traffic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,64 @@ jobs:

# Install the latest anti-malware signatures for Windows Defender to prevent false positives.
# Windows Defender incorrectly flags some of the test binaries as malware.
# This step is best-effort: Defender updates can fail due to RPC/service/policy issues on self-hosted runners.
# We retry and log failures but don't fail the workflow to avoid blocking performance tests.
- name: Download latest anti-malware signatures for Windows Defender
run: |
Update-MpSignature -Verbose
Start-MpScan -ScanType QuickScan
Add-MpPreference -ExclusionPath ${{ github.workspace }}
# Best-effort update of Windows Defender signatures with retry logic
# NOTE: The Invoke-WithRetry function is intentionally duplicated in both setup and cleanup steps
# because GitHub Actions runs each step in a separate PowerShell session. This duplication ensures
# the cleanup step (which runs with 'if: always()') remains self-contained and can succeed even
# if the setup step fails entirely. This trade-off prioritizes robustness over DRY principles.
function Invoke-WithRetry {
param(
[ScriptBlock]$ScriptBlock,
[string]$OperationName,
[int]$MaxRetries = 3,
[int]$RetryDelay = 5
)

$success = $false
for ($i = 1; $i -le $MaxRetries; $i++) {
try {
Write-Host "Attempting to $OperationName (attempt $i of $MaxRetries)..."
& $ScriptBlock
Write-Host "Successfully completed: $OperationName"
$success = $true
break
} catch {
Write-Warning "Failed to ${OperationName} (attempt $i of $MaxRetries): $_"
if ($i -lt $MaxRetries) {
Write-Host "Retrying in $RetryDelay seconds..."
Start-Sleep -Seconds $RetryDelay
}
}
}

if (-not $success) {
Write-Warning "Could not complete '$OperationName' after $MaxRetries attempts. Continuing anyway..."
}

return $success
}

# Try to update signatures
Invoke-WithRetry -ScriptBlock { Update-MpSignature -Verbose } -OperationName "update Windows Defender signatures"

# Try to run a quick scan
Invoke-WithRetry -ScriptBlock { Start-MpScan -ScanType QuickScan } -OperationName "run Windows Defender quick scan"

# Try to add workspace exclusion
try {
Write-Host "Adding Windows Defender exclusion for workspace..."
Add-MpPreference -ExclusionPath ${{ github.workspace }}
Write-Host "Successfully added Windows Defender exclusion"
} catch {
Write-Warning "Failed to add Windows Defender exclusion: $_. Continuing anyway..."
}

- name: Download cts-traffic
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: "cts-traffic Release"
path: ${{ github.workspace }}\cts-traffic
Expand Down Expand Up @@ -133,9 +183,58 @@ jobs:
if (Test-Path ${{ github.workspace }}\cts-traffic) { Remove-Item -Recurse -Force ${{ github.workspace }}\cts-traffic }
if (Test-Path ${{ github.workspace }}\ETL) { Remove-Item -Recurse -Force ${{ github.workspace }}\ETL }

# This step is best-effort: Defender operations can fail due to RPC/service/policy issues on self-hosted runners.
- name: Restore Windows Defender exclusions
if: always()
run: |
Remove-MpPreference -ExclusionPath ${{ github.workspace }}
Update-MpSignature -Verbose
Start-MpScan -ScanType QuickScan
# Best-effort restore of Windows Defender state with retry logic
# NOTE: The Invoke-WithRetry function is intentionally duplicated in both setup and cleanup steps
# because GitHub Actions runs each step in a separate PowerShell session. This duplication ensures
# the cleanup step (which runs with 'if: always()') remains self-contained and can succeed even
# if the setup step fails entirely. This trade-off prioritizes robustness over DRY principles.
function Invoke-WithRetry {
param(
[ScriptBlock]$ScriptBlock,
[string]$OperationName,
[int]$MaxRetries = 3,
[int]$RetryDelay = 5
)

$success = $false
for ($i = 1; $i -le $MaxRetries; $i++) {
try {
Write-Host "Attempting to $OperationName (attempt $i of $MaxRetries)..."
& $ScriptBlock
Write-Host "Successfully completed: $OperationName"
$success = $true
break
} catch {
Write-Warning "Failed to ${OperationName} (attempt $i of $MaxRetries): $_"
if ($i -lt $MaxRetries) {
Write-Host "Retrying in $RetryDelay seconds..."
Start-Sleep -Seconds $RetryDelay
}
}
}

if (-not $success) {
Write-Warning "Could not complete '$OperationName' after $MaxRetries attempts. Continuing anyway..."
}

return $success
}

# Try to remove workspace exclusion
try {
Write-Host "Removing Windows Defender exclusion for workspace..."
Remove-MpPreference -ExclusionPath ${{ github.workspace }}
Write-Host "Successfully removed Windows Defender exclusion"
} catch {
Write-Warning "Failed to remove Windows Defender exclusion: $_. Continuing anyway..."
}

# Try to update signatures with retry logic
Invoke-WithRetry -ScriptBlock { Update-MpSignature -Verbose } -OperationName "update Windows Defender signatures"

# Try to run a quick scan with retry logic
Invoke-WithRetry -ScriptBlock { Start-MpScan -ScanType QuickScan } -OperationName "run Windows Defender quick scan"
4 changes: 2 additions & 2 deletions .github/workflows/custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ jobs:
with:
ref: ${{ inputs.ref || '' }}
- name: Download Build Artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with: # note we always use binaries built on windows-2022.
name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-windows-2022-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.build }}
path: artifacts
- name: Download Build Artifacts for Testing From WinUser
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with: # note we always use binaries built on windows-2022.
name: ${{ matrix.vec.config }}-windows-windows-2022-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.build }}
path: artifacts
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ebpf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ jobs:
echo "C:\Program Files\GitHub CLI" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Download ebpf-for-windows
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: "ebpf-for-windows - MSI installer (none_NativeOnlyRelease)"
path: ${{ github.workspace }}\bpf_performance
Expand All @@ -232,7 +232,7 @@ jobs:
path: ${{ github.workspace }}\bpf_performance\install.log

- name: Download xdp-for-windows
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: "bin_Release_x64"
path: ${{ github.workspace }}\xdp
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
Expand-Archive -Path build-Release-windows-2022.zip -DestinationPath .

- name: Download cts-traffic
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: "cts-traffic Release"
path: ${{ github.workspace }}\cts-traffic
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ebpf_dynamic_vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
Start-Process -FilePath "vc_redist.x64.exe" -ArgumentList "/quiet /qn /norestart" -Wait -NoNewWindow

- name: Download ebpf-for-windows
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: "ebpf-for-windows - MSI installer (none_NativeOnlyRelease)"
path: ${{ github.workspace }}\bpf_performance
Expand Down Expand Up @@ -206,7 +206,7 @@ jobs:
Expand-Archive -Path build-Release-windows-2022.zip -DestinationPath .

- name: Download cts-traffic
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: "cts-traffic Release"
path: ${{ github.workspace }}\cts-traffic
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main_netperfapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

steps:
- name: Download artifact from build job
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: node-app

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/msquic_kernel_bvt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ jobs:
ref: ${{ github.event.client_payload.ref || inputs.ref || '' }}
repository: microsoft/msquic
- name: Download Build Artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with: # note we always use binaries built on windows-2022.
name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-windows-2022-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.build }}
path: artifacts
- name: Download Build Artifacts for Testing From WinUser
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with: # note we always use binaries built on windows-2022.
name: ${{ matrix.vec.config }}-windows-windows-2022-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.build }}
path: artifacts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/network-traffic-performance-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
New-Item -ItemType Directory -Path "$env:GITHUB_WORKSPACE/ETL" | Out-Null

- name: Download echo test tool
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: "echo_test"
path: ${{ github.workspace }}/echo
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/network-traffic-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
New-Item -ItemType Directory -Path ${{ github.workspace }}\ETL

- name: Download cts-traffic
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: "cts-traffic Release"
path: ${{ github.workspace }}\cts-traffic
Expand Down Expand Up @@ -271,7 +271,7 @@ jobs:
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Name "DumpFolder" -Value "$DumpFolder" -PropertyType ExpandString -ErrorAction SilentlyContinue

- name: Download echo test tool
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: "echo_test"
path: ${{ github.workspace }}\echo
Expand Down Expand Up @@ -500,7 +500,7 @@ jobs:
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Name "DumpFolder" -Value "$DumpFolder" -PropertyType ExpandString -ErrorAction SilentlyContinue

- name: Download QUIC echo test tool
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: "quic_echo_test"
path: ${{ github.workspace }}\quic_echo
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/quic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,12 @@ jobs:
if: ${{ matrix.env == 'azure' }}
uses: ./netperfrepo/.github/actions/prepare-1es-machine
- name: Download Artifacts
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: Release-${{env.OS}}-${{ matrix.os == 'windows-2025' && 'windows-2022' || matrix.os }}-${{ matrix.arch }}-${{ matrix.tls }}${{ matrix.iouring }}-Perf
path: artifacts
- name: Download Kernel Artifacts
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
if: ${{ matrix.io == 'wsk' }}
with:
name: Release-winkernel-${{ matrix.os == 'windows-2025' && 'windows-2022' || matrix.os }}-${{ matrix.arch }}-${{ matrix.tls }}
Expand Down Expand Up @@ -294,13 +294,13 @@ jobs:
shell: pwsh
run: echo "OS=$('${{runner.os}}'.ToLower())" >> $env:GITHUB_ENV
- name: Download Kernel Drivers
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
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 # v4.1.5
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: Release-${{env.OS}}-${{ matrix.os == 'windows-2025' && 'windows-2022' || matrix.os }}-${{ matrix.arch }}-${{ matrix.tls }}-Perf
path: artifacts
Expand Down Expand Up @@ -380,7 +380,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
path: artifacts/logs
pattern: json-test-results-*
Expand All @@ -402,7 +402,7 @@ jobs:
with:
repository: microsoft/netperf
ref: sqlite
- uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
pattern: json-test-results-*
- name: Remove deprecated python scripts
Expand Down Expand Up @@ -442,7 +442,7 @@ jobs:
repository: microsoft/netperf
ref: deploy
- run: 'rm -rf *.json'
- uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: history_pages
path: history_pages
Expand All @@ -451,7 +451,7 @@ jobs:
run: |
mv history_pages/*.json .
rm -rf history_pages
- uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
pattern: "json-test-results-*"
- run: ls
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
else
echo "404.html file does not exist. Skipping removal."
fi
- uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: dist
path: ./dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/xdp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
ref: ${{ github.event.client_payload.sha || github.event.client_payload.ref || inputs.ref || 'main' }}
sparse-checkout: tools
- name: Download Artifacts
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: bin_Release_${{ matrix.vec.arch }} # Build always comes from 2022 for now
path: artifacts/bin
Expand Down
Loading