forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.perf-test.yml
200 lines (171 loc) · 6.91 KB
/
azure-pipelines.perf-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
pr:
- master
- website-content
trigger: none
variables:
- group: fabric-variables
- template: .devops/templates/variables.yml
pool: '1ES-Host-Ubuntu'
jobs:
- job: CheckIfPackagesAffected
steps:
- template: .devops/templates/tools.yml
- task: Bash@3
inputs:
filePath: yarn-ci.sh
displayName: yarn
- script: |
NorthstarAffected=$(yarn --silent check:affected-package --packages @fluentui/react-northstar --pr)
V8Affected=$(yarn --silent check:affected-package --packages @fluentui/react --pr)
ReactComponentsAffected=$(yarn --silent check:affected-package --packages @fluentui/react-components --pr)
if [[ $NorthstarAffected == true ]]; then
echo "##vso[task.setvariable variable=NorthstarPackageAffected;isOutput=true]true"
fi
if [[ $V8Affected == true ]]; then
echo "##vso[task.setvariable variable=V8PackageAffected;isOutput=true]true"
fi
if [[ $ReactComponentsAffected == true ]]; then
echo "##vso[task.setvariable variable=ReactComponentsPackageAffected;isOutput=true]true"
fi
name: PackagesAffected
displayName: Check if v8, v9 and/or northstar packages were affected
- job: PerfTestNorthstar
displayName: Perf test for @fluentui/react-northstar
dependsOn: CheckIfPackagesAffected
condition: eq(dependencies.CheckIfPackagesAffected.outputs['PackagesAffected.NorthstarPackageAffected'], true)
workspace:
clean: all
steps:
- template: .devops/templates/tools.yml
- task: Bash@3
inputs:
filePath: yarn-ci.sh
displayName: yarn
- script: |
yarn lage build --to @fluentui/perf-test-northstar --to @fluentui/react-conformance --verbose
condition: eq(variables.isPR, true)
displayName: Build to Perf Test (Northstar)
- script: |
yarn perf:test:base
condition: eq(variables.isPR, false)
workingDirectory: packages/fluentui/perf-test-northstar
displayName: Run Perf Test Base (Northstar)
- script: |
yarn perf:test
condition: eq(variables.isPR, true)
workingDirectory: packages/fluentui/perf-test-northstar
displayName: Run Perf Test (Northstar)
- task: AzureUpload@2
condition: eq(variables.isPR, true)
displayName: Upload Perf Test Result to PR deploy site (Fluent N*)
inputs:
SourcePath: 'packages/fluentui/perf-test-northstar/dist'
azureSubscription: $(azureSubscription)
storage: $(azureStorage)
ContainerName: '$web'
BlobPrefix: '$(deployBasePath)/perf-test-northstar'
- task: GithubPRComment@0
condition: eq(variables.isPR, true)
displayName: 'Post @fluentui/react-northstar Perf Results to Github Pull Request'
inputs:
githubOwner: microsoft
githubRepo: 'fluentui'
blobFilePath: '$(Build.SourcesDirectory)/$(PerfCommentFilePathNorthstar)'
status: '$(PerfCommentStatusNorthstar)'
uniqueId: 'perfComment9424'
- script: |
yarn stats:build
condition: eq(variables.isPR, false)
displayName: Bundle Statistics (master only)
- script: |
yarn perf
condition: eq(variables.isPR, false)
displayName: Performance Tests (master only)
# HEADS UP: also see tag-version-prefix in fluentui-publish.js
- script: |
yarn stats:save --tag=`git tag --points-at HEAD | grep ^@fluentui/react-northstar_v | grep -o 'northstar_v.*'`
condition: eq(variables.isPR, false)
displayName: Save Statistics to DB (master only)
env:
STATS_URI: $(STATS_URI)
- template: .devops/templates/cleanup.yml
- job: PerfTestV8
displayName: Perf test for @fluentui/react
dependsOn: CheckIfPackagesAffected
condition: eq(dependencies.CheckIfPackagesAffected.outputs['PackagesAffected.V8PackageAffected'], true)
workspace:
clean: all
steps:
- template: .devops/templates/tools.yml
- task: Bash@3
inputs:
filePath: yarn-ci.sh
displayName: yarn
- script: |
yarn lage build --to perf-test --verbose
condition: eq(variables.isPR, true)
displayName: Build to Perf Test
- script: |
yarn just perf-test
condition: eq(variables.isPR, true)
workingDirectory: apps/perf-test
displayName: Run Perf Test
- task: AzureUpload@2
condition: eq(variables.isPR, true)
displayName: Upload Perf Test Result to PR deploy site (V8)
inputs:
SourcePath: 'apps/perf-test/dist'
azureSubscription: $(azureSubscription)
storage: $(azureStorage)
ContainerName: '$web'
BlobPrefix: '$(deployBasePath)/perf-test'
- task: GithubPRComment@0
condition: eq(variables.isPR, true)
displayName: 'Post @fluentui/react Perf Results to Github Pull Request'
inputs:
githubOwner: microsoft
githubRepo: 'fluentui'
blobFilePath: '$(Build.SourcesDirectory)/$(PerfCommentFilePath)'
status: '$(PerfCommentStatus)'
uniqueId: 'perfComment9423'
- template: .devops/templates/cleanup.yml
- job: PerfTestReactComponents
displayName: Perf test for @fluentui/react-components
dependsOn: CheckIfPackagesAffected
condition: eq(dependencies.CheckIfPackagesAffected.outputs['PackagesAffected.ReactComponentsPackageAffected'], true)
workspace:
clean: all
steps:
- template: .devops/templates/tools.yml
- task: Bash@3
inputs:
filePath: yarn-ci.sh
displayName: yarn
- script: |
yarn lage build --to perf-test-react-components --verbose
condition: eq(variables.isPR, true)
displayName: Build to Perf Test
- script: |
yarn just perf-test
condition: eq(variables.isPR, true)
workingDirectory: apps/perf-test-react-components
displayName: Run Perf Test
- task: AzureUpload@2
condition: eq(variables.isPR, true)
displayName: Upload Perf Test Result to PR deploy site (React Components)
inputs:
SourcePath: 'apps/perf-test-react-components/dist'
azureSubscription: $(azureSubscription)
storage: $(azureStorage)
ContainerName: '$web'
BlobPrefix: '$(deployBasePath)/perf-test-react-components'
- task: GithubPRComment@0
condition: eq(variables.isPR, true)
displayName: 'Post @fluentui/react-components Perf Results to Github Pull Request'
inputs:
githubOwner: microsoft
githubRepo: 'fluentui'
blobFilePath: '$(Build.SourcesDirectory)/$(PerfCommentFilePathReactComponents)'
status: '$(PerfCommentStatusReactComponents)'
uniqueId: 'perfComment9425'
- template: .devops/templates/cleanup.yml