run-xdp #83
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: XDP | |
on: | |
workflow_dispatch: | |
inputs: | |
ref: | |
required: false | |
default: '' | |
type: string | |
repository_dispatch: | |
types: [run-xdp] | |
# Args: { guid, sha, ref, pr } | |
concurrency: | |
group: xdp-${{ github.event.client_payload.pr || github.event.client_payload.sha }} | |
cancel-in-progress: true | |
permissions: read-all | |
jobs: | |
# For automated identification of the workflow. | |
name: | |
name: For ${{ github.event.client_payload.guid }} | |
needs: [] | |
runs-on: ubuntu-20.04 | |
steps: | |
- run: echo "no op" | |
build: | |
name: Build Windows | |
needs: [] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ['2022'] | |
platform: [x64] | |
runs-on: windows-${{ matrix.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac | |
with: | |
repository: microsoft/xdp-for-windows | |
ref: ${{ github.event.client_payload.sha || github.event.client_payload.ref || inputs.ref || 'main' }} | |
submodules: recursive | |
- 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=Release /p:platform=${{ matrix.platform }} | |
- name: Sign Binaries | |
shell: PowerShell | |
run: tools/sign.ps1 -Config Release -Arch ${{ matrix.platform }} | |
- name: Build Installer | |
shell: PowerShell | |
run: tools/create-installer.ps1 -Config Release -Platform ${{ matrix.platform }} | |
- name: Filter Artifacts | |
shell: pwsh | |
run: | | |
$src = "artifacts/bin/${{ matrix.platform }}_Release" | |
$dest = "artifacts/bin2/${{ matrix.platform }}_Release" | |
mkdir $dest | Out-Null | |
copy -Recurse $src/xdp $dest | |
copy -Recurse $src/xdpinstaller $dest | |
copy $src/xdppcw.man $dest | |
copy $src/xdp.pdb $dest | |
copy $src/xdpapi.pdb $dest | |
copy $src/pktcmd.exe $dest | |
copy $src/pktcmd.pdb $dest | |
copy $src/xskbench.exe $dest | |
copy $src/xskbench.pdb $dest | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 | |
with: | |
name: bin_Release_${{ matrix.os }}_${{ matrix.platform }} | |
path: artifacts/bin2 | |
test: | |
name: Test Windows | |
needs: [build] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ['2022'] | |
arch: [x64] | |
runs-on: | |
- self-hosted | |
- "windows" | |
- ${{ matrix.arch }} | |
- "azure" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac | |
with: | |
repository: microsoft/xdp-for-windows | |
ref: ${{ github.event.client_payload.sha || github.event.client_payload.ref || inputs.ref || 'main' }} | |
sparse-checkout: tools | |
- name: Download Artifacts | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a | |
with: | |
name: bin_Release_${{ matrix.os }}_${{ matrix.arch }} | |
path: artifacts/bin | |
- name: Run Tests | |
shell: pwsh | |
run: tools/two-machine-perf.ps1 -Config Release -Arch ${{ matrix.arch }} | |
- name: Upload Logs | |
if: ${{ always() }} | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 | |
with: | |
name: logs_Release_${{ matrix.os }}_${{ matrix.arch }} | |
path: artifacts/logs |