Debian Codegraph @

external/linker/eng/common/templates/job/performance.yml

raw
1 parameters:
2 steps: [] # optional -- any additional steps that need to happen before pulling down the performance repo and sending the performance benchmarks to helix (ie building your repo)
3 variables: [] # optional -- list of additional variables to send to the template
4 jobName: '' # required -- job name
5 displayName: '' # optional -- display name for the job. Will use jobName if not passed
6 pool: '' # required -- name of the Build pool
7 container: '' # required -- name of the container
8 osGroup: '' # required -- operating system for the job
9 extraSetupParameters: '' # optional -- extra arguments to pass to the setup script
10 frameworks: ['netcoreapp3.0'] # optional -- list of frameworks to run against
11 continueOnError: 'false' # optional -- determines whether to continue the build if the step errors
12 dependsOn: '' # optional -- dependencies of the job
13 timeoutInMinutes: 320 # optional -- timeout for the job
14 enableTelemetry: false # optional -- enable for telemetry
15
16 jobs:
17 - template: ../jobs/jobs.yml
18 parameters:
19 dependsOn: ${{ parameters.dependsOn }}
20 enableTelemetry: ${{ parameters.enableTelemetry }}
21 enablePublishBuildArtifacts: true
22 continueOnError: ${{ parameters.continueOnError }}
23
24 jobs:
25 - job: '${{ parameters.jobName }}'
26
27 ${{ if ne(parameters.displayName, '') }}:
28 displayName: '${{ parameters.displayName }}'
29 ${{ if eq(parameters.displayName, '') }}:
30 displayName: '${{ parameters.jobName }}'
31
32 timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
33
34 variables:
35
36 - ${{ each variable in parameters.variables }}:
37 - ${{ if ne(variable.name, '') }}:
38 - name: ${{ variable.name }}
39 value: ${{ variable.value }}
40 - ${{ if ne(variable.group, '') }}:
41 - group: ${{ variable.group }}
42
43 - IsInternal: ''
44 - HelixApiAccessToken: ''
45 - HelixPreCommand: ''
46
47 - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
48 - ${{ if eq( parameters.osGroup, 'Windows_NT') }}:
49 - HelixPreCommand: 'set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
50 - IsInternal: -Internal
51 - ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
52 - HelixPreCommand: 'export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
53 - IsInternal: --internal
54
55 - group: DotNet-HelixApi-Access
56 - group: dotnet-benchview
57
58 workspace:
59 clean: all
60 pool:
61 ${{ parameters.pool }}
62 container: ${{ parameters.container }}
63 strategy:
64 matrix:
65 ${{ each framework in parameters.frameworks }}:
66 ${{ framework }}:
67 _Framework: ${{ framework }}
68 steps:
69 - checkout: self
70 clean: true
71 # Run all of the steps to setup repo
72 - ${{ each step in parameters.steps }}:
73 - ${{ step }}
74 - powershell: $(Build.SourcesDirectory)\eng\common\performance\performance-setup.ps1 $(IsInternal) -Framework $(_Framework) ${{ parameters.extraSetupParameters }}
75 displayName: Performance Setup (Windows)
76 condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))
77 continueOnError: ${{ parameters.continueOnError }}
78 - script: $(Build.SourcesDirectory)/eng/common/performance/performance-setup.sh $(IsInternal) --framework $(_Framework) ${{ parameters.extraSetupParameters }}
79 displayName: Performance Setup (Unix)
80 condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
81 continueOnError: ${{ parameters.continueOnError }}
82 - script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments)
83 displayName: Run ci setup script
84 # Run perf testing in helix
85 - template: /eng/common/templates/steps/perf-send-to-helix.yml
86 parameters:
87 HelixSource: '$(HelixSourcePrefix)/$(Build.Repository.Name)/$(Build.SourceBranch)' # sources must start with pr/, official/, prodcon/, or agent/
88 HelixType: 'test/performance/$(Kind)/$(_Framework)/$(Architecture)'
89 HelixAccessToken: $(HelixApiAccessToken)
90 HelixTargetQueues: $(Queue)
91 HelixPreCommands: $(HelixPreCommand)
92 Creator: $(Creator)
93 WorkItemTimeout: 4:00 # 4 hours
94 WorkItemDirectory: '$(WorkItemDirectory)' # WorkItemDirectory can not be empty, so we send it some docs to keep it happy
95 CorrelationPayloadDirectory: '$(PayloadDirectory)' # it gets checked out to a folder with shorter path than WorkItemDirectory so we can avoid file name too long exceptions