Skip to content

Commit 7498771

Browse files
authored
Convert AllConfigurations and NETFX jobs to use the global build templates (#93082)
1 parent 1feb622 commit 7498771

File tree

9 files changed

+72
-137
lines changed

9 files changed

+72
-137
lines changed

eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,22 @@ jobs:
7575
# Run net48 tests on win-x64
7676
- template: /eng/pipelines/common/platform-matrix.yml
7777
parameters:
78-
jobTemplate: /eng/pipelines/libraries/build-job.yml
78+
jobTemplate: /eng/pipelines/common/global-build-job.yml
7979
buildConfig: Release
8080
platforms:
8181
- windows_x64
8282
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
8383
jobParameters:
8484
framework: net48
85-
runTests: true
86-
testScope: innerloop
85+
buildArgs: -s tools+libs+libs.tests -framework net48 -c $(_BuildConfig) -testscope innerloop /p:ArchiveTests=true
86+
nameSuffix: Libraries_NET48
87+
timeoutInMinutes: 150
88+
postBuildSteps:
89+
- template: /eng/pipelines/libraries/helix.yml
90+
parameters:
91+
creator: dotnet-bot
92+
testRunNamePrefixSuffix: NET48_$(_BuildConfig)
93+
extraHelixArguments: /p:BuildTargetFramework=net48
8794
condition: >-
8895
or(
8996
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),

eng/pipelines/global-build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,6 @@ extends:
172172
- SourceBuild_linux_x64
173173
jobParameters:
174174
nameSuffix: PortableSourceBuild
175-
extraStepsParameters:
176-
name: SourceBuildPackages
177175
timeoutInMinutes: 95
178176
condition:
179177
eq(dependencies.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true)

eng/pipelines/installer/jobs/build-job.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ parameters:
1111
container: ''
1212
buildSteps: []
1313
dependsOn: []
14-
dependsOnGlobalBuild: false
1514
dependOnEvaluatePaths: false
1615
globalBuildSuffix: ''
1716
variables: []

eng/pipelines/libraries/base-job.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ parameters:
55
osSubgroup: ''
66
crossBuild: false
77
framework: 'net9.0'
8-
isOfficialAllConfigurations: false
98
isSourceBuild: false
109
liveRuntimeBuildConfig: ''
1110
runtimeFlavor: 'coreclr'
@@ -28,12 +27,8 @@ parameters:
2827
jobs:
2928
- template: /eng/common/templates/job/job.yml
3029
parameters:
31-
${{ if notIn(parameters.framework, 'allConfigurations', 'net48') }}:
32-
displayName: ${{ format('Libraries {0} {1}{2} {3} {4}', parameters.displayName, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
33-
name: ${{ format('libraries_{0}_{1}{2}_{3}_{4}', parameters.name, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
34-
${{ if in(parameters.framework, 'allConfigurations', 'net48') }}:
35-
displayName: ${{ format('Libraries {0} {1} {2} {3} {4}', parameters.displayName, parameters.osGroup, parameters.framework, parameters.archType, parameters.buildConfig) }}
36-
name: ${{ format('libraries_{0}_{1}_{2}{3}_{4}_{5}', parameters.name, parameters.framework, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
30+
displayName: ${{ format('Libraries {0} {1}{2} {3} {4}', parameters.displayName, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
31+
name: ${{ format('libraries_{0}_{1}{2}_{3}_{4}', parameters.name, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
3732

3833
enableTelemetry: ${{ parameters.isOfficialBuild }} # TODO: figure out if it's needed
3934
container: ${{ parameters.container }}
@@ -79,13 +74,6 @@ jobs:
7974
- _finalFrameworkArg: -framework ${{ parameters.framework }}
8075
- _extraHelixArguments: /p:BuildTargetFramework=${{ parameters.framework }}
8176

82-
- ${{ if eq(parameters.framework, 'allConfigurations') }}:
83-
- _finalFrameworkArg: -allConfigurations
84-
- _testModeArg: /p:TestAssemblies=false /p:TestPackages=true
85-
86-
- ${{ if eq(parameters.isOfficialAllConfigurations, true) }}:
87-
- librariesBuildArtifactName: 'libraries_bin_official_allconfigurations'
88-
8977
- ${{ if eq(parameters.isOfficialBuild, true) }}:
9078
- _msbuildCommonParameters: /p:OfficialBuildId=$(Build.BuildNumber)
9179

eng/pipelines/libraries/build-job.yml

Lines changed: 26 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,18 @@ parameters:
77
crossBuild: false
88
framework: 'net9.0'
99
isOfficialBuild: false
10-
isOfficialAllConfigurations: false
1110
runtimeVariant: ''
1211
platform: ''
13-
14-
# When set to a non-empty value (Debug / Release), it determines the runtime's
15-
# build configuration to use for building libraries and tests. Setting this
16-
# property implies a dependency of this job on the appropriate runtime build
17-
# and is used to construct the name of the Azure artifact representing
18-
# runtime build to use for building the libraries and library tests.
19-
liveRuntimeBuildConfig: ''
20-
runtimeFlavor: 'coreclr'
12+
testScope: ''
2113

2214
timeoutInMinutes: 150
23-
preBuildSteps: []
2415
container: ''
2516
condition: true
2617
dependOnEvaluatePaths: false
2718
disableComponentGovernance: false
2819
shouldContinueOnError: false
2920
variables: {}
3021
pool: ''
31-
# Run tests as part of the build job (instead of running them in a separate job)
32-
runTests: false
33-
# Package up the test builds so they can be sent to Helix
34-
useHelix: true
35-
testScope: ''
3622

3723
jobs:
3824
- template: /eng/pipelines/libraries/base-job.yml
@@ -44,12 +30,9 @@ jobs:
4430
crossBuild: ${{ parameters.crossBuild }}
4531
framework: ${{ parameters.framework }}
4632
isOfficialBuild: ${{ parameters.isOfficialBuild }}
47-
isOfficialAllConfigurations: ${{ parameters.isOfficialAllConfigurations }}
48-
liveRuntimeBuildConfig: ${{ parameters.liveRuntimeBuildConfig }}
4933
runtimeFlavor: ${{ parameters.runtimeFlavor }}
50-
runTests: ${{ parameters.runTests }}
34+
runTests: false
5135
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
52-
preBuildSteps: ${{ parameters.preBuildSteps }}
5336
container: ${{ parameters.container }}
5437
condition: ${{ parameters.condition }}
5538
dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }}
@@ -60,33 +43,14 @@ jobs:
6043
name: build
6144
displayName: 'Build'
6245

63-
${{ if and(ne(parameters.liveRuntimeBuildConfig, ''), eq(parameters.runTests, true)) }}:
64-
dependsOn:
65-
# Use full product dependency for test runs
66-
- ${{ format('{0}_{1}_product_build_{2}{3}_{4}_{5}', parameters.runtimeFlavor, parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveRuntimeBuildConfig) }}
67-
6846
variables:
6947
- librariesTestsArtifactName: ${{ format('libraries_test_assets_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
7048
- _subset: tools+libs+libs.tests
71-
- ${{ if and(eq(parameters.runTests, false), eq(parameters.useHelix, false)) }}:
72-
- _subset: tools+libs
7349
- _buildAction: ''
74-
- _additionalBuildArguments: ''
75-
- ${{ parameters.variables }}
76-
77-
# Tests only run for 'allConfiguration' and 'net48' build-jobs
78-
# Only pass -test for when we aren't running tests using Helix.
79-
- ${{ if and(eq(parameters.runTests, true), eq(parameters.useHelix, false)) }}:
80-
- _buildAction: -restore -build -test
81-
- ${{ if eq(parameters.useHelix, true) }}:
82-
- _additionalBuildArguments: /p:ArchiveTests=true
83-
50+
- _additionalBuildArguments: '/p:ArchiveTests=true'
8451
- ${{ parameters.variables }}
8552

8653
steps:
87-
- ${{ if eq(parameters.isOfficialBuild, true) }}:
88-
- template: /eng/pipelines/common/restore-internal-tools.yml
89-
9054
- ${{ if in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator') }}:
9155
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }}
9256
displayName: Install Build Dependencies
@@ -109,56 +73,26 @@ jobs:
10973
df -h
11074
displayName: Disk Usage after Build
11175
112-
- ${{ if eq(parameters.runTests, false) }}:
113-
- template: /eng/pipelines/libraries/prepare-for-bin-publish.yml
114-
parameters:
115-
isOfficialBuild: ${{ parameters.isOfficialBuild }}
116-
117-
- template: /eng/pipelines/common/upload-artifact-step.yml
118-
parameters:
119-
rootFolder: $(Build.ArtifactStagingDirectory)/artifacts
120-
includeRootFolder: false
121-
archiveType: $(archiveType)
122-
archiveExtension: $(archiveExtension)
123-
tarCompression: $(tarCompression)
124-
artifactName: $(librariesBuildArtifactName)
125-
displayName: Build Assets
126-
127-
# Upload test assets if we are sending tests to Helix and not running them directly in this job.
128-
- ${{ if and(eq(parameters.runTests, false), eq(parameters.useHelix, true)) }}:
129-
- template: /eng/pipelines/common/upload-artifact-step.yml
130-
parameters:
131-
rootFolder: $(Build.SourcesDirectory)/artifacts/helix
132-
includeRootFolder: true
133-
archiveType: $(archiveType)
134-
archiveExtension: $(archiveExtension)
135-
tarCompression: $(tarCompression)
136-
artifactName: $(librariesTestsArtifactName)
137-
displayName: Test Assets
138-
139-
# Save AllConfigurations artifacts using the prepare-signed-artifacts format. The
140-
# platform-specific jobs' nupkgs automatically flow through the matching platform-specific
141-
# Installer build, but AllConfigurations should only be uploaded once, here.
142-
- ${{ if eq(parameters.isOfficialAllConfigurations, true) }}:
143-
- template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
144-
parameters:
145-
name: Libraries_AllConfigurations
146-
publishPackagesCondition: >-
147-
or(
148-
eq(variables['_librariesBuildProducedPackages'], true),
149-
eq(variables['Build.SourceBranchName'], 'main'),
150-
eq(variables['System.PullRequest.TargetBranch'], 'main'))
151-
152-
- ${{ if and(eq(parameters.runTests, true), eq(parameters.useHelix, true)) }}:
153-
- template: /eng/pipelines/libraries/helix.yml
154-
parameters:
155-
osGroup: ${{ parameters.osGroup }}
156-
targetRid: ${{ parameters.targetRid }}
157-
archType: ${{ parameters.archType }}
158-
buildConfig: ${{ parameters.buildConfig }}
159-
helixQueues: ${{ parameters.helixQueues }}
160-
testScope: ${{ parameters.testScope }}
161-
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
162-
creator: dotnet-bot
163-
testRunNamePrefixSuffix: $(_testRunNamePrefixSuffix)
164-
extraHelixArguments: $(_extraHelixArguments)
76+
- template: /eng/pipelines/libraries/prepare-for-bin-publish.yml
77+
78+
- template: /eng/pipelines/common/upload-artifact-step.yml
79+
parameters:
80+
rootFolder: $(Build.ArtifactStagingDirectory)/artifacts
81+
includeRootFolder: false
82+
archiveType: $(archiveType)
83+
archiveExtension: $(archiveExtension)
84+
tarCompression: $(tarCompression)
85+
artifactName: $(librariesBuildArtifactName)
86+
displayName: Build Assets
87+
88+
# Upload test assets
89+
# We'll pull them down in another job to send to Helix
90+
- template: /eng/pipelines/common/upload-artifact-step.yml
91+
parameters:
92+
rootFolder: $(Build.SourcesDirectory)/artifacts/helix
93+
includeRootFolder: true
94+
archiveType: $(archiveType)
95+
archiveExtension: $(archiveExtension)
96+
tarCompression: $(tarCompression)
97+
artifactName: $(librariesTestsArtifactName)
98+
displayName: Test Assets

eng/pipelines/libraries/run-test-job.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ jobs:
6868
- ${{ if ne(parameters.dependsOn[0], '') }}:
6969
- ${{ parameters.dependsOn }}
7070
- ${{ if eq(parameters.dependsOn[0], '') }}:
71-
- ${{ if notIn(parameters.framework, 'allConfigurations', 'net48') }}:
72-
- ${{ format('libraries_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
71+
- ${{ format('libraries_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
7372
- ${{ if ne(parameters.liveRuntimeBuildConfig, '') }}:
7473
- ${{ format('{0}_{1}_product_build_{2}{3}_{4}_{5}', parameters.runtimeFlavor, parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveRuntimeBuildConfig) }}
7574
# SuperPMI collection needs to run mcs.exe on the AzDO machine. Assume that's an x64 machine, and download an x64 product build if needed.
@@ -259,4 +258,4 @@ jobs:
259258
SpmiLogsLocation: $(SpmiLogsLocation)
260259
SuperPmiMcsPath: $(SuperPmiMcsPath)
261260
PythonScript: $(PythonScript)
262-
PipScript: $(PipScript)
261+
PipScript: $(PipScript)

eng/pipelines/runtime-android-grpc-client-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extends:
4343
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunGrpcTestsOnly=true /p:BuildGrpcServerDockerImage=true
4444
timeoutInMinutes: 180
4545
# extra steps, run tests
46-
extraStepsTemplats:
46+
postBuildSteps:
4747
- template: /eng/pipelines/libraries/helix.yml
4848
parameters:
4949
creator: dotnet-bot

eng/pipelines/runtime-linker-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ extends:
108108
eq(dependencies.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
109109
eq(variables['isRollingBuild'], true))
110110
buildArgs: -s clr+libs+tools.illink -c $(_BuildConfig)
111-
extraStepsTemplats:
111+
postBuildSteps:
112112
- template: /eng/pipelines/libraries/execute-trimming-tests-steps.yml
113113

114114
#

eng/pipelines/runtime.yml

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -662,15 +662,16 @@ extends:
662662
eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true),
663663
eq(variables['isRollingBuild'], true))
664664
# extra steps, run tests
665-
extraStepsTemplate: /eng/pipelines/libraries/helix.yml
666-
extraStepsParameters:
667-
creator: dotnet-bot
668-
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
669-
condition: >-
670-
or(
671-
eq(variables['librariesContainsChange'], true),
672-
eq(variables['monoContainsChange'], true),
673-
eq(variables['isRollingBuild'], true))
665+
postBuildSteps:
666+
- template: /eng/pipelines/libraries/helix.yml
667+
parameters:
668+
creator: dotnet-bot
669+
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
670+
condition: >-
671+
or(
672+
eq(variables['librariesContainsChange'], true),
673+
eq(variables['monoContainsChange'], true),
674+
eq(variables['isRollingBuild'], true))
674675
675676
#
676677
# iOS/tvOS devices - Full AOT + AggressiveTrimming to reduce size
@@ -1111,32 +1112,45 @@ extends:
11111112
condition: >-
11121113
eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true)
11131114
1115+
#
1116+
# Build and test libraries for .NET Framework
1117+
#
11141118
- template: /eng/pipelines/common/platform-matrix.yml
11151119
parameters:
1116-
jobTemplate: /eng/pipelines/libraries/build-job.yml
1120+
jobTemplate: /eng/pipelines/common/global-build-job.yml
11171121
buildConfig: Release
11181122
platforms:
11191123
- windows_x86
11201124
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
11211125
jobParameters:
11221126
framework: net48
1123-
runTests: true
1124-
testScope: innerloop
1127+
buildArgs: -s tools+libs+libs.tests -framework net48 -c $(_BuildConfig) -testscope innerloop /p:ArchiveTests=true
1128+
nameSuffix: Libraries_NET48
1129+
timeoutInMinutes: 150
1130+
postBuildSteps:
1131+
- template: /eng/pipelines/libraries/helix.yml
1132+
parameters:
1133+
creator: dotnet-bot
1134+
testRunNamePrefixSuffix: NET48_$(_BuildConfig)
1135+
extraHelixArguments: /p:BuildTargetFramework=net48
11251136
condition: >-
11261137
or(
11271138
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
11281139
eq(variables['isRollingBuild'], true))
11291140
1141+
#
1142+
# Build and test libraries AllConfigurations
1143+
#
11301144
- template: /eng/pipelines/common/platform-matrix.yml
11311145
parameters:
1132-
jobTemplate: /eng/pipelines/libraries/build-job.yml
1146+
jobTemplate: /eng/pipelines/common/global-build-job.yml
11331147
buildConfig: ${{ variables.debugOnPrReleaseOnRolling }}
11341148
platforms:
11351149
- windows_x64
11361150
jobParameters:
1137-
framework: allConfigurations
1138-
runTests: true
1139-
useHelix: false
1151+
buildArgs: -test -s tools+libs+libs.tests -allConfigurations -c $(_BuildConfig) /p:TestAssemblies=false /p:TestPackages=true
1152+
nameSuffix: Libraries_AllConfigurations
1153+
timeoutInMinutes: 150
11401154
condition: >-
11411155
or(
11421156
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
@@ -1606,8 +1620,6 @@ extends:
16061620
- SourceBuild_centos8_x64
16071621
jobParameters:
16081622
nameSuffix: centos8SourceBuild
1609-
extraStepsParameters:
1610-
name: SourceBuildPackages
16111623
timeoutInMinutes: 95
16121624
condition: eq(variables['isRollingBuild'], true)
16131625

@@ -1620,7 +1632,5 @@ extends:
16201632
- SourceBuild_banana24_x64
16211633
jobParameters:
16221634
nameSuffix: banana24SourceBuild
1623-
extraStepsParameters:
1624-
name: SourceBuildPackages
16251635
timeoutInMinutes: 95
16261636
condition: eq(variables['isRollingBuild'], true)

0 commit comments

Comments
 (0)