msquic/.azure/templates/run-performance.yml

101 строка
3.9 KiB
YAML

# This template contains steps to run performance tests for a single configuration.
parameters:
pool: ''
image: ''
platform: ''
config: 'Release'
arch: 'x64'
localTls: ''
remoteTls: ''
extraName: ''
extraArgs: '-Publish'
kernelMode: ''
testTypes: 'Remote,Loopback'
testToRun: ''
timeout: 45
failOnRegression: 1
protocol: 'QUIC'
logProfile: 'None'
extraArtifactDir: ''
extraTestArgs: ''
iterations: 0
jobs:
- job: performance_${{ parameters.platform }}_${{ parameters.arch }}_${{ parameters.localTls }}_${{ parameters.remoteTls }}_${{ parameters.extraName }}
displayName: ${{ parameters.platform }} ${{ parameters.arch }} ${{ parameters.localTls }} ${{ parameters.remoteTls }} ${{ parameters.extraName }}
timeoutInMinutes: 0
${{ if ne(parameters.pool, '') }}:
pool: ${{ parameters.pool }}
workspace:
clean: all
${{ if eq(parameters.pool, '') }}:
pool:
vmImage: ${{ parameters.image }}
variables:
- name: runCodesignValidationInjection
value: false
- name: skipComponentGovernanceDetection
value: true
- group: DeploymentKeys
steps:
- checkout: self
- template: ./download-artifacts.yml
parameters:
platform: ${{ parameters.platform }}
arch: ${{ parameters.arch }}
tls: ${{ parameters.localTls }}
includeKernel: ${{ ne(parameters.kernelMode, '') }}
extraArtifactDir: ${{ parameters.extraArtifactDir }}
- ${{ if ne(parameters.localTls, parameters.remoteTls) }}:
- template: ./download-artifacts.yml
parameters:
platform: ${{ parameters.platform }}
arch: ${{ parameters.arch }}
tls: ${{ parameters.remoteTls }}
includeKernel: ${{ ne(parameters.kernelMode, '') }}
extraArtifactDir: ${{ parameters.extraArtifactDir }}
- task: PowerShell@2
condition: contains('${{ parameters.testTypes }}', 'Remote')
displayName: Run Performance Test
timeoutInMinutes: ${{ parameters.timeout }}
inputs:
pwsh: true
filePath: scripts/performance.ps1
arguments: -Config ${{ parameters.config }} -LocalTls ${{ parameters.localTls }} -RemoteTls ${{ parameters.remoteTls }} -LocalArch ${{ parameters.arch }} -RemoteArch ${{ parameters.arch }} ${{ parameters.kernelMode }} ${{ parameters.extraArgs }} -FailOnRegression ${{ parameters.failOnRegression }} -TestToRun '${{ parameters.testToRun }}' -Protocol ${{ parameters.protocol }} -LogProfile ${{ parameters.logProfile }} -ForceIterations ${{ parameters.iterations }} ${{ parameters.extraTestArgs }}
- task: PowerShell@2
condition: and(contains('${{ parameters.testTypes }}', 'Loopback'), succeededOrFailed())
displayName: Run Performance Test - Loopback
timeoutInMinutes: ${{ parameters.timeout }}
inputs:
pwsh: true
filePath: scripts/performance.ps1
arguments: -Config ${{ parameters.config }} -LocalTls ${{ parameters.localTls }} -RemoteTls ${{ parameters.remoteTls }} -LocalArch ${{ parameters.arch }} -RemoteArch ${{ parameters.arch }} ${{ parameters.kernelMode }} ${{ parameters.extraArgs }} -FailOnRegression ${{ parameters.failOnRegression }} -Local -TestToRun '${{ parameters.testToRun }}' -Protocol ${{ parameters.protocol }} -LogProfile ${{ parameters.logProfile }} -ForceIterations ${{ parameters.iterations }} ${{ parameters.extraTestArgs }}
- task: PowerShell@2
condition: always()
displayName: Clean up machines
timeoutInMinutes: 5
inputs:
pwsh: true
filePath: scripts/cancel-performance.ps1
- task: CopyFiles@2
displayName: Move Performance Results
condition: succeededOrFailed()
inputs:
sourceFolder: artifacts/PerfDataResults
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: Upload Performance Results
condition: succeededOrFailed()
inputs:
artifactName: performance
pathToPublish: $(Build.ArtifactStagingDirectory)
parallel: true