зеркало из https://github.com/microsoft/msquic.git
Use -UseXdp for github pipeline (#4317)
* Use -EnableLinuxXDP * add EnableLinuxXDP for 'Build' * fix ternary operator * add 'XDP' to build artifact name * fix? * fix? * fix? * fix? * fix * fix * exclude x86 * specify '-XDP' artifacts * fix * fgix * specify 'xdp' for all cases * unify xdp flag as -UseXdp * fix matrix.vec.xdp * fix a bit
This commit is contained in:
Родитель
38861ea1e8
Коммит
0a29701afc
|
@ -186,12 +186,12 @@ extends:
|
|||
parameters:
|
||||
config: Release
|
||||
tls: openssl3
|
||||
xdp: "-EnableLinuxXDP"
|
||||
xdp: "-UseXdp"
|
||||
- template: .azure/obtemplates/build-linux.yml@self
|
||||
parameters:
|
||||
config: Debug
|
||||
tls: openssl3
|
||||
xdp: "-EnableLinuxXDP"
|
||||
xdp: "-UseXdp"
|
||||
|
||||
- stage: package_linux
|
||||
displayName: Package Linux
|
||||
|
|
|
@ -182,12 +182,12 @@ extends:
|
|||
parameters:
|
||||
config: Release
|
||||
tls: openssl3
|
||||
xdp: "-EnableLinuxXDP"
|
||||
xdp: "-UseXdp"
|
||||
- template: .azure/obtemplates/build-linux.yml@self
|
||||
parameters:
|
||||
config: Debug
|
||||
tls: openssl3
|
||||
xdp: "-EnableLinuxXDP"
|
||||
xdp: "-UseXdp"
|
||||
|
||||
- stage: package_linux
|
||||
displayName: Package Linux
|
||||
|
|
|
@ -103,17 +103,17 @@ jobs:
|
|||
- name: Build For Test
|
||||
if: inputs.build == '-Test'
|
||||
shell: pwsh
|
||||
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} -DisablePerf ${{ inputs.static }} ${{ inputs.clang }} ${{ inputs.systemcrypto }} ${{ inputs.codecheck }} ${{ inputs.sanitize }} -OneBranch
|
||||
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} -DisablePerf ${{ inputs.static }} ${{ inputs.clang }} ${{ inputs.systemcrypto }} ${{ inputs.codecheck }} ${{ inputs.sanitize }} ${{ inputs.xdp }} -OneBranch
|
||||
- name: Build For Perf
|
||||
if: inputs.build == '-Perf'
|
||||
shell: pwsh
|
||||
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} -DisableTools -DisableTest ${{ inputs.static }} ${{ inputs.clang }} ${{ inputs.systemcrypto }} ${{ inputs.codecheck }} ${{ inputs.sanitize }}
|
||||
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} -DisableTools -DisableTest ${{ inputs.static }} ${{ inputs.clang }} ${{ inputs.systemcrypto }} ${{ inputs.codecheck }} ${{ inputs.sanitize }} ${{ inputs.xdp }}
|
||||
- name: Build
|
||||
if: inputs.build == ''
|
||||
shell: pwsh
|
||||
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} ${{ inputs.static }} ${{ inputs.clang }} ${{ inputs.systemcrypto }} ${{ inputs.codecheck }} ${{ inputs.sanitize }} -OneBranch
|
||||
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} ${{ inputs.static }} ${{ inputs.clang }} ${{ inputs.systemcrypto }} ${{ inputs.codecheck }} ${{ inputs.sanitize }} ${{ inputs.xdp }} -OneBranch
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||
with:
|
||||
name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}${{ inputs.static }}${{ inputs.clang }}${{ inputs.systemcrypto }}${{ inputs.codecheck }}${{ inputs.sanitize }}${{ inputs.build }}
|
||||
name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}${{ inputs.static }}${{ inputs.clang }}${{ inputs.systemcrypto }}${{ inputs.codecheck }}${{ inputs.sanitize }}${{ inputs.xdp }}${{ inputs.build }}
|
||||
path: artifacts
|
||||
|
|
|
@ -109,6 +109,7 @@ jobs:
|
|||
static: ['', '-Static']
|
||||
clang: ['', '-Clang']
|
||||
codecheck: ['', '-CodeCheck']
|
||||
xdp: ['', '-UseXdp']
|
||||
exclude:
|
||||
# Android doesn't support x86
|
||||
- plat: android
|
||||
|
@ -126,6 +127,13 @@ jobs:
|
|||
os: 'ubuntu-22.04'
|
||||
tls: 'openssl'
|
||||
systemcrypto: '-UseSystemOpenSSLCrypto'
|
||||
# linux xdp is for ubuntu22.04 only for now
|
||||
- plat: android
|
||||
xdp: "-UseXdp"
|
||||
- os: 'ubuntu-20.04'
|
||||
xdp: "-UseXdp"
|
||||
- arch: x86
|
||||
xdp: "-UseXdp"
|
||||
# Android doesn't use Clang
|
||||
- plat: android
|
||||
clang: '-Clang'
|
||||
|
@ -158,6 +166,7 @@ jobs:
|
|||
static: ${{ matrix.static }}
|
||||
clang: ${{ matrix.clang }}
|
||||
codecheck: ${{ matrix.codecheck }}
|
||||
xdp: ${{ matrix.xdp }}
|
||||
|
||||
build-darwin:
|
||||
name: MacOs
|
||||
|
|
|
@ -34,7 +34,7 @@ jobs:
|
|||
matrix:
|
||||
vec: [
|
||||
{ plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl" },
|
||||
{ plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3" },
|
||||
{ plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" },
|
||||
]
|
||||
uses: ./.github/workflows/build-reuse-unix.yml
|
||||
with:
|
||||
|
@ -43,6 +43,7 @@ jobs:
|
|||
os: ${{ matrix.vec.os }}
|
||||
arch: ${{ matrix.vec.arch }}
|
||||
tls: ${{ matrix.vec.tls }}
|
||||
xdp: ${{ matrix.vec.xdp }}
|
||||
|
||||
build-windows:
|
||||
name: Windows
|
||||
|
@ -72,7 +73,7 @@ jobs:
|
|||
{ plat: "windows", os: "windows-2022", arch: "x64", tls: "openssl" },
|
||||
{ plat: "windows", os: "windows-2022", arch: "x64", tls: "openssl3" },
|
||||
{ plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl" },
|
||||
{ plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3" },
|
||||
{ plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" },
|
||||
{ plat: "macos", os: "macos-12", arch: "universal", tls: "openssl" },
|
||||
]
|
||||
runs-on: ${{ matrix.vec.os }}
|
||||
|
@ -81,11 +82,11 @@ jobs:
|
|||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
- name: Prepare Machine
|
||||
shell: pwsh
|
||||
run: scripts/prepare-machine.ps1 -ForTest
|
||||
run: scripts/prepare-machine.ps1 -ForTest ${{ matrix.vec.xdp }}
|
||||
- name: Download Build Artifacts
|
||||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
|
||||
with:
|
||||
name: Debug-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}
|
||||
name: Debug-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}
|
||||
path: artifacts
|
||||
- uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3
|
||||
with:
|
||||
|
|
|
@ -32,7 +32,7 @@ jobs:
|
|||
{ config: "Release", os: "ubuntu-20.04", arch: "x64", tls: "openssl" },
|
||||
{ config: "Release", os: "ubuntu-22.04", arch: "arm", tls: "openssl3" },
|
||||
{ config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "openssl3" },
|
||||
{ config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "openssl3" },
|
||||
{ config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" },
|
||||
]
|
||||
uses: ./.github/workflows/package-reuse-linux.yml
|
||||
with:
|
||||
|
@ -40,6 +40,7 @@ jobs:
|
|||
os: ${{ matrix.vec.os }}
|
||||
arch: ${{ matrix.vec.arch }}
|
||||
tls: ${{ matrix.vec.tls }}
|
||||
xdp: ${{ matrix.vec.xdp }}
|
||||
|
||||
test-packages:
|
||||
name: Test Linux Packages
|
||||
|
@ -50,7 +51,7 @@ jobs:
|
|||
matrix:
|
||||
vec: [
|
||||
{ config: "Release", os: "ubuntu-20.04", arch: "x64", tls: "openssl" },
|
||||
{ config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "openssl3" },
|
||||
{ config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" },
|
||||
]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
@ -59,16 +60,16 @@ jobs:
|
|||
fetch-depth: 0
|
||||
- name: Prepare Machine
|
||||
shell: pwsh
|
||||
run: scripts/prepare-machine.ps1 -ForTest
|
||||
run: scripts/prepare-machine.ps1 -ForTest ${{ matrix.vec.xdp }}
|
||||
- name: Download Package
|
||||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
|
||||
with:
|
||||
name: ${{ matrix.vec.config }}-linux-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}-UseSystemOpenSSLCrypto
|
||||
name: ${{ matrix.vec.config }}-linux-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}-UseSystemOpenSSLCrypto${{ matrix.vec.xdp }}
|
||||
path: artifacts
|
||||
- name: Download Build Artifacts
|
||||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
|
||||
with:
|
||||
name: Package-${{ matrix.vec.config }}-linux-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}-UseSystemOpenSSLCrypto
|
||||
name: Package-${{ matrix.vec.config }}-linux-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}-UseSystemOpenSSLCrypto${{ matrix.vec.xdp }}
|
||||
path: artifacts
|
||||
- name: Install Package
|
||||
run: |
|
||||
|
|
|
@ -50,6 +50,10 @@ on:
|
|||
required: false
|
||||
default: '' # Empty string means build all
|
||||
type: string
|
||||
xdp:
|
||||
required: false
|
||||
default: ''
|
||||
type: string
|
||||
|
||||
permissions: read-all
|
||||
|
||||
|
@ -66,6 +70,7 @@ jobs:
|
|||
systemcrypto: '-UseSystemOpenSSLCrypto' # packages must use libcrypto on system
|
||||
clang: ${{ inputs.clang }}
|
||||
build: ${{ inputs.build }}
|
||||
xdp: ${{ inputs.xdp }}
|
||||
|
||||
package:
|
||||
name: Package
|
||||
|
@ -78,11 +83,11 @@ jobs:
|
|||
fetch-depth: 0
|
||||
- name: Prepare Machine
|
||||
shell: pwsh
|
||||
run: scripts/prepare-machine.ps1 -ForBuild
|
||||
run: scripts/prepare-machine.ps1 -ForBuild ${{ inputs.xdp }}
|
||||
- name: Download Build Artifacts
|
||||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
|
||||
with:
|
||||
name: ${{ inputs.config }}-linux-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}-UseSystemOpenSSLCrypto${{ inputs.sanitize }}${{ inputs.build }}
|
||||
name: ${{ inputs.config }}-linux-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}-UseSystemOpenSSLCrypto${{ inputs.sanitize }}${{ inputs.xdp }}${{ inputs.build }}
|
||||
path: artifacts
|
||||
- name: Extract binaries # they are tar'd to preserve permissions and symlinks.
|
||||
run: |
|
||||
|
@ -95,5 +100,5 @@ jobs:
|
|||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||
with:
|
||||
name: Package-${{ inputs.config }}-linux-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}-UseSystemOpenSSLCrypto${{ inputs.sanitize }}${{ inputs.build }}
|
||||
name: Package-${{ inputs.config }}-linux-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}-UseSystemOpenSSLCrypto${{ inputs.sanitize }}${{ inputs.xdp }}${{ inputs.build }}
|
||||
path: artifacts/dist
|
||||
|
|
|
@ -52,6 +52,7 @@ jobs:
|
|||
{ config: "Debug", plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl", sanitize: "-Sanitize", build: "-Test" },
|
||||
{ config: "Debug", plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" },
|
||||
{ config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", build: "-Test" },
|
||||
{ config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", build: "-Test", xdp: "-UseXdp" },
|
||||
]
|
||||
uses: ./.github/workflows/build-reuse-unix.yml
|
||||
with:
|
||||
|
@ -63,6 +64,7 @@ jobs:
|
|||
systemcrypto: ${{ matrix.vec.systemcrypto }}
|
||||
sanitize: ${{ matrix.vec.sanitize }}
|
||||
build: ${{ matrix.vec.build }}
|
||||
xdp: ${{ matrix.vec.xdp }}
|
||||
|
||||
stress:
|
||||
name: Stress
|
||||
|
@ -103,7 +105,7 @@ jobs:
|
|||
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
|
||||
if: matrix.vec.plat == 'linux' || matrix.vec.plat == 'macos'
|
||||
with:
|
||||
name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.sanitize }}${{ matrix.vec.build }}
|
||||
name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.sanitize }}${{ matrix.vec.xdp }}${{ matrix.vec.build }}
|
||||
path: artifacts
|
||||
- name: Fix permissions for Unix
|
||||
if: matrix.vec.plat == 'linux' || matrix.vec.plat == 'macos'
|
||||
|
|
|
@ -71,7 +71,7 @@ jobs:
|
|||
{ config: "Debug", plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" },
|
||||
{ config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl", sanitize: "-Sanitize", build: "-Test" },
|
||||
{ config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" },
|
||||
{ config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", build: "-Test" },
|
||||
{ config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", build: "-Test", xdp: "-UseXdp" },
|
||||
{ config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", systemcrypto: "-UseSystemOpenSSLCrypto", sanitize: "-Sanitize", build: "-Test" },
|
||||
]
|
||||
uses: ./.github/workflows/build-reuse-unix.yml
|
||||
|
@ -84,6 +84,7 @@ jobs:
|
|||
systemcrypto: ${{ matrix.vec.systemcrypto }}
|
||||
sanitize: ${{ matrix.vec.sanitize }}
|
||||
build: ${{ matrix.vec.build }}
|
||||
xdp: ${{ matrix.vec.xdp }}
|
||||
|
||||
bvt:
|
||||
name: BVT
|
||||
|
@ -127,7 +128,7 @@ jobs:
|
|||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
|
||||
if: matrix.vec.plat == 'linux'
|
||||
with:
|
||||
name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.systemcrypto }}${{ matrix.vec.sanitize }}${{ matrix.vec.build }}
|
||||
name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.systemcrypto }}${{ matrix.vec.sanitize }}${{ matrix.vec.xdp }}${{ matrix.vec.build }}
|
||||
path: artifacts
|
||||
- name: Fix permissions for Unix
|
||||
if: matrix.vec.plat == 'linux' || matrix.vec.plat == 'macos'
|
||||
|
|
|
@ -186,7 +186,7 @@ Linux XDP is experimentally supported on amd64 && Ubuntu 22.04LTS.
|
|||
Commands below automatically install dependencies and setup runtime environment.
|
||||
```sh
|
||||
pwsh ./scripts/prepare-machine.ps1 -UseXdp
|
||||
pwsh ./scripts/build.ps1 -EnableLinuxXDP
|
||||
pwsh ./scripts/build.ps1 -UseXdp
|
||||
```
|
||||
|
||||
`./scripts/prepare-machine.ps1` internally does the below commands:
|
||||
|
|
|
@ -57,7 +57,7 @@ This script provides helpers for building msquic.
|
|||
.PARAMETER PGO
|
||||
Builds msquic with profile guided optimization support (Windows-only).
|
||||
|
||||
.PARAMETER EnableLinuxXDP
|
||||
.PARAMETER UseXdp
|
||||
Enables XDP support (Linux-only).
|
||||
|
||||
.PARAMETER Generator
|
||||
|
@ -170,7 +170,7 @@ param (
|
|||
[switch]$PGO = $false,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[switch]$EnableLinuxXDP = $false,
|
||||
[switch]$UseXdp = $false,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$Generator = "",
|
||||
|
@ -272,7 +272,7 @@ if ($Arch -eq "arm64ec") {
|
|||
}
|
||||
|
||||
if ($IsLinux -And $Arch -ne "x64") {
|
||||
if ($EnableLinuxXDP) {
|
||||
if ($UseXdp) {
|
||||
Write-Error "Linux XDP is supported only on x64 platforms"
|
||||
}
|
||||
}
|
||||
|
@ -469,7 +469,7 @@ function CMake-Generate {
|
|||
if ($PGO) {
|
||||
$Arguments += " -DQUIC_PGO=on"
|
||||
}
|
||||
if ($EnableLinuxXDP) {
|
||||
if ($UseXdp) {
|
||||
$Arguments += " -DQUIC_LINUX_XDP_ENABLED=on"
|
||||
}
|
||||
if ($Platform -eq "uwp") {
|
||||
|
|
Загрузка…
Ссылка в новой задаче