Skip to content

Commit a246c1d

Browse files
authored
[main] Add -pr version of pipeline (#18922)
2 parents 360eff1 + d370cce commit a246c1d

File tree

1 file changed

+361
-0
lines changed

1 file changed

+361
-0
lines changed

.vsts-pr.yml

Lines changed: 361 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,361 @@
1+
trigger:
2+
batch: true
3+
branches:
4+
include:
5+
- main
6+
- master
7+
- release/*
8+
- internal/release/*
9+
10+
variables:
11+
- name: _PublishUsingPipelines
12+
value: false
13+
- ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}:
14+
- name: PostBuildSign
15+
value: false
16+
- ${{ else }}:
17+
- name: PostBuildSign
18+
value: true
19+
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
20+
- name: Codeql.Enabled
21+
value: true
22+
- group: DotNet-DotNetCli-Storage
23+
- group: DotNet-Installer-SDLValidation-Params
24+
- name: _PublishUsingPipelines
25+
value: true
26+
27+
- name: _InternalRuntimeDownloadArgs
28+
value: ''
29+
30+
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
31+
- group: DotNetBuilds storage account read tokens
32+
- name: _InternalRuntimeDownloadArgs
33+
value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal
34+
/p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
35+
/p:dotnetbuilds-internal-container-read-token-base64=$(dotnetbuilds-internal-container-read-token-base64)
36+
37+
- template: /eng/common/templates/variables/pool-providers.yml
38+
39+
stages:
40+
- stage: Build
41+
jobs:
42+
# This job is for build retry configuration.
43+
- job: Publish_Build_Configuration
44+
pool:
45+
${{ if eq(variables['System.TeamProject'], 'public') }}:
46+
name: $(DncEngPublicBuildPool)
47+
demands: ImageOverride -equals windows.vs2022preview.amd64.open
48+
${{ if eq(variables['System.TeamProject'], 'internal') }}:
49+
name: $(DncEngInternalBuildPool)
50+
demands: ImageOverride -equals windows.vs2022preview.amd64
51+
steps:
52+
- publish: $(Build.SourcesDirectory)\eng\buildConfiguration
53+
artifact: buildConfiguration
54+
displayName: Publish Build Config
55+
56+
## PR-only jobs
57+
58+
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
59+
60+
## Windows
61+
62+
- template: eng/build.yml
63+
parameters:
64+
agentOs: Windows_NT
65+
jobName: Build_Debug_x64
66+
buildConfiguration: Debug
67+
buildArchitecture: x64
68+
additionalBuildParameters: '/p:PublishInternalAsset=true'
69+
runTests: true
70+
71+
## Linux
72+
73+
- template: eng/build.yml
74+
parameters:
75+
agentOs: Linux
76+
jobName: Build_Ubuntu_22_04_Debug_x64
77+
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04'
78+
buildConfiguration: Debug
79+
buildArchitecture: x64
80+
linuxPortable: true
81+
runTests: true
82+
- template: eng/build.yml
83+
parameters:
84+
agentOs: Linux
85+
jobName: Build_Fedora_39_Debug_x64
86+
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39'
87+
buildConfiguration: Debug
88+
buildArchitecture: x64
89+
linuxPortable: true
90+
runTests: true
91+
- template: eng/build.yml
92+
parameters:
93+
agentOs: Linux
94+
jobName: Build_CentOS_8_Stream_Debug_x64
95+
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8'
96+
buildConfiguration: Debug
97+
buildArchitecture: x64
98+
linuxPortable: false
99+
runTests: true
100+
- template: eng/build.yml
101+
parameters:
102+
agentOs: Linux
103+
jobName: Build_Debian_11_Debug_x64
104+
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-amd64'
105+
buildConfiguration: Debug
106+
buildArchitecture: x64
107+
additionalBuildParameters: '/p:BuildSdkDeb=true'
108+
linuxPortable: false
109+
runTests: true
110+
- template: eng/build.yml
111+
parameters:
112+
agentOs: Linux
113+
jobName: Build_Arm64_Debug
114+
buildConfiguration: Debug
115+
buildArchitecture: arm64
116+
runtimeIdentifier: 'linux-arm64'
117+
linuxPortable: true
118+
# Never run tests on arm64
119+
runTests: false
120+
- template: eng/build.yml
121+
parameters:
122+
agentOs: Linux
123+
jobName: Build_Linux_musl_Debug_x64
124+
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode'
125+
buildConfiguration: Debug
126+
buildArchitecture: x64
127+
runtimeIdentifier: 'linux-musl-x64'
128+
# Pass in HostOSName when running on alpine
129+
additionalBuildParameters: '/p:HostOSName="linux-musl"'
130+
linuxPortable: false
131+
runTests: true
132+
- template: eng/build.yml
133+
parameters:
134+
agentOs: Linux
135+
jobName: Build_LinuxPortable_Release_x64
136+
buildConfiguration: Release
137+
buildArchitecture: x64
138+
linuxPortable: true
139+
runTests: true
140+
141+
# MacOS
142+
143+
- template: eng/build.yml
144+
parameters:
145+
agentOs: Darwin
146+
jobName: Build_Release_x64
147+
buildConfiguration: Release
148+
buildArchitecture: x64
149+
runTests: true
150+
151+
## Official/PGO instrumentation Builds
152+
153+
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
154+
155+
## Windows
156+
157+
- template: eng/build.yml
158+
parameters:
159+
agentOs: Windows_NT
160+
jobName: Build_Release_x64
161+
buildConfiguration: Release
162+
buildArchitecture: x64
163+
additionalBuildParameters: '/p:PublishInternalAsset=true'
164+
runTests: false
165+
- template: eng/build.yml
166+
parameters:
167+
agentOs: Windows_NT
168+
jobName: Build_Release_x86
169+
buildConfiguration: Release
170+
buildArchitecture: x86
171+
runTests: false
172+
- template: eng/build.yml
173+
parameters:
174+
agentOs: Windows_NT
175+
jobName: Build_Release_arm64
176+
buildConfiguration: Release
177+
buildArchitecture: arm64
178+
runTests: false
179+
180+
## Linux
181+
182+
- template: eng/build.yml
183+
parameters:
184+
agentOs: Linux
185+
jobName: Build_Arm_Release
186+
buildConfiguration: Release
187+
buildArchitecture: arm
188+
runtimeIdentifier: 'linux-arm'
189+
linuxPortable: true
190+
runTests: false
191+
- template: eng/build.yml
192+
parameters:
193+
agentOs: Linux
194+
jobName: Build_Arm64_Release
195+
buildConfiguration: Release
196+
buildArchitecture: arm64
197+
runtimeIdentifier: 'linux-arm64'
198+
linuxPortable: true
199+
runTests: false
200+
- template: eng/build.yml
201+
parameters:
202+
agentOs: Linux
203+
jobName: Build_Linux_musl_Release_arm
204+
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-arm-alpine'
205+
buildConfiguration: Release
206+
buildArchitecture: arm
207+
runtimeIdentifier: 'linux-musl-arm'
208+
additionalBuildParameters: '/p:OSName="linux-musl"'
209+
linuxPortable: false
210+
runTests: false
211+
- template: eng/build.yml
212+
parameters:
213+
agentOs: Linux
214+
jobName: Build_Linux_musl_Release_arm64
215+
buildConfiguration: Release
216+
buildArchitecture: arm64
217+
runtimeIdentifier: 'linux-musl-arm64'
218+
additionalBuildParameters: '/p:OSName="linux-musl"'
219+
linuxPortable: false
220+
runTests: false
221+
- template: eng/build.yml
222+
parameters:
223+
agentOs: Linux
224+
jobName: Build_Linux_musl_Release_x64
225+
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode'
226+
buildConfiguration: Release
227+
buildArchitecture: x64
228+
runtimeIdentifier: 'linux-musl-x64'
229+
# Pass in HostOSName when running on alpine
230+
additionalBuildParameters: '/p:HostOSName="linux-musl"'
231+
linuxPortable: false
232+
runTests: false
233+
- template: eng/build.yml
234+
parameters:
235+
agentOs: Linux
236+
jobName: Build_Linux_Portable_Deb_Release_x64
237+
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg'
238+
buildConfiguration: Release
239+
buildArchitecture: x64
240+
# Do not publish zips and tarballs. The linux-x64 binaries are
241+
# already published by Build_LinuxPortable_Release_x64
242+
additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:BuildSdkDeb=true'
243+
linuxPortable: true
244+
runTests: false
245+
- template: eng/build.yml
246+
parameters:
247+
agentOs: Linux
248+
jobName: Build_Linux_Portable_Rpm_Release_x64
249+
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm'
250+
buildConfiguration: Release
251+
buildArchitecture: x64
252+
# Do not publish zips and tarballs. The linux-x64 binaries are
253+
# already published by Build_LinuxPortable_Release_x64
254+
additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:IsRPMBasedDistro=true'
255+
linuxPortable: true
256+
runTests: false
257+
- template: eng/build.yml
258+
parameters:
259+
agentOs: Linux
260+
jobName: Build_Linux_Portable_Rpm_Release_Arm64
261+
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-fpm'
262+
buildConfiguration: Release
263+
buildArchitecture: arm64
264+
runtimeIdentifier: 'linux-arm64'
265+
# Do not publish zips and tarballs. The linux-x64 binaries are
266+
# already published by Build_LinuxPortable_Release_x64
267+
additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:CLIBUILD_SKIP_TESTS=true /p:IsRPMBasedDistro=true'
268+
linuxPortable: true
269+
runTests: false
270+
- template: eng/build.yml
271+
parameters:
272+
agentOs: Linux
273+
jobName: Build_LinuxPortable_Release_x64
274+
buildConfiguration: Release
275+
buildArchitecture: x64
276+
linuxPortable: true
277+
runTests: false
278+
279+
# MacOS
280+
281+
- template: eng/build.yml
282+
parameters:
283+
agentOs: Darwin
284+
jobName: Build_Release_x64
285+
buildConfiguration: Release
286+
buildArchitecture: x64
287+
runTests: false
288+
- template: eng/build.yml
289+
parameters:
290+
agentOs: Darwin
291+
jobName: Build_Release_arm64
292+
runtimeIdentifier: 'osx-arm64'
293+
buildConfiguration: Release
294+
buildArchitecture: arm64
295+
runTests: false
296+
297+
## Windows PGO Instrumentation builds
298+
299+
- template: eng/build.yml
300+
parameters:
301+
agentOs: Windows_NT
302+
pgoInstrument: true
303+
jobName: Build_Release_x64
304+
buildConfiguration: Release
305+
buildArchitecture: x64
306+
additionalBuildParameters: '/p:PublishInternalAsset=true'
307+
runTests: false
308+
- template: eng/build.yml
309+
parameters:
310+
agentOs: Windows_NT
311+
pgoInstrument: true
312+
jobName: Build_Release_x86
313+
buildConfiguration: Release
314+
buildArchitecture: x86
315+
runTests: false
316+
- template: eng/build.yml
317+
parameters:
318+
agentOs: Windows_NT
319+
pgoInstrument: true
320+
jobName: Build_Release_arm64
321+
buildConfiguration: Release
322+
buildArchitecture: arm64
323+
runTests: false
324+
325+
## Linux PGO Instrumentation builds
326+
327+
- template: eng/build.yml
328+
parameters:
329+
agentOs: Linux
330+
pgoInstrument: true
331+
jobName: Build_LinuxPortable_Release_x64
332+
buildConfiguration: Release
333+
buildArchitecture: x64
334+
linuxPortable: true
335+
runTests: false
336+
337+
- template: eng/build.yml
338+
parameters:
339+
agentOs: Linux
340+
pgoInstrument: true
341+
jobName: Build_Release_arm64
342+
buildConfiguration: Release
343+
buildArchitecture: arm64
344+
linuxPortable: true
345+
runTests: false
346+
347+
- template: /eng/common/templates/jobs/source-build.yml
348+
349+
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
350+
- stage: Publish
351+
dependsOn:
352+
- Build
353+
jobs:
354+
- template: /eng/common/templates/job/publish-build-assets.yml
355+
parameters:
356+
publishUsingPipelines: true
357+
publishAssetsImmediately: true
358+
pool:
359+
${{ if eq(variables['System.TeamProject'], 'internal') }}:
360+
name: $(DncEngInternalBuildPool)
361+
demands: ImageOverride -equals windows.vs2022.amd64

0 commit comments

Comments
 (0)