forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.bundlesize.yml
180 lines (145 loc) · 5.73 KB
/
azure-pipelines.bundlesize.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
pr:
- master
trigger:
- master
variables:
- template: .devops/templates/variables.yml
jobs:
- job: build_react
workspace:
clean: all
timeoutInMinutes: 75
pool: 'Self Host Ubuntu'
steps:
- template: .devops/templates/tools.yml
- task: Bash@3
inputs:
filePath: yarn-ci.sh
displayName: yarn
- script: yarn build --to @fluentui/react @fluentui/keyboard-key --no-cache
displayName: yarn build to @fluentui/react
- script: yarn workspace test-bundles bundle:size
displayName: yarn bundle test-bundles
env:
PACKAGE: '@fluentui/react'
- script: yarn bundlesizecollect
displayName: 'Collate Bundle Size Information'
- task: PublishBuildArtifacts@1
displayName: 'Publish Bundle Size information to Azure Dev Ops Artifacts'
inputs:
PathtoPublish: 'apps/test-bundles/dist/bundlesize.json'
ArtifactName: bundlesize-react
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact dist folder upon build for debug'
inputs:
PathtoPublish: 'apps/test-bundles/dist'
ArtifactName: distdrop-react
- template: .devops/templates/cleanup.yml
- job: build_converged
workspace:
clean: all
timeoutInMinutes: 75
pool: 'Self Host Ubuntu'
steps:
- template: .devops/templates/tools.yml
- task: Bash@3
inputs:
filePath: yarn-ci.sh
displayName: yarn
- script: yarn build --to @fluentui/react-components --no-cache
displayName: yarn build to @fluentui/react-components
- script: yarn workspace test-bundles bundle:size
displayName: yarn bundle test-bundles
env:
PACKAGE: '@fluentui/react-components'
- script: yarn bundlesizecollect
displayName: 'Collate Bundle Size Information'
- task: PublishBuildArtifacts@1
displayName: 'Publish Bundle Size information to Azure Dev Ops Artifacts'
inputs:
PathtoPublish: 'apps/test-bundles/dist/bundlesize.json'
ArtifactName: bundlesize-converged
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact dist folder upon build for debug'
inputs:
PathtoPublish: 'apps/test-bundles/dist'
ArtifactName: distdrop-converged
- template: .devops/templates/cleanup.yml
- job: build_northstar
workspace:
clean: all
timeoutInMinutes: 75
pool: 'Self Host Ubuntu'
steps:
- template: .devops/templates/tools.yml
- task: Bash@3
inputs:
filePath: yarn-ci.sh
displayName: yarn
- script: yarn build --to @fluentui/react-northstar --no-cache
displayName: yarn build to @fluentui/react-northstar
- script: yarn workspace test-bundles bundle:size
displayName: yarn bundle test-bundles
env:
PACKAGE: '@fluentui/react-northstar'
- script: yarn bundlesizecollect
displayName: 'Collate Bundle Size Information'
- task: PublishBuildArtifacts@1
displayName: 'Publish Bundle Size information to Azure Dev Ops Artifacts'
inputs:
PathtoPublish: 'apps/test-bundles/dist/bundlesize.json'
ArtifactName: bundlesize-northstar
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact dist folder upon build for debug'
inputs:
PathtoPublish: 'apps/test-bundles/dist'
ArtifactName: distdrop-northstar
- template: .devops/templates/cleanup.yml
- job: merge
pool:
vmImage: 'windows-2019'
dependsOn:
- build_northstar
- build_converged
- build_react
steps:
- checkout: none
- task: DownloadPipelineArtifact@2
displayName: 'Download Pipeline Artifact: @fluentui/react'
inputs:
artifactName: 'bundlesize-react'
targetPath: '$(Build.ArtifactStagingDirectory)/react'
- task: DownloadPipelineArtifact@2
displayName: 'Download Pipeline Artifact: @fluentui/react-components'
inputs:
artifactName: 'bundlesize-converged'
targetPath: '$(Build.ArtifactStagingDirectory)/react-converged'
- task: DownloadPipelineArtifact@2
displayName: 'Download Pipeline Artifact: @fluentui/react-northstar'
inputs:
artifactName: 'bundlesize-northstar'
targetPath: '$(Build.ArtifactStagingDirectory)/react-northstar'
- script: 'chocolatey install jq'
displayName: 'Install jq'
- script: jq -c -s "reduce .[] as $item ({}; . * $item)" $(Build.ArtifactStagingDirectory)/react-converged/bundlesize.json $(Build.ArtifactStagingDirectory)/react-northstar/bundlesize.json $(Build.ArtifactStagingDirectory)/react/bundlesize.json > $(Build.ArtifactStagingDirectory)/bundlesizes.json
displayName: 'Merge @fluentui/react, @fluentui/react-components & @fluentui/react-northstar to bundlesizes.json'
- task: PublishBuildArtifacts@1
displayName: 'Publish Merged Bundle Size information'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/bundlesizes.json'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact dist folder upon build for debug'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: distdrop
- job: lightrail
pool: server
dependsOn:
- merge
steps:
- task: odefun.odsp-lightrail-tasks-partner.odsp-lightrail-tasks-SizeAuditorWorker.SizeAuditorWorker@0
displayName: 'Size Auditor Check on LightRail'
inputs:
connectedServiceName: lowimpact
sourceVersionMessage: '$(Build.SourceVersionMessage)'
sourceRepositoryUrl: 'https://github.com/microsoft/fluentui'