Publish version to dotnet/versions
[platform/upstream/coreclr.git] / azure-pipelines.yml
1
2 # Temporarily set a build number format that includes a large revision
3 # number that won't conflict with buildpipeline official builds.
4 name: $(Date:yyyyMMdd)$(Rev:.7r)
5
6 variables:
7   DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
8
9 resources:
10   containers:
11   - container: ubuntu_1404_arm_cross_build_image
12     image: microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-e435274-20180426002420
13
14   - container: ubuntu_1604_arm64_cross_build_image
15     image: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-cross-arm64-a3ae44b-20180315221921
16
17   - container: musl_x64_build_image
18     image: microsoft/dotnet-buildtools-prereqs:alpine-3.6-WithNode-f4d3fe3-20181220200247
19
20   - container: musl_arm64_build_image
21     image: microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-cross-arm64-alpine10fcdcf-20190208200917
22
23   - container: centos7_x64_build_image
24     image: microsoft/dotnet-buildtools-prereqs:centos-7-d485f41-20173404063424
25
26   - container: centos6_x64_build_image
27     image: microsoft/dotnet-buildtools-prereqs:centos-6-376e1a3-20174311014331
28
29 trigger:
30 - master
31
32 pr:
33 - master
34
35 jobs:
36
37 ##   The following is the matrix of test runs that we have. This is
38 ##   duplicated for each os/arch combination in platform-matrix.yml.
39
40 ##
41 ##   Product build       Test build              Test run
42 ##   (Azure DevOps)      (Azure DevOps)          (helix)
43 ##
44 ##   ###########################################################################################
45 ##
46 ##   Debug
47 ##
48 ##   Checked ----------> Pri0 -----------------> plain runtests
49 ##           |
50 ##           \---------> Pri1 -----------------> plain runtests
51 ##           |                \----------------> jitstress
52 ##           |                \----------------> gcstress
53 ##           |                \----------------> maybe more (dynamically selected runtest modes)
54 ##           |
55 ##           \---------> Pri1 crossgen --------> plain runtests
56 ##                                     \-------> jitstress
57 ##                                     \-------> gcstress
58 ##                                     \-------> maybe more (dynamically selected runtest modes)
59 ##
60 ##   Release ----------> Pri1 -----------------> plain runtests
61 ##           |
62 ##           \---------> Pri1 crossgen --------> plain runtests
63 ##
64 ##
65
66 ## Each build or test job is defined in Azure DevOps, and will show
67 ## up in the UI in the order in which they are defined here. The
68 ## build and test build job matrix is defined statically, but
69 ## queue-time inputs can be used to control whether a job executes
70 ## (used to select which jobs run in ci vs for official builds), or
71 ## to select test modes. This should eventually be used to enable
72 ## requesting specific test runs from pull requests.
73
74
75 ##
76 ## Templates used to define jobs:
77 ## Please update this if the factoring changes.
78 ##
79 ## This file defines the set of jobs in a platform-agnostic manner,
80 ## using the platform-matrix.yml template. This will create one job
81 ## for each platform from the passed-in jobTemplate (either a build
82 ## job or a test job). The build-job.yml and test-job.yml templates
83 ## use xplat-job.yml to handle some of the common logic for
84 ## abstracting over platforms. Finally, xplat-job.yml uses the arcade
85 ## base.yml job template, which sets up telemetry and signing support.
86
87 ## azure-pipelines.yml -> platform-matrix.yml -------> build-job.yml -------> xplat-job.yml -> base.yml
88 ##                                            |  (passed-in jobTemplate)  |                    (arcade)
89 ##                                            \------> test-job.yml ------/
90
91 # TODO: simplify logic surrounding official build/ci. See
92 # https://github.com/Microsoft/azure-pipelines-yaml/pull/46 for more information
93
94 #
95 # Debug build (Pull Request)
96 #
97 - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.DefinitionName'], 'coreclr-ci')) }}:
98   - template: eng/platform-matrix.yml
99     parameters:
100       jobTemplate: build-job.yml
101       buildConfig: debug
102
103 #
104 # Checked build
105 #
106 - ${{ if eq(variables['System.TeamProject'], 'public') }}:
107   - template: eng/platform-matrix.yml
108     parameters:
109       jobTemplate: build-job.yml
110       buildConfig: checked
111
112 #
113 # Release build (Pull Request)
114 #
115 - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.DefinitionName'], 'coreclr-ci')) }}:
116   - template: eng/platform-matrix.yml
117     parameters:
118       jobTemplate: build-job.yml
119       buildConfig: release
120
121 #
122 # Release build (Official Build)
123 #
124 - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
125   - template: eng/platform-matrix.yml
126     parameters:
127       jobTemplate: build-job.yml
128       buildConfig: release
129       jobParameters:
130         # Publishing packages to blob feeds sometimes takes a long time
131         # due to waiting for an exclusive lock on the feed.
132         # See https://github.com/dotnet/arcade/blob/master/Documentation/CorePackages/AsyncPublishing.md
133         timeoutInMinutes: 120
134
135 #
136 # Checked test builds
137 #
138
139 # Pri0 (Pull Request)
140 - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.DefinitionName'], 'coreclr-ci')) }}:
141   - template: eng/platform-matrix.yml
142     parameters:
143       jobTemplate: test-job.yml
144       buildConfig: checked
145       jobParameters:
146         priority: 0
147         scenarios:
148           asString: 'normal,no_tiered_compilation'
149           asArray:
150           - normal
151           - no_tiered_compilation
152         # "Total" includes building tests, waiting for a queue in Helix to become available, and running the tests.
153         # In case test-job.yml gets split into two separate jobs (e.g. build-test-job.yml and run-test.yml)
154         # this number should be adjusted accordingly.
155         timeoutTotalInMinutes: 240
156         # "PerCollection" is time needed for the "biggest" xUnit test collection to complete.
157         # In case xUnit test wrappers get refactored this number should also be adjusted.
158         timeoutPerTestCollectionInMinutes: 30
159         # "PerTest" corresponds to individual test running time (i.e. __TestTimeout).
160         timeoutPerTestInMinutes: 10
161
162 # Pri1 (Pull Request, Outerloop)
163 - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.DefinitionName'], 'coreclr-outerloop')) }}:
164   - template: eng/platform-matrix.yml
165     parameters:
166       jobTemplate: test-job.yml
167       buildConfig: checked
168       jobParameters:
169         priority: 1
170         scenarios:
171           asString: 'normal,no_tiered_compilation'
172           asArray:
173           - normal
174           - no_tiered_compilation
175         timeoutTotalInMinutes: 360
176         timeoutPerTestCollectionInMinutes: 60
177         timeoutPerTestInMinutes: 10
178
179 # Pri1 (CI)
180 - ${{ if and(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI')) }}:
181   - template: eng/platform-matrix.yml
182     parameters:
183       jobTemplate: test-job.yml
184       buildConfig: checked
185       jobParameters:
186         priority: 1
187         scenarios:
188           asString: 'normal,no_tiered_compilation'
189           asArray:
190           - normal
191           - no_tiered_compilation
192         timeoutTotalInMinutes: 360
193         timeoutPerTestCollectionInMinutes: 60
194         timeoutPerTestInMinutes: 10
195
196 # Pri1 ReadyToRun (CI)
197 - ${{ if and(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI')) }}:
198   - template: eng/platform-matrix.yml
199     parameters:
200       jobTemplate: test-job.yml
201       buildConfig: checked
202       jobParameters:
203         priority: 1
204         readyToRun: true
205         scenarios:
206           asString: 'normal,no_tiered_compilation'
207           asArray:
208           - normal
209           - no_tiered_compilation
210         timeoutTotalInMinutes: 360
211         timeoutPerTestCollectionInMinutes: 60
212         timeoutPerTestInMinutes: 10
213
214 # Pri1 (Schedule, Manual)
215 - ${{ if and(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'Schedule', 'Manual')) }}:
216   - template: eng/platform-matrix.yml
217     parameters:
218       jobTemplate: test-job.yml
219       buildConfig: checked
220       jobParameters:
221         priority: 1
222         scenarios:
223           asString: 'normal,no_tiered_compilation,jitstress1,jitstress2,jitstress1_tiered,jitstress2_tiered,jitstressregs1,jitstressregs2,jitstressregs3,jitstressregs4,jitstressregs8,jitstressregs0x10,jitstressregs0x80,jitstressregs0x1000,jitminopts'
224           asArray:
225           - normal
226           - no_tiered_compilation
227           - jitstress1
228           - jitstress2
229           - jitstress1_tiered
230           - jitstress2_tiered
231           - jitstressregs1
232           - jitstressregs2
233           - jitstressregs3
234           - jitstressregs4
235           - jitstressregs8
236           - jitstressregs0x10
237           - jitstressregs0x80
238           - jitstressregs0x1000
239           - jitminopts
240         timeoutTotalInMinutes: 480
241         # TODO: Adjust this number as soon as we have more data on how long it takes to run these jobs in Helix.
242         timeoutPerTestCollectionInMinutes: 120
243         timeoutPerTestInMinutes: 30
244
245
246 #
247 # Release test builds
248 #
249
250 # Pri1 (Official Build)
251 - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
252   - template: eng/platform-matrix.yml
253     parameters:
254       jobTemplate: test-job.yml
255       buildConfig: release
256       jobParameters:
257         priority: 1
258         scenarios:
259           asString: 'normal,no_tiered_compilation'
260           asArray:
261           - normal
262           - no_tiered_compilation
263         timeoutTotalInMinutes: 360
264         timeoutPerTestCollectionInMinutes: 60
265         timeoutPerTestInMinutes: 10
266
267 # Pri1 ReadyToRun (Official Build)
268 - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
269   - template: eng/platform-matrix.yml
270     parameters:
271       jobTemplate: test-job.yml
272       buildConfig: release
273       jobParameters:
274         priority: 1
275         readyToRun: true
276         scenarios:
277           asString: 'normal,no_tiered_compilation'
278           asArray:
279           - normal
280           - no_tiered_compilation
281         timeoutTotalInMinutes: 360
282         timeoutPerTestCollectionInMinutes: 60
283         timeoutPerTestInMinutes: 10
284
285
286 # Publish build information to Build Assets Registry
287
288 # This job gathers build assets from the pipeline (from each official
289 # product build job), and publishes them to the build assets
290 # registry. Its dependencies should be updated to include all of the
291 # official builds if we add more platform/arch combinations.
292
293 - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
294   - template: /eng/finalize-publish.yml
295     parameters:
296       dependsOn:
297       - build_Linux_arm_release
298       - build_Linux_arm64_release
299       - build_Linux_musl_x64_release
300       - build_Linux_musl_arm64_release
301       - build_Linux_rhel6_x64_release
302       - build_Linux_x64_release
303       - build_OSX_x64_release
304       - build_Windows_NT_x64_release
305       - build_Windows_NT_x86_release
306       - build_Windows_NT_arm_release
307       - build_Windows_NT_arm64_release