msquic/.azure/azure-pipelines.perf.yml

449 строки
12 KiB
YAML

#
# Continuous Integration (CI)
# This pipeline builds and runs MsQuic performance tests.
#
trigger:
branches:
include:
- main
paths:
include:
- .azure/azure-pipelines.perf.yml
- .azure/templates/run-performance.yml
- .gitmodules
- scripts/performance.ps1
- scripts/performance-helper.psm1
- scripts/prepare-machine.ps1
- scripts/RemoteTests.json
- scripts/xdp.json
- src/bin/*
- src/core/*
- src/platform/*
- src/perf/*
- submodules/openssl/*
pr:
branches:
include:
- main
paths:
include:
- .azure/azure-pipelines.perf.yml
- .azure/templates/run-performance.yml
- .gitmodules
- scripts/performance.ps1
- scripts/performance-helper.ps1
- scripts/prepare-machine.ps1
- scripts/RemoteTests.json
- src/bin/*
- src/core/*
- src/platform/*
- src/perf/*
- submodules/openssl/*
name: 0.$(Date:yyyy).$(Date:MM).$(DayOfMonth).$(Rev:rr).0
parameters:
- name: winkernel
type: boolean
displayName: Windows Kernel
default: true
- name: winuser_schannel
type: boolean
displayName: Windows (Schannel)
default: true
- name: winuser_xdp
type: boolean
displayName: Windows (XDP, Schannel)
default: true
- name: winuser_openssl
type: boolean
displayName: Windows (OpenSSL)
default: true
- name: winuser_openssl3
type: boolean
displayName: Windows (OpenSSL3)
default: true
- name: linux_openssl
type: boolean
displayName: Linux (OpenSSL)
default: true
- name: linux_openssl3
type: boolean
displayName: Linux (OpenSSL3)
default: true
- name: arch
type: string
displayName: Architecture
default: x64
values:
- x64
- x86
- name: pgo_mode
type: boolean
displayName: PGO Mode
default: false
- name: logging
type: string
displayName: Logging Type
default: None
values:
- None
- Basic.Light
- Basic.Verbose
- Datapath.Light
- Datapath.Verbose
- Full.Light
- Full.Verbose
- Performance.Light
- Performance.Verbose
- RPS.Light
- RPS.Verbose
- Stacks.Light
- Stacks.Verbose
- name: testToRun
type: string
displayName: Run Specific Test
default: all
values:
- all
- ThroughputUp
- ThroughputDown
- RPS
- HPS
- name: testTypes
type: string
displayName: Test Types
default: Remote,Loopback
values:
- Remote,Loopback
- Remote
- Loopback
- name: protocol
type: string
displayName: Protocol
default: QUIC
values:
- QUIC
- TCPTLS
- name: iterations
type: number
displayName: Force Iterations
default: 0
- name: timeout
type: number
displayName: Timeout (minutes)
default: 45
- name: QTIP
type: boolean
displayName: QTIP
default: false
stages:
#
# Builds
#
- ${{ if eq(parameters.winkernel, true) }}:
- stage: build_winkernel
displayName: Build Windows Kernel
dependsOn: []
variables:
runCodesignValidationInjection: false
jobs:
- template: ./templates/build-config-winkernel.yml
parameters:
arch: ${{ parameters.arch }}
config: Release
- ${{ if or(eq(parameters.winkernel, true), eq(parameters.winuser_schannel, true), eq(parameters.winuser_xdp, true)) }}:
- stage: build_winuser_schannel
displayName: Build Windows (Schannel)
dependsOn: []
variables:
runCodesignValidationInjection: false
jobs:
- template: ./templates/build-config-user.yml
parameters:
image: windows-latest
platform: windows
arch: ${{ parameters.arch }}
tls: schannel
config: Release
extraPrepareArgs: -DisableTest
${{ if eq(parameters.pgo_mode, false) }}:
extraBuildArgs: -DisableTest -DisableTools
${{ if eq(parameters.pgo_mode, true) }}:
extraBuildArgs: -DisableTest -DisableTools -PGO
- ${{ if eq(parameters.winuser_openssl, true) }}:
- stage: build_winuser_openssl
displayName: Build Windows (OpenSSL)
dependsOn: []
variables:
runCodesignValidationInjection: false
jobs:
- template: ./templates/build-config-user.yml
parameters:
image: windows-latest
platform: windows
arch: ${{ parameters.arch }}
tls: openssl
config: Release
extraPrepareArgs: -DisableTest
${{ if eq(parameters.pgo_mode, false) }}:
extraBuildArgs: -DisableTest -DisableTools
${{ if eq(parameters.pgo_mode, true) }}:
extraBuildArgs: -DisableTest -DisableTools -PGO
- ${{ if eq(parameters.winuser_openssl3, true) }}:
- stage: build_winuser_openssl3
displayName: Build Windows (OpenSSL3)
dependsOn: []
variables:
runCodesignValidationInjection: false
jobs:
- template: ./templates/build-config-user.yml
parameters:
image: windows-latest
platform: windows
arch: ${{ parameters.arch }}
tls: openssl3
config: Release
extraPrepareArgs: -DisableTest
${{ if eq(parameters.pgo_mode, false) }}:
extraBuildArgs: -DisableTest -DisableTools
${{ if eq(parameters.pgo_mode, true) }}:
extraBuildArgs: -DisableTest -DisableTools -PGO
- ${{ if eq(parameters.linux_openssl, true) }}:
- stage: build_linux_openssl
displayName: Build Linux (OpenSSL)
dependsOn: []
variables:
runCodesignValidationInjection: false
jobs:
- template: ./templates/build-config-user.yml
parameters:
image: ubuntu-20.04
platform: linux
arch: ${{ parameters.arch }}
tls: openssl
config: Release
extraPrepareArgs: -DisableTest
extraBuildArgs: -DisableTest -DisableTools
- ${{ if eq(parameters.linux_openssl3, true) }}:
- stage: build_linux_openssl3
displayName: Build Linux (OpenSSL3)
dependsOn: []
variables:
runCodesignValidationInjection: false
jobs:
- template: ./templates/build-config-user.yml
parameters:
image: ubuntu-20.04
platform: linux
arch: ${{ parameters.arch }}
tls: openssl3
config: Release
extraPrepareArgs: -DisableTest
extraBuildArgs: -DisableTest -DisableTools
#
# Tests
#
- ${{ if eq(parameters.winkernel, true) }}:
- stage: perf_winkernel
displayName: Performance Testing Windows Kernel
dependsOn:
- build_winkernel
- build_winuser_schannel
jobs:
- template: ./templates/run-performance.yml
parameters:
pool: MsQuic-Win-Perf
platform: windows
localTls: schannel
remoteTls: schannel
iterations: ${{ parameters.iterations }}
arch: ${{ parameters.arch }}
protocol: ${{ parameters.protocol }}
logProfile: ${{ parameters.logging }}
timeout: ${{ parameters.timeout }}
${{ if ne(parameters.testToRun, 'all') }}:
testToRun: ${{ parameters.testToRun }}
kernelMode: -Kernel
extraName: 'Kernel'
testTypes: 'Remote'
${{ if eq(parameters.pgo_mode, true) }}:
extraArgs: -PGO
failOnRegression: 0
- ${{ if eq(parameters.winuser_schannel, true) }}:
- stage: perf_winuser_schannel
displayName: Performance Testing Windows (Schannel)
dependsOn:
- build_winuser_schannel
jobs:
- template: ./templates/run-performance.yml
parameters:
pool: MsQuic-Win-Perf
platform: windows
localTls: schannel
remoteTls: schannel
iterations: ${{ parameters.iterations }}
arch: ${{ parameters.arch }}
protocol: ${{ parameters.protocol }}
logProfile: ${{ parameters.logging }}
timeout: ${{ parameters.timeout }}
${{ if ne(parameters.testToRun, 'all') }}:
testToRun: ${{ parameters.testToRun }}
testTypes: ${{ parameters.testTypes }}
${{ if eq(parameters.pgo_mode, true) }}:
extraArgs: -PGO
failOnRegression: 0
- ${{ if eq(parameters.winuser_xdp, true) }}:
- stage: perf_winuser_xdp
displayName: Performance Testing Windows (XDP)
dependsOn:
- build_winuser_schannel
jobs:
- template: ./templates/run-performance.yml
parameters:
pool: MsQuic-Win-Perf
platform: windows
localTls: schannel
remoteTls: schannel
iterations: ${{ parameters.iterations }}
arch: ${{ parameters.arch }}
protocol: ${{ parameters.protocol }}
logProfile: ${{ parameters.logging }}
timeout: ${{ parameters.timeout }}
${{ if eq(parameters.QTIP, true) }}:
extraTestArgs: -XDP -QTIP
${{ else }}:
extraTestArgs: -XDP
${{ if ne(parameters.testToRun, 'all') }}:
testToRun: ${{ parameters.testToRun }}
testTypes: Remote
${{ if eq(parameters.pgo_mode, false) }}:
extraArgs: -Publish
${{ if eq(parameters.pgo_mode, true) }}:
extraArgs: -PGO
failOnRegression: 0
- ${{ if eq(parameters.winuser_openssl, true) }}:
- stage: perf_winuser_openssl
displayName: Performance Testing Windows (OpenSSL)
dependsOn:
- build_winuser_openssl
jobs:
- template: ./templates/run-performance.yml
parameters:
pool: MsQuic-Win-Perf
platform: windows
localTls: openssl
remoteTls: openssl
iterations: ${{ parameters.iterations }}
arch: ${{ parameters.arch }}
protocol: ${{ parameters.protocol }}
logProfile: ${{ parameters.logging }}
timeout: ${{ parameters.timeout }}
${{ if ne(parameters.testToRun, 'all') }}:
testToRun: ${{ parameters.testToRun }}
testTypes: ${{ parameters.testTypes }}
${{ if eq(parameters.pgo_mode, true) }}:
extraArgs: -PGO
failOnRegression: 0
- ${{ if eq(parameters.winuser_openssl3, true) }}:
- stage: perf_winuser_openssl3
displayName: Performance Testing Windows (OpenSSL3)
dependsOn:
- build_winuser_openssl3
jobs:
- template: ./templates/run-performance.yml
parameters:
pool: MsQuic-Win-Perf
platform: windows
localTls: openssl3
remoteTls: openssl3
iterations: ${{ parameters.iterations }}
arch: ${{ parameters.arch }}
protocol: ${{ parameters.protocol }}
logProfile: ${{ parameters.logging }}
timeout: ${{ parameters.timeout }}
${{ if ne(parameters.testToRun, 'all') }}:
testToRun: ${{ parameters.testToRun }}
testTypes: ${{ parameters.testTypes }}
${{ if eq(parameters.pgo_mode, true) }}:
extraArgs: -PGO
failOnRegression: 0
- ${{ if eq(parameters.linux_openssl, true) }}:
- stage: perf_linux_openssl
displayName: Performance Testing Linux (OpenSSL)
dependsOn:
- build_linux_openssl
jobs:
- template: ./templates/run-performance.yml
parameters:
pool: MsQuic-Linux-Perf
platform: linux
localTls: openssl
remoteTls: openssl
iterations: ${{ parameters.iterations }}
arch: ${{ parameters.arch }}
protocol: ${{ parameters.protocol }}
logProfile: ${{ parameters.logging }}
timeout: ${{ parameters.timeout }}
${{ if ne(parameters.testToRun, 'all') }}:
testToRun: ${{ parameters.testToRun }}
testTypes: ${{ parameters.testTypes }}
${{ if eq(parameters.pgo_mode, true) }}:
extraArgs: -PGO
failOnRegression: 0
- ${{ if eq(parameters.linux_openssl3, true) }}:
- stage: perf_linux_openssl3
displayName: Performance Testing Linux (OpenSSL3)
dependsOn:
- build_linux_openssl3
jobs:
- template: ./templates/run-performance.yml
parameters:
pool: MsQuic-Linux-Perf
platform: linux
localTls: openssl3
remoteTls: openssl3
iterations: ${{ parameters.iterations }}
arch: ${{ parameters.arch }}
protocol: ${{ parameters.protocol }}
logProfile: ${{ parameters.logging }}
timeout: ${{ parameters.timeout }}
${{ if ne(parameters.testToRun, 'all') }}:
testToRun: ${{ parameters.testToRun }}
testTypes: ${{ parameters.testTypes }}
${{ if eq(parameters.pgo_mode, true) }}:
extraArgs: -PGO
failOnRegression: 0
- ${{ if in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI') }}:
- stage: perf_post_process
displayName: Perf Post Processing
condition: succeededOrFailed()
dependsOn:
- perf_winkernel
- perf_winuser_schannel
- perf_winuser_xdp
- perf_winuser_openssl
- perf_winuser_openssl3
- perf_linux_openssl
- perf_linux_openssl3
jobs:
- template: ./templates/post-process-performance.yml