[master] Update dependencies from dotnet/corefx (#25564)
[platform/upstream/coreclr.git] / azure-pipelines.yml
1 variables:
2 - name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
3   value: true
4
5 trigger:
6 - master
7
8 pr:
9 - master
10
11 jobs:
12
13 ##   The following is the matrix of test runs that we have. This is
14 ##   duplicated for each os/arch combination in platform-matrix.yml.
15
16 ##
17 ##   Product build       Test build              Test run
18 ##   (Azure DevOps)      (Azure DevOps)          (helix)
19 ##
20 ##   ###########################################################################################
21 ##
22 ##   Debug
23 ##
24 ##   Checked ----------> Pri0 -----------------> plain runtests
25 ##           |
26 ##           \---------> Pri1 -----------------> plain runtests
27 ##           |                \----------------> jitstress
28 ##           |                \----------------> gcstress
29 ##           |                \----------------> runincontext
30 ##           |                \----------------> maybe more (dynamically selected runtest modes)
31 ##           |
32 ##           \---------> Pri1 crossgen --------> plain runtests
33 ##                                     \-------> jitstress
34 ##                                     \-------> gcstress
35 ##                                     \-------> maybe more (dynamically selected runtest modes)
36 ##
37 ##   Release ----------> Pri1 -----------------> plain runtests
38 ##           |
39 ##           \---------> Pri1 crossgen --------> plain runtests
40 ##
41 ##
42
43 ## Each build or test job is defined in Azure DevOps, and will show
44 ## up in the UI in the order in which they are defined here. The
45 ## build and test build job matrix is defined statically, but
46 ## queue-time inputs can be used to control whether a job executes
47 ## (used to select which jobs run in ci vs for official builds), or
48 ## to select test modes. This should eventually be used to enable
49 ## requesting specific test runs from pull requests.
50
51
52 ##
53 ## Templates used to define jobs:
54 ## Please update this if the factoring changes.
55 ##
56 ## This file defines the set of jobs in a platform-agnostic manner,
57 ## using the platform-matrix.yml template. This will create one job
58 ## for each platform from the passed-in jobTemplate (either a build
59 ## job or a test job). The build-job.yml and test-job.yml templates
60 ## use xplat-job.yml to handle some of the common logic for
61 ## abstracting over platforms. Finally, xplat-job.yml uses the arcade
62 ## base.yml job template, which sets up telemetry and signing support.
63
64 ## azure-pipelines.yml -> platform-matrix.yml -------> build-job.yml -------> xplat-job.yml -> base.yml
65 ##                                            |  (passed-in jobTemplate)  |                    (arcade)
66 ##                                            \------> test-job.yml ------/
67 ##                                            \------> format-job.yml ----/
68
69 # TODO: simplify logic surrounding official build/ci. See
70 # https://github.com/Microsoft/azure-pipelines-yaml/pull/46 for more information
71
72 #
73 # Debug builds
74 #
75 - ${{ if eq(variables['System.TeamProject'], 'public') }}:
76   - template: eng/platform-matrix.yml
77     parameters:
78       jobTemplate: build-job.yml
79       buildConfig: debug
80       ${{ if and(eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.DefinitionName'], 'coreclr-ci')) }}:
81         platforms:
82         - Windows_NT_x64
83         - Windows_NT_x86
84       ${{ if and(in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'), eq(variables['Build.DefinitionName'], 'coreclr-ci')) }}:
85         platforms:
86         - Linux_arm
87         - Linux_arm64
88         - Linux_musl_arm64
89         - Linux_musl_x64
90         - Linux_rhel6_x64
91         - Linux_x64
92         - OSX_x64
93         - Windows_NT_arm
94         - Windows_NT_arm64
95
96 #
97 # Checked builds
98 #
99 - ${{ if eq(variables['System.TeamProject'], 'public') }}:
100   - template: eng/platform-matrix.yml
101     parameters:
102       jobTemplate: build-job.yml
103       buildConfig: checked
104       ${{ if and(eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.DefinitionName'], 'coreclr-ci')) }}:
105         platforms:
106         - Linux_arm
107         - Linux_arm64
108         - Linux_musl_x64
109         - Linux_x64
110         - OSX_x64
111         - Windows_NT_arm
112         - Windows_NT_arm64
113         - Windows_NT_x64
114         - Windows_NT_x86
115       ${{ if and(in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'), eq(variables['Build.DefinitionName'], 'coreclr-ci')) }}:
116         platformGroup: all
117       ${{ if eq(variables['Build.DefinitionName'], 'coreclr-outerloop') }}:
118         platformGroup: all
119
120 #
121 # Release builds
122 #
123 - ${{ if eq(variables['System.TeamProject'], 'public') }}:
124   - template: eng/platform-matrix.yml
125     parameters:
126       jobTemplate: build-job.yml
127       buildConfig: release
128       ${{ if and(eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.DefinitionName'], 'coreclr-ci')) }}:
129         platforms:
130         - Linux_arm64
131         - Linux_musl_x64
132         - Linux_rhel6_x64
133         - Windows_NT_arm
134         - Windows_NT_arm64
135         - Windows_NT_x64
136       ${{ if and(in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'), eq(variables['Build.DefinitionName'], 'coreclr-ci')) }}:
137         platforms:
138         - Linux_arm
139         - Linux_musl_arm64
140         - Linux_x64
141         - OSX_x64
142         - Windows_NT_x86
143
144 - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
145   - template: eng/platform-matrix.yml
146     parameters:
147       jobTemplate: build-job.yml
148       buildConfig: release
149       platformGroup: all
150       jobParameters:
151         # Publishing packages to blob feeds sometimes takes a long time
152         # due to waiting for an exclusive lock on the feed.
153         # See https://github.com/dotnet/arcade/blob/master/Documentation/CorePackages/AsyncPublishing.md
154         timeoutInMinutes: 120
155
156 #
157 # Checked test builds
158 #
159 # The test jobs that can be triggered by a PR, manually from ADO and that are scheduled
160 - ${{ if and(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest', 'Manual', 'Schedule')) }}:
161   - template: eng/platform-matrix.yml
162     parameters:
163       jobTemplate: test-job.yml
164       buildConfig: checked
165       ${{ if and(eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.DefinitionName'], 'coreclr-ci')) }}:
166         platforms:
167         - Linux_arm
168         - Linux_arm64
169         - Linux_musl_x64
170         - Linux_x64
171         - OSX_x64
172         - Windows_NT_arm
173         - Windows_NT_arm64
174         - Windows_NT_x64
175         - Windows_NT_x86
176         helixQueueGroup: pr
177       ${{ if eq(variables['Build.DefinitionName'], 'coreclr-outerloop') }}:
178         platformGroup: all
179         helixQueueGroup: all
180       jobParameters:
181         ${{ if eq(variables['Build.DefinitionName'], 'coreclr-ci') }}:
182           testGroup: innerloop
183         ${{ if eq(variables['Build.DefinitionName'], 'coreclr-outerloop') }}:
184           testGroup: outerloop
185         
186 # ReadyToRun test jobs that are triggered by default from a PR.
187
188 - ${{ if eq(variables['System.TeamProject'], 'public') }}:
189   - template: eng/platform-matrix.yml
190     parameters:
191       jobTemplate: test-job.yml
192       buildConfig: checked
193       ${{ if and(eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.DefinitionName'], 'coreclr-ci')) }}:
194         platforms:
195         - Linux_x64
196         - OSX_x64
197         - Windows_NT_x64
198         - Windows_NT_x86
199         helixQueueGroup: pr
200       jobParameters:
201         ${{ if eq(variables['Build.DefinitionName'], 'coreclr-ci') }}:
202           testGroup: innerloop
203         readyToRun: true
204         displayNameArgs: R2R
205
206 #
207 # CoreFX test runs against CoreCLR
208 #
209
210 - ${{ if eq(variables['System.TeamProject'], 'public') }}:
211   - template: eng/platform-matrix.yml
212     parameters:
213       jobTemplate: test-job.yml
214       buildConfig: checked
215       ${{ if and(eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.DefinitionName'], 'coreclr-ci')) }}:
216         platforms:
217         - Linux_x64
218         - Windows_NT_x64
219       helixQueueGroup: corefx
220       jobParameters:
221         ${{ if eq(variables['Build.DefinitionName'], 'coreclr-ci') }}:
222           testGroup: innerloop
223         corefxTests: true
224         displayNameArgs: CoreFX
225
226 # CI (merge) jobs
227
228 - ${{ if and(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'), eq(variables['Build.DefinitionName'], 'coreclr-ci')) }}:
229   - template: eng/platform-matrix.yml
230     parameters:
231       jobTemplate: test-job.yml
232       buildConfig: checked
233       platformGroup: all
234       helixQueueGroup: ci
235       jobParameters:
236         testGroup: outerloop
237
238   - template: eng/platform-matrix.yml
239     parameters:
240       jobTemplate: test-job.yml
241       buildConfig: checked
242       platforms:
243       - Linux_arm64
244       - Linux_musl_x64
245       - Linux_musl_arm64
246       - Linux_rhel6_x64
247       - Linux_x64
248       - OSX_x64
249       - Windows_NT_x64
250       - Windows_NT_x86
251       - Windows_NT_arm
252       - Windows_NT_arm64
253       helixQueueGroup: ci
254       jobParameters:
255         testGroup: outerloop
256         readyToRun: true
257         displayNameArgs: R2R
258
259 #
260 # Release test builds
261 #
262
263 # Pull-Request test
264 - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.DefinitionName'], 'coreclr-ci')) }}:
265   - template: eng/platform-matrix.yml
266     parameters:
267       jobTemplate: test-job.yml
268       buildConfig: release
269       platforms:
270       - Linux_musl_x64
271       helixQueueGroup: pr
272       jobParameters:
273         testGroup: innerloop
274
275 # Official test
276 - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
277   - template: eng/platform-matrix.yml
278     parameters:
279       jobTemplate: test-job.yml
280       buildConfig: release
281       platformGroup: all
282       helixQueueGroup: all
283       jobParameters:
284         testGroup: outerloop
285
286   - template: eng/platform-matrix.yml
287     parameters:
288       jobTemplate: test-job.yml
289       buildConfig: release
290       platformGroup: all
291       helixQueueGroup: all
292       jobParameters:
293         testGroup: outerloop
294         readyToRun: true
295         displayNameArgs: R2R
296
297 # Format
298 - ${{ if and(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest', 'IndividualCI', 'BatchedCI'), eq(variables['Build.DefinitionName'], 'coreclr-ci')) }}:
299   - template: eng/platform-matrix.yml
300     parameters:
301       jobTemplate: format-job.yml
302       platforms:
303       - Linux_x64
304       - Windows_NT_x64
305
306 # Publish build information to Build Assets Registry
307
308 # This job gathers build assets from the pipeline (from each official
309 # product build job), and publishes them to the build assets
310 # registry. Its dependencies should be updated to include all of the
311 # official builds if we add more platform/arch combinations.
312
313 - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
314   - template: /eng/finalize-publish.yml
315     parameters:
316       dependsOn:
317       - build_Linux_arm_release
318       - build_Linux_arm64_release
319       - build_Linux_musl_x64_release
320       - build_Linux_musl_arm64_release
321       - build_Linux_rhel6_x64_release
322       - build_Linux_x64_release
323       - build_OSX_x64_release
324       - build_Windows_NT_x64_release
325       - build_Windows_NT_x86_release
326       - build_Windows_NT_arm_release
327       - build_Windows_NT_arm64_release