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