Update eBPF version to 0.13.0 #940
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
- release/* | |
- prerelease/* | |
pull_request: | |
branches: | |
- main | |
- release/* | |
- prerelease/* | |
schedule: | |
- cron: '37 12 * * 2' | |
concurrency: | |
# Cancel any workflow currently in progress for the same PR. | |
# Allow running concurrently with any other commits. | |
group: ci-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
permissions: read-all | |
jobs: | |
build: | |
name: Build | |
strategy: | |
fail-fast: false | |
matrix: | |
# Some driver developers are building for WS2022 LTSC targets using VS2019 + | |
# the Windows Server 2022 WDK, so validate our project still builds in that | |
# environment, in addition to the default WS 2022. | |
os: [2019, 2022] | |
configuration: [Release, Debug] | |
platform: [x64] | |
runs-on: windows-${{ matrix.os }} | |
permissions: | |
actions: read | |
contents: read | |
security-events: write # For CodeQL | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
submodules: recursive | |
- name: Initialize CodeQL | |
if: ${{ github.event_name == 'schedule' }} | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: c-cpp | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@ab534842b4bdf384b8aaf93765dc6f721d9f5fab | |
- name: Prepare Machine | |
shell: PowerShell | |
run: tools/prepare-machine.ps1 -ForBuild -Verbose | |
- name: Install LLVM 11.0 | |
run: | | |
choco install -y llvm --version 11.0.1 --allow-downgrade | |
echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Nuget Restore | |
run: nuget.exe restore xdp.sln -ConfigFile src/nuget.config | |
- name: Prepare for compiling eBPF programs | |
run: tools/prepare-machine.ps1 -ForEbpfBuild -Verbose | |
- name: Build | |
run: msbuild xdp.sln /m /p:configuration=${{ matrix.configuration }} /p:platform=${{ matrix.platform }} | |
- name: Sign Binaries | |
shell: PowerShell | |
run: tools/sign.ps1 -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} | |
- name: Build Installer | |
shell: PowerShell | |
run: tools/create-installer.ps1 -Config ${{ matrix.configuration }} -Platform ${{ matrix.platform }} | |
- name: Upload Artifacts | |
if: matrix.os == 2022 | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 | |
with: | |
name: bin_${{ matrix.configuration }}_${{ matrix.platform }} | |
path: | | |
artifacts/bin | |
!artifacts/bin/**/*.ilk | |
!artifacts/bin/**/*.exp | |
!artifacts/bin/**/*.lastcodeanalysissucceeded | |
- name: Publish Symbols | |
uses: microsoft/action-publish-symbols@719c40b80e38bca806f3e01e1e3dd3a67554cd68 | |
if: github.event_name != 'pull_request' && matrix.os == 2022 | |
with: | |
accountName: mscodehub | |
symbolServiceUrl: 'https://artifacts.dev.azure.com' | |
personalAccessToken: ${{ secrets.AZDO_PAT }} | |
- name: Perform CodeQL Analysis | |
if: ${{ github.event_name == 'schedule' }} | |
uses: github/codeql-action/analyze@v2 | |
with: | |
category: "/language:c-cpp" | |
functional_tests: | |
name: Functional Tests | |
needs: build | |
env: | |
# For 'main' commits | |
fullRuntime: 120 # minutes. Update timeout-minutes with any changes. | |
fullIters: 10 | |
# For PRs | |
prRuntime: 15 # minutes. Update timeout-minutes with any changes. | |
prIters: 1 | |
strategy: | |
fail-fast: false | |
matrix: | |
windows: [2019, 2022, Prerelease] | |
configuration: [Release, Debug] | |
platform: [x64] | |
runs-on: | |
- self-hosted | |
- "1ES.Pool=xdp-ci-functional-gh" | |
- "1ES.ImageOverride=WS${{ matrix.windows }}-Functional" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
sparse-checkout: tools | |
- name: Check Drivers | |
shell: PowerShell | |
run: tools/check-drivers.ps1 -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Verbose | |
- name: Prepare Machine | |
shell: PowerShell | |
run: tools/prepare-machine.ps1 -ForFunctionalTest -NoReboot -Verbose | |
- name: Download Artifacts | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a | |
with: | |
name: bin_${{ matrix.configuration }}_${{ matrix.platform }} | |
path: artifacts/bin | |
- name: Run Tests (PR) | |
if: ${{ github.event_name == 'pull_request' }} | |
shell: PowerShell | |
timeout-minutes: 15 | |
run: tools/functional.ps1 -Verbose -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Iterations ${{ env.prIters }} -Timeout ${{ env.fullRuntime }} | |
- name: Run Tests (main) | |
if: ${{ github.event_name != 'pull_request' }} | |
shell: PowerShell | |
timeout-minutes: 120 | |
run: tools/functional.ps1 -Verbose -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Iterations ${{ env.fullIters }} -Timeout ${{ env.fullRuntime }} | |
- name: Convert Logs | |
if: ${{ always() }} | |
timeout-minutes: 5 | |
shell: PowerShell | |
run: tools/log.ps1 -Convert -Name xdpfunc* -Verbose -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} | |
- name: Upload Logs | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 | |
if: ${{ always() }} | |
with: | |
name: logs_func_win${{ matrix.windows }}_${{ matrix.configuration }}_${{ matrix.platform }} | |
path: artifacts/logs | |
- name: Check Drivers | |
if: ${{ always() }} | |
shell: PowerShell | |
run: tools/check-drivers.ps1 -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Verbose | |
stress_tests: | |
name: Stress Tests | |
needs: build | |
env: | |
successThresholdPercent: 1 | |
xdpmpPollProvider: 'FNDIS' | |
# For 'main' commits | |
fullRuntime: 60 # minutes. Update timeout-minutes with any changes. | |
# For PRs | |
prRuntime: 10 # minutes. Update timeout-minutes with any changes. | |
strategy: | |
fail-fast: false | |
matrix: | |
windows: [2019, 2022] | |
configuration: [Release, Debug] | |
platform: [x64] | |
timeout-minutes: 75 # Ideally this would be only 25 min for PR runs, but GitHub Actions don't support that. | |
runs-on: | |
- self-hosted | |
- "1ES.Pool=xdp-ci-spinxsk-gh" | |
- "1ES.ImageOverride=WS${{ matrix.windows }}-Spinxsk" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
sparse-checkout: tools | |
- name: Check Drivers | |
shell: PowerShell | |
run: tools/check-drivers.ps1 -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Verbose | |
- name: Prepare Machine | |
shell: PowerShell | |
run: tools/prepare-machine.ps1 -ForSpinxskTest -NoReboot -Verbose | |
- name: Download Artifacts | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a | |
with: | |
name: bin_${{ matrix.configuration }}_${{ matrix.platform }} | |
path: artifacts/bin | |
- name: Run spinxsk (PR) | |
if: ${{ github.event_name == 'pull_request' }} | |
shell: PowerShell | |
timeout-minutes: 15 | |
run: tools/spinxsk.ps1 -Verbose -Stats -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Minutes ${{ env.prRuntime }} -XdpmpPollProvider ${{ env.xdpmpPollProvider }} -SuccessThresholdPercent ${{ env.successThresholdPercent }} -EnableEbpf | |
- name: Run spinxsk (main) | |
if: ${{ github.event_name != 'pull_request' }} | |
shell: PowerShell | |
timeout-minutes: 65 | |
run: tools/spinxsk.ps1 -Verbose -Stats -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Minutes ${{ env.fullRuntime }} -XdpmpPollProvider ${{ env.xdpmpPollProvider }} -SuccessThresholdPercent ${{ env.successThresholdPercent }} -EnableEbpf | |
- name: Convert Logs | |
if: ${{ always() }} | |
timeout-minutes: 5 | |
shell: PowerShell | |
run: tools/log.ps1 -Convert -Name spinxsk -Verbose -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} | |
- name: Upload Logs | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 | |
if: ${{ always() }} | |
with: | |
name: logs_stress_win${{ matrix.windows }}_${{ matrix.configuration }}_${{ matrix.platform }} | |
path: artifacts/logs | |
- name: Check Drivers | |
if: ${{ always() }} | |
shell: PowerShell | |
run: tools/check-drivers.ps1 -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Verbose | |
pktfuzz_tests: | |
name: Fuzz Packet Parsing | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
windows: [2022] # ASAN is currently buggy on Prerelease and 2019. | |
configuration: [Release, Debug] | |
platform: [x64] | |
runs-on: | |
- self-hosted | |
- "1ES.Pool=xdp-ci-fuzz-gh" | |
- "1ES.ImageOverride=WS${{ matrix.windows }}" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
sparse-checkout: tools | |
- name: Download Artifacts | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a | |
with: | |
name: bin_${{ matrix.configuration }}_${{ matrix.platform }} | |
path: artifacts/bin | |
- name: Run pktfuzz | |
shell: PowerShell | |
run: tools/pktfuzz.ps1 -Minutes 10 -Workers 8 -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Verbose | |
- name: Upload Logs | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 | |
if: ${{ always() }} | |
with: | |
name: logs_pktfuzz_win${{ matrix.windows }}_${{ matrix.configuration }}_${{ matrix.platform }} | |
path: artifacts/logs | |
perf_tests: | |
name: Perf Tests | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
windows: [2019, 2022, Prerelease] | |
configuration: [Release] | |
platform: [x64] | |
timeout-minutes: 75 # Ideally this would be only 25 min for PR runs, but GitHub Actions don't support that. | |
runs-on: | |
- self-hosted | |
- "1ES.Pool=xdp-ci-perf-gh" | |
- "1ES.ImageOverride=WS${{ matrix.windows }}" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
sparse-checkout: tools | |
- name: Check Drivers | |
shell: PowerShell | |
run: tools/check-drivers.ps1 -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Verbose | |
- name: Prepare Machine | |
shell: PowerShell | |
run: tools/prepare-machine.ps1 -ForPerfTest -NoReboot -Verbose | |
- name: Download Artifacts | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a | |
with: | |
name: bin_${{ matrix.configuration }}_${{ matrix.platform }} | |
path: artifacts/bin | |
- name: Run xskperfsuite (Generic, Native) | |
shell: PowerShell | |
run: tools/xskperfsuite.ps1 -Verbose -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Fndis -RawResultsFile "artifacts/logs/xskperfsuite.csv" -XperfDirectory "artifacts/logs" -CommitHash ${{ github.sha }} | |
- name: Run xskperfsuite (TX-inspect, RX-inject) | |
shell: PowerShell | |
run: tools/xskperfsuite.ps1 -Verbose -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Fndis -XdpModes "Generic" -TxInspect -RxInject -RawResultsFile "artifacts/logs/xskperfsuite.csv" -XperfDirectory "artifacts/logs" -CommitHash ${{ github.sha }} | |
- name: Run xskperfsuite (Winsock, RIO) | |
shell: PowerShell | |
run: tools/xskperfsuite.ps1 -Verbose -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Fndis -XdpModes "Winsock", "RIO" -Modes "RX", "TX" -RawResultsFile "artifacts/logs/xskperfsuite.csv" -XperfDirectory "artifacts/logs" -CommitHash ${{ github.sha }} | |
- name: Upload results | |
shell: PowerShell | |
env: | |
SAS_TOKEN: ${{ secrets.PERF_DATA_SAS }} | |
run: tools/upload-perfdata.ps1 -Verbose -FileName "artifacts/logs/xskperfsuite.csv" -ContainerName "cidata" -BlobName "xskperf-ws${{ matrix.windows }}.csv" | |
- name: Upload Logs | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 | |
if: ${{ always() }} | |
with: | |
name: logs_perf_win${{ matrix.windows }}_${{ matrix.configuration }}_${{ matrix.platform }} | |
path: artifacts/logs | |
- name: Check Drivers | |
if: ${{ always() }} | |
shell: PowerShell | |
run: tools/check-drivers.ps1 -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Verbose | |
downlevel_functional_tests: | |
name: Downlevel Functional Tests | |
needs: build | |
env: | |
Runtime: 15 # minutes. Update timeout-minutes with any changes. | |
Iters: 1 | |
strategy: | |
fail-fast: false | |
matrix: | |
downlevel_release: [1.0.0] | |
windows: [2019, 2022, Prerelease] | |
configuration: [Release] | |
platform: [x64] | |
runs-on: | |
- self-hosted | |
- "1ES.Pool=xdp-ci-functional-gh" | |
- "1ES.ImageOverride=WS${{ matrix.windows }}-Functional" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
sparse-checkout: tools | |
- name: Check Drivers | |
shell: PowerShell | |
run: tools/check-drivers.ps1 -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Verbose | |
- name: Prepare Machine | |
shell: PowerShell | |
run: tools/prepare-machine.ps1 -ForFunctionalTest -NoReboot -Verbose | |
- name: Download Artifacts | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a | |
with: | |
name: bin_${{ matrix.configuration }}_${{ matrix.platform }} | |
path: artifacts/bin | |
- name: Download Downlevel Tests | |
shell: PowerShell | |
run: | | |
Invoke-WebRequest -Uri "https://github.com/microsoft/xdp-for-windows/releases/download/v${{ matrix.downlevel_release }}/xdp-tests-${{ matrix.platform }}-${{ matrix.downlevel_release }}.zip" -OutFile "artifacts/downlevel-test.zip" | |
Expand-Archive -Path artifacts/downlevel-test.zip -DestinationPath artifacts/downlevel-test/${{ matrix.platform }} | |
Copy-Item -Path artifacts/downlevel-test/${{ matrix.platform }}/bin/* -Destination artifacts/bin/${{ matrix.platform }}_${{ matrix.configuration }} | |
- name: Run Tests | |
shell: PowerShell | |
timeout-minutes: 15 | |
run: tools/functional.ps1 -Verbose -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Iterations ${{ env.Iters }} -Timeout ${{ env.Runtime }} | |
- name: Convert Logs | |
if: ${{ always() }} | |
timeout-minutes: 5 | |
shell: PowerShell | |
run: tools/log.ps1 -Convert -Name xdpfunc* -Verbose -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} | |
- name: Upload Logs | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 | |
if: ${{ always() }} | |
with: | |
name: logs_func_win${{ matrix.windows }}_${{ matrix.configuration }}_${{ matrix.platform }} | |
path: artifacts/logs | |
- name: Check Drivers | |
if: ${{ always() }} | |
shell: PowerShell | |
run: tools/check-drivers.ps1 -Config ${{ matrix.configuration }} -Arch ${{ matrix.platform }} -Verbose | |
create_artifacts: | |
name: Create Release Artifacts | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
configuration: [Release] | |
platform: [x64] | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Download Artifacts | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a | |
with: | |
name: bin_${{ matrix.configuration }}_${{ matrix.platform }} | |
path: artifacts/bin | |
- name: Create Dev Kit | |
shell: PowerShell | |
run: tools/create-devkit.ps1 -Config ${{ matrix.configuration }} -Platform ${{ matrix.platform }} | |
- name: Create Test Archive | |
shell: PowerShell | |
run: tools/create-test-archive.ps1 -Config ${{ matrix.configuration }} -Platform ${{ matrix.platform }} | |
- name: Upload Release Artifacts | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 | |
with: | |
name: release_artifacts_${{ matrix.configuration }}_${{ matrix.platform }} | |
path: | | |
artifacts/kit/**/*.zip | |
artifacts/tests/**/*.zip | |
etw: | |
name: ETW Plugin | |
needs: [] | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
configuration: [Release, Debug] | |
permissions: | |
security-events: write # For CodeQL | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Initialize CodeQL | |
if: ${{ github.event_name == 'schedule' }} | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: csharp | |
- name: Setup .NET | |
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 | |
with: | |
dotnet-version: 6.0.x | |
- name: Prepare Machine | |
shell: PowerShell | |
run: tools/prepare-machine.ps1 -ForBuild -Verbose | |
- name: Build | |
run: dotnet build src\xdpetwplugin\xdpetwplugin.sln -c ${{ matrix.configuration }} | |
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 | |
with: | |
name: etw_${{ matrix.configuration }} | |
path: artifacts/bin | |
- name: Perform CodeQL Analysis | |
if: ${{ github.event_name == 'schedule' }} | |
uses: github/codeql-action/analyze@v2 | |
with: | |
category: "/language:csharp" | |
netperf: | |
name: Run Perf | |
needs: [] | |
runs-on: windows-latest | |
steps: | |
- name: Run NetPerf Workflow | |
shell: pwsh | |
run: | | |
$url = "https://raw.githubusercontent.com/microsoft/netperf/main/run-workflow.ps1" | |
if ('${{ secrets.NET_PERF_TRIGGER }}' -eq '') { | |
Write-Host "Not able to run because no secrets are available!" | |
return | |
} | |
iex "& { $(irm $url) } ${{ secrets.NET_PERF_TRIGGER }} xdp ${{ github.sha }} ${{ github.ref }} ${{ github.event.pull_request.number }}" | |
Complete: | |
name: Complete | |
needs: [build, functional_tests, stress_tests, pktfuzz_tests, perf_tests, downlevel_functional_tests, create_artifacts, etw, netperf] | |
runs-on: windows-latest | |
steps: | |
- run: echo "CI succeeded" |