From 5d3deb3c1e3036b7e08e3ba94cc182724e36f8eb Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Tue, 12 May 2026 19:07:31 +0000 Subject: [PATCH 1/2] Consolidate single-consumer library test legs into build jobs Merge 6 split build+test leg pairs into self-contained jobs that build and send to Helix directly, eliminating artifact upload/download overhead. Consolidated legs (Libraries_CheckedCoreCLR): - linux_musl_x64: build+test merged, removed from separate test run - windows_x86: build+test merged, removed from separate test run Consolidated legs (CoreCLR_ReleaseLibraries): - linux_x64: build+test merged, removed separate test run block - linux_musl_arm: build+test merged, removed separate test run block - linux_musl_arm64: build+test merged, removed separate test run block - windows_x64: build+test merged, removed separate test run block Each of these artifacts was only consumed by a single downstream test leg on the same platform. The consolidation follows the existing self-contained pattern used by NativeAOT_Libraries, Mono_Interpreter, and Mono_MiniJIT legs. Net result: -62 lines of pipeline YAML, 6 fewer pipeline jobs, 6 fewer artifact upload+download round-trips. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/pipelines/runtime.yml | 82 ++++++++++----------------------------- 1 file changed, 20 insertions(+), 62 deletions(-) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 9c5b24c8ceb3ee..f11f787d380720 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -421,9 +421,12 @@ extends: eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), eq(variables['isRollingBuild'], true)) + # Consolidated: build + test in one job (previously split build/test legs) - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + helixQueueGroup: libraries buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} platforms: - linux_musl_x64 @@ -431,25 +434,12 @@ extends: jobParameters: nameSuffix: Libraries_CheckedCoreCLR buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) -rc Checked /p:ArchiveTests=true - timeoutInMinutes: 120 + timeoutInMinutes: 240 postBuildSteps: - - template: /eng/pipelines/common/upload-artifact-step.yml - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/bin - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: Libraries_CheckedCoreCLR_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - displayName: Build Assets - - template: /eng/pipelines/common/upload-artifact-step.yml + - template: /eng/pipelines/libraries/helix.yml parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/helix - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: Libraries_CheckedCoreCLR_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + creator: dotnet-bot + testRunNamePrefixSuffix: coreclr_Checked condition: >- or( eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -520,9 +510,12 @@ extends: eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), eq(variables['isRollingBuild'], true)) + # Consolidated: build + test in one job (previously split build/test legs) - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + helixQueueGroup: libraries buildConfig: checked platforms: - linux_x64 @@ -532,25 +525,13 @@ extends: jobParameters: nameSuffix: CoreCLR_ReleaseLibraries buildArgs: -s clr+libs+libs.tests -rc $(_BuildConfig) -c Release /p:ArchiveTests=true - timeoutInMinutes: 120 + timeoutInMinutes: 240 postBuildSteps: - - template: /eng/pipelines/common/upload-artifact-step.yml - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/bin - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: CoreCLR_ReleaseLibraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - displayName: Build Assets - - template: /eng/pipelines/common/upload-artifact-step.yml + - template: /eng/pipelines/libraries/helix.yml parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/helix - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: CoreCLR_ReleaseLibraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + creator: dotnet-bot + buildConfig: Release + testRunNamePrefixSuffix: coreclr_Checked condition: >- or( eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -1951,8 +1932,8 @@ extends: buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} platforms: - linux_arm64 - - windows_x86 - - linux_musl_x64 + # Removed: windows_x86 and linux_musl_x64 — consolidated into + # the Libraries_CheckedCoreCLR build leg (now builds and sends to Helix directly). helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml helixQueueGroup: libraries jobParameters: @@ -1966,32 +1947,9 @@ extends: eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), eq(variables['isRollingBuild'], true)) - # - # Release Libraries Test Execution against a checked runtime - # Only if CoreCLR or Libraries is changed - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/run-test-job.yml - buildConfig: Release - platforms: - - linux_musl_arm - - linux_musl_arm64 - - linux_x64 - - windows_x64 - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - helixQueueGroup: libraries - jobParameters: - testScope: innerloop - liveRuntimeBuildConfig: checked - unifiedArtifactsName: CoreCLR_ReleaseLibraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Checked - helixArtifactsName: CoreCLR_ReleaseLibraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Checked - unifiedBuildNameSuffix: CoreCLR_ReleaseLibraries - unifiedBuildConfigOverride: checked - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isRollingBuild'], true)) + # Removed: Release Libraries Test Run for linux_musl_arm, linux_musl_arm64, + # linux_x64, windows_x64 against CoreCLR_ReleaseLibraries — consolidated into + # the build leg above (CoreCLR_ReleaseLibraries now builds and sends to Helix directly). - template: /eng/pipelines/common/platform-matrix.yml parameters: From f95c5c2104583a44e446fdc99a3c1fb523617ef3 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Tue, 12 May 2026 20:10:42 +0000 Subject: [PATCH 2/2] Fix duplicate buildConfig: use Release at platform-matrix level The global-build-job.yml template forwards buildConfig to postBuildStep templates automatically (line 253). Passing buildConfig again in the helix.yml parameters block caused a duplicate key error. Fix: set buildConfig to Release at the platform-matrix level (matching the libraries configuration) and hardcode -rc Checked in buildArgs for the CLR runtime configuration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/pipelines/runtime.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index f11f787d380720..e4a7c01a66bea9 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -516,7 +516,7 @@ extends: jobTemplate: /eng/pipelines/common/global-build-job.yml helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml helixQueueGroup: libraries - buildConfig: checked + buildConfig: Release platforms: - linux_x64 - linux_musl_arm @@ -524,13 +524,12 @@ extends: - windows_x64 jobParameters: nameSuffix: CoreCLR_ReleaseLibraries - buildArgs: -s clr+libs+libs.tests -rc $(_BuildConfig) -c Release /p:ArchiveTests=true + buildArgs: -s clr+libs+libs.tests -rc Checked -c $(_BuildConfig) /p:ArchiveTests=true timeoutInMinutes: 240 postBuildSteps: - template: /eng/pipelines/libraries/helix.yml parameters: creator: dotnet-bot - buildConfig: Release testRunNamePrefixSuffix: coreclr_Checked condition: >- or(