-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move perf.yml to eng/common (#25252)
Co-authored-by: Mike Harder <[email protected]>
- Loading branch information
1 parent
da7d0b7
commit d530c44
Showing
1 changed file
with
130 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
parameters: | ||
- name: Variables | ||
type: object | ||
default: [] | ||
- name: OperatingSystems | ||
type: string | ||
default: 'Linux' | ||
- name: Language | ||
type: string | ||
default: '' | ||
- name: InstallLanguageSteps | ||
type: stepList | ||
default: [] | ||
- name: ServiceDirectory | ||
type: string | ||
default: '' | ||
- name: Services | ||
type: string | ||
default: '' | ||
- name: PackageVersions | ||
type: string | ||
default: '.*' | ||
- name: Tests | ||
type: string | ||
default: '.*' | ||
- name: Arguments | ||
type: string | ||
default: '.*' | ||
- name: Iterations | ||
type: number | ||
default: '5' | ||
- name: AdditionalArguments | ||
type: string | ||
default: '' | ||
- name: EnvVars | ||
type: object | ||
default: {} | ||
|
||
resources: | ||
repositories: | ||
- repository: azure-sdk-tools | ||
type: github | ||
endpoint: Azure | ||
name: Azure/azure-sdk-tools | ||
ref: main | ||
|
||
variables: | ||
- ${{ parameters.Variables }} | ||
|
||
jobs: | ||
- job: Perf | ||
timeoutInMinutes: 360 | ||
strategy: | ||
matrix: | ||
${{ if contains(parameters.OperatingSystems, 'Linux') }}: | ||
Linux: | ||
Pool: 'azsdk-pool-mms-ubuntu-2004-perf' | ||
OsVmImage: 'MMSUbuntu20.04' | ||
MatrixName: 'Linux' | ||
${{ if contains(parameters.OperatingSystems, 'Windows') }}: | ||
Windows: | ||
Pool: 'azsdk-pool-mms-win-2019-perf' | ||
OsVmImage: 'MMS2019' | ||
MatrixName: 'Windows' | ||
pool: | ||
name: $(Pool) | ||
vmImage: $(OSVmImage) | ||
steps: | ||
- checkout: self | ||
path: s | ||
|
||
- checkout: azure-sdk-tools | ||
path: s/azure-sdk-tools | ||
|
||
- template: /eng/common/pipelines/templates/steps/verify-agent-os.yml | ||
parameters: | ||
AgentImage: $(OSVmImage) | ||
|
||
- ${{ parameters.InstallLanguageSteps }} | ||
|
||
- template: /eng/common/TestResources/deploy-test-resources.yml | ||
parameters: | ||
ServiceDirectory: ${{ parameters.ServiceDirectory }} | ||
Location: westus | ||
ResourceType: perf | ||
|
||
- pwsh: | | ||
set-content -path config.yml -value "WorkingDirectories:" | ||
add-content -path config.yml -value " ${{ parameters.Language }}: $(Agent.BuildDirectory)/s" | ||
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation | ||
displayName: Create config.yml | ||
- script: >- | ||
dotnet run -- run | ||
--no-sync | ||
--languages ${{ parameters.Language }} | ||
--services "${{ parameters.Services }}" | ||
--package-versions "${{ parameters.PackageVersions }}" | ||
--tests "${{ parameters.Tests }}" | ||
--arguments "${{ parameters.Arguments }}" | ||
--iterations ${{ parameters.Iterations }} | ||
${{ parameters.AdditionalArguments }} | ||
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation | ||
env: | ||
${{ each var in parameters.EnvVars }}: | ||
${{ var.key }}: ${{ var.value }} | ||
displayName: Run perf tests | ||
- pwsh: | | ||
get-content results.csv | ||
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results | ||
displayName: Print results.csv | ||
condition: always() | ||
- pwsh: | | ||
get-content results.json | ||
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results | ||
displayName: Print results.json | ||
condition: always() | ||
- task: PublishPipelineArtifact@1 | ||
inputs: | ||
targetPath: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation/results | ||
artifactName: results-$(MatrixName) | ||
condition: always() | ||
|
||
- template: /eng/common/TestResources/remove-test-resources.yml | ||
parameters: | ||
ServiceDirectory: ${{ parameters.ServiceDirectory }} | ||
ResourceType: perf |