From 3d3710540ebd5a6dfd9636d32c1d06a7bb81f5d1 Mon Sep 17 00:00:00 2001 From: Aditya Mandaleeka Date: Fri, 5 Dec 2025 17:30:56 -0800 Subject: [PATCH 1/8] Avoid building the same stuff twice for helix subsets. --- .azure/pipelines/ci-public.yml | 50 ++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/.azure/pipelines/ci-public.yml b/.azure/pipelines/ci-public.yml index 49ea0fdb978b..b986513544f7 100644 --- a/.azure/pipelines/ci-public.yml +++ b/.azure/pipelines/ci-public.yml @@ -553,20 +553,46 @@ stages: publishOnError: true includeForks: true - # Helix x64 subset 1 + # Helix x64 build - shared by both Helix test subsets - template: jobs/default-build.yml parameters: - jobName: Helix_x64_Subset_1 - jobDisplayName: 'Tests: Helix x64 Subset 1' + jobName: Helix_x64_Build + jobDisplayName: 'Build: Helix x64' agentOs: Windows - timeoutInMinutes: 240 + timeoutInMinutes: 120 steps: # Build the shared framework - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -nobl -all -pack -arch x64 /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) /p:VsTestUseMSBuildOutput=false displayName: Build shared fx - # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the previous step. + - task: PublishPipelineArtifact@1 + displayName: Publish Helix build artifacts + inputs: + targetPath: $(Build.SourcesDirectory)/artifacts + artifactName: Helix_Build_Artifacts + artifacts: + - name: Helix_Build_Logs_Attempt_$(System.JobAttempt) + path: artifacts/log/ + publishOnError: true + includeForks: true + + # Helix x64 subset 1 + - template: jobs/default-build.yml + parameters: + jobName: Helix_x64_Subset_1 + jobDisplayName: 'Tests: Helix x64 Subset 1' + agentOs: Windows + dependsOn: Helix_x64_Build + timeoutInMinutes: 240 + steps: + # Download build artifacts from Helix_x64_Build job + - task: DownloadPipelineArtifact@2 + displayName: Download Helix build artifacts + inputs: + artifact: Helix_Build_Artifacts + path: $(Build.SourcesDirectory)/artifacts + # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the build job. - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -all -noBuildRepoTasks -noBuildNative -noBuild -test -projects eng\helix\helix.proj /p:IsHelixPRCheck=true /p:IsHelixJob=true /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) @@ -588,14 +614,16 @@ stages: jobName: Helix_x64_Subset_2 jobDisplayName: 'Tests: Helix x64 Subset 2' agentOs: Windows + dependsOn: Helix_x64_Build timeoutInMinutes: 240 steps: - # Build the shared framework - - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -nobl -all -pack -arch x64 - /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) - /p:VsTestUseMSBuildOutput=false - displayName: Build shared fx - # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the previous step. + # Download build artifacts from Helix_x64_Build job + - task: DownloadPipelineArtifact@2 + displayName: Download Helix build artifacts + inputs: + artifact: Helix_Build_Artifacts + path: $(Build.SourcesDirectory)/artifacts + # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the build job. - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -all -noBuildRepoTasks -noBuildNative -noBuild -test -projects eng\helix\helix.proj /p:IsHelixPRCheck=true /p:IsHelixJob=true /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) From 8c6965f9d18bbd018a3f69af8053f9402dee18e2 Mon Sep 17 00:00:00 2001 From: Aditya Mandaleeka Date: Fri, 5 Dec 2025 18:25:13 -0800 Subject: [PATCH 2/8] Share package cache too. --- .azure/pipelines/ci-public.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.azure/pipelines/ci-public.yml b/.azure/pipelines/ci-public.yml index b986513544f7..2c60cf0ea88e 100644 --- a/.azure/pipelines/ci-public.yml +++ b/.azure/pipelines/ci-public.yml @@ -571,6 +571,11 @@ stages: inputs: targetPath: $(Build.SourcesDirectory)/artifacts artifactName: Helix_Build_Artifacts + - task: PublishPipelineArtifact@1 + displayName: Publish NuGet packages cache + inputs: + targetPath: $(Build.SourcesDirectory)/.packages + artifactName: Helix_NuGet_Packages artifacts: - name: Helix_Build_Logs_Attempt_$(System.JobAttempt) path: artifacts/log/ @@ -592,6 +597,11 @@ stages: inputs: artifact: Helix_Build_Artifacts path: $(Build.SourcesDirectory)/artifacts + - task: DownloadPipelineArtifact@2 + displayName: Download NuGet packages cache + inputs: + artifact: Helix_NuGet_Packages + path: $(Build.SourcesDirectory)/.packages # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the build job. - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -all -noBuildRepoTasks -noBuildNative -noBuild -test -projects eng\helix\helix.proj /p:IsHelixPRCheck=true /p:IsHelixJob=true @@ -623,6 +633,11 @@ stages: inputs: artifact: Helix_Build_Artifacts path: $(Build.SourcesDirectory)/artifacts + - task: DownloadPipelineArtifact@2 + displayName: Download NuGet packages cache + inputs: + artifact: Helix_NuGet_Packages + path: $(Build.SourcesDirectory)/.packages # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the build job. - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -all -noBuildRepoTasks -noBuildNative -noBuild -test -projects eng\helix\helix.proj /p:IsHelixPRCheck=true /p:IsHelixJob=true From c78e16f2961001e10d28931fcb189da81f140bbc Mon Sep 17 00:00:00 2001 From: Aditya Mandaleeka Date: Fri, 5 Dec 2025 18:27:25 -0800 Subject: [PATCH 3/8] TEMP disable other jobs. --- .azure/pipelines/ci-public.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.azure/pipelines/ci-public.yml b/.azure/pipelines/ci-public.yml index 2c60cf0ea88e..fedce923731b 100644 --- a/.azure/pipelines/ci-public.yml +++ b/.azure/pipelines/ci-public.yml @@ -95,6 +95,7 @@ stages: # Code check - template: jobs/default-build.yml parameters: + condition: false # TEMPORARY: Disabled for testing Helix dedup jobName: Code_check jobDisplayName: Code check agentOs: Windows @@ -110,6 +111,7 @@ stages: # Build Windows (x64/x86/arm64) - template: jobs/default-build.yml parameters: + condition: false # TEMPORARY: Disabled for testing Helix dedup codeSign: true jobName: Windows_build jobDisplayName: "Build: Windows x64/x86/arm64" @@ -229,6 +231,7 @@ stages: # Build MacOS arm64 - template: jobs/default-build.yml parameters: + condition: false # TEMPORARY: Disabled for testing Helix dedup jobName: MacOs_arm64_build jobDisplayName: "Build: macOS arm64" agentOs: macOs @@ -260,6 +263,7 @@ stages: # Build MacOS x64 - template: jobs/default-build.yml parameters: + condition: false # TEMPORARY: Disabled for testing Helix dedup jobName: MacOs_x64_build jobDisplayName: "Build: macOS x64" agentOs: macOs @@ -290,6 +294,7 @@ stages: # Build Linux x64 - template: jobs/default-build.yml parameters: + condition: false # TEMPORARY: Disabled for testing Helix dedup jobName: Linux_x64_build jobDisplayName: "Build: Linux x64" agentOs: Linux @@ -322,6 +327,7 @@ stages: # Build Linux ARM - template: jobs/default-build.yml parameters: + condition: false # TEMPORARY: Disabled for testing Helix dedup jobName: Linux_arm_build jobDisplayName: "Build: Linux ARM" agentOs: Linux @@ -352,6 +358,7 @@ stages: # Build Linux ARM64 - template: jobs/default-build.yml parameters: + condition: false # TEMPORARY: Disabled for testing Helix dedup jobName: Linux_arm64_build jobDisplayName: "Build: Linux ARM64" agentOs: Linux @@ -383,6 +390,7 @@ stages: # Build Linux Musl x64 - template: jobs/default-build.yml parameters: + condition: false # TEMPORARY: Disabled for testing Helix dedup jobName: Linux_musl_x64_build jobDisplayName: "Build: Linux Musl x64" agentOs: Linux @@ -416,6 +424,7 @@ stages: # Build Linux Musl ARM - template: jobs/default-build.yml parameters: + condition: false # TEMPORARY: Disabled for testing Helix dedup jobName: Linux_musl_arm_build jobDisplayName: "Build: Linux Musl ARM" agentOs: Linux @@ -449,6 +458,7 @@ stages: # Build Linux Musl ARM64 - template: jobs/default-build.yml parameters: + condition: false # TEMPORARY: Disabled for testing Helix dedup jobName: Linux_musl_arm64_build jobDisplayName: "Build: Linux Musl ARM64" agentOs: Linux @@ -483,6 +493,7 @@ stages: # Test jobs - template: jobs/default-build.yml parameters: + condition: false # TEMPORARY: Disabled for testing Helix dedup jobName: Windows_Test jobDisplayName: "Test: Windows Server x64" agentOs: Windows @@ -511,6 +522,7 @@ stages: - template: jobs/default-build.yml parameters: + condition: false # TEMPORARY: Disabled for testing Helix dedup jobName: MacOS_Test jobDisplayName: "Test: macOS" agentOs: macOS @@ -532,6 +544,7 @@ stages: - template: jobs/default-build.yml parameters: + condition: false # TEMPORARY: Disabled for testing Helix dedup jobName: Linux_Test jobDisplayName: "Test: Ubuntu x64" agentOs: Linux @@ -657,6 +670,7 @@ stages: # Local development validation - template: jobs/default-build.yml parameters: + condition: false # TEMPORARY: Disabled for testing Helix dedup jobName: Local_Windows jobDisplayName: 'Test: Windows local development validation' agentOs: Windows @@ -692,12 +706,13 @@ stages: publishOnError: true includeForks: true - # Source build - - template: /eng/common/templates/job/source-build.yml - parameters: - platform: - name: 'Managed' - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64' + # Source build - TEMPORARY: Disabled for testing Helix dedup + - ${{ if false }}: + - template: /eng/common/templates/job/source-build.yml + parameters: + platform: + name: 'Managed' + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64' buildScript: './eng/build.sh' buildArguments: '--source-build $(_InternalRuntimeDownloadArgs)' jobProperties: From 1791b1a2a149cc530340aa37420e5a9ac73e212d Mon Sep 17 00:00:00 2001 From: Aditya Mandaleeka Date: Sat, 6 Dec 2025 21:18:42 -0800 Subject: [PATCH 4/8] Restore in the subsets. --- .azure/pipelines/ci-public.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure/pipelines/ci-public.yml b/.azure/pipelines/ci-public.yml index fedce923731b..28ee0c6072bf 100644 --- a/.azure/pipelines/ci-public.yml +++ b/.azure/pipelines/ci-public.yml @@ -616,7 +616,7 @@ stages: artifact: Helix_NuGet_Packages path: $(Build.SourcesDirectory)/.packages # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the build job. - - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -all -noBuildRepoTasks -noBuildNative -noBuild -test + - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -restore -all -noBuildRepoTasks -noBuildNative -noBuild -test -projects eng\helix\helix.proj /p:IsHelixPRCheck=true /p:IsHelixJob=true /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) /p:VsTestUseMSBuildOutput=false /p:RunTemplateTests=false /p:HelixSubset=1 @@ -652,7 +652,7 @@ stages: artifact: Helix_NuGet_Packages path: $(Build.SourcesDirectory)/.packages # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the build job. - - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -all -noBuildRepoTasks -noBuildNative -noBuild -test + - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -restore -all -noBuildRepoTasks -noBuildNative -noBuild -test -projects eng\helix\helix.proj /p:IsHelixPRCheck=true /p:IsHelixJob=true /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) /p:VsTestUseMSBuildOutput=false /p:RunTemplateTests=false /p:HelixSubset=2 From e65f1b07e526662a30eff4747a6d04d9c803c31b Mon Sep 17 00:00:00 2001 From: Aditya Mandaleeka Date: Sun, 7 Dec 2025 23:44:05 -0800 Subject: [PATCH 5/8] Try building test projs. --- .azure/pipelines/ci-public.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.azure/pipelines/ci-public.yml b/.azure/pipelines/ci-public.yml index 28ee0c6072bf..c8008bf4c27a 100644 --- a/.azure/pipelines/ci-public.yml +++ b/.azure/pipelines/ci-public.yml @@ -574,11 +574,11 @@ stages: agentOs: Windows timeoutInMinutes: 120 steps: - # Build the shared framework - - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -nobl -all -pack -arch x64 + # Build the shared framework and test projects (but don't run tests) + - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -nobl -all -pack -test -arch x64 /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) - /p:VsTestUseMSBuildOutput=false - displayName: Build shared fx + /p:VsTestUseMSBuildOutput=false /p:Test=false + displayName: Build shared fx and test projects - task: PublishPipelineArtifact@1 displayName: Publish Helix build artifacts inputs: @@ -615,7 +615,7 @@ stages: inputs: artifact: Helix_NuGet_Packages path: $(Build.SourcesDirectory)/.packages - # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the build job. + # -noBuildRepoTasks -noBuildNative -noBuild to reuse builds from the build job. - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -restore -all -noBuildRepoTasks -noBuildNative -noBuild -test -projects eng\helix\helix.proj /p:IsHelixPRCheck=true /p:IsHelixJob=true /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) @@ -651,7 +651,7 @@ stages: inputs: artifact: Helix_NuGet_Packages path: $(Build.SourcesDirectory)/.packages - # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the build job. + # -noBuildRepoTasks -noBuildNative -noBuild to reuse builds from the build job. - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -restore -all -noBuildRepoTasks -noBuildNative -noBuild -test -projects eng\helix\helix.proj /p:IsHelixPRCheck=true /p:IsHelixJob=true /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) From 7bdd1cea042e0016da38a36125149581abefb404 Mon Sep 17 00:00:00 2001 From: Aditya Mandaleeka Date: Mon, 8 Dec 2025 17:10:26 -0800 Subject: [PATCH 6/8] Undo prior change and remove template tests from this job. --- .azure/pipelines/ci-public.yml | 12 ++++++------ eng/Build.props | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.azure/pipelines/ci-public.yml b/.azure/pipelines/ci-public.yml index c8008bf4c27a..28ee0c6072bf 100644 --- a/.azure/pipelines/ci-public.yml +++ b/.azure/pipelines/ci-public.yml @@ -574,11 +574,11 @@ stages: agentOs: Windows timeoutInMinutes: 120 steps: - # Build the shared framework and test projects (but don't run tests) - - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -nobl -all -pack -test -arch x64 + # Build the shared framework + - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -nobl -all -pack -arch x64 /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) - /p:VsTestUseMSBuildOutput=false /p:Test=false - displayName: Build shared fx and test projects + /p:VsTestUseMSBuildOutput=false + displayName: Build shared fx - task: PublishPipelineArtifact@1 displayName: Publish Helix build artifacts inputs: @@ -615,7 +615,7 @@ stages: inputs: artifact: Helix_NuGet_Packages path: $(Build.SourcesDirectory)/.packages - # -noBuildRepoTasks -noBuildNative -noBuild to reuse builds from the build job. + # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the build job. - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -restore -all -noBuildRepoTasks -noBuildNative -noBuild -test -projects eng\helix\helix.proj /p:IsHelixPRCheck=true /p:IsHelixJob=true /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) @@ -651,7 +651,7 @@ stages: inputs: artifact: Helix_NuGet_Packages path: $(Build.SourcesDirectory)/.packages - # -noBuildRepoTasks -noBuildNative -noBuild to reuse builds from the build job. + # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the build job. - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -restore -all -noBuildRepoTasks -noBuildNative -noBuild -test -projects eng\helix\helix.proj /p:IsHelixPRCheck=true /p:IsHelixJob=true /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) diff --git a/eng/Build.props b/eng/Build.props index 764f8847521d..d373055a4bf2 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -270,7 +270,6 @@ $(RepoRoot)src\HealthChecks\**\*.csproj; $(RepoRoot)src\Testing\**\*.csproj; $(RepoRoot)src\Grpc\**\*.csproj; - $(RepoRoot)src\ProjectTemplates\**\*.csproj; $(RepoRoot)src\Extensions\**\*.csproj; $(RepoRoot)src\OpenApi\**\*.csproj; $(RepoRoot)src\Validation\**\*.csproj; From 53b2ef4b7ade1639d0f16635a710cfe7f6eb1e4b Mon Sep 17 00:00:00 2001 From: Aditya Mandaleeka Date: Mon, 8 Dec 2025 17:17:38 -0800 Subject: [PATCH 7/8] Exclude a couple of tests on Helix. --- .../Hosting/test/Microsoft.AspNetCore.Hosting.Tests.csproj | 2 ++ .../CORS/test/UnitTests/Microsoft.AspNetCore.Cors.Test.csproj | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Hosting/Hosting/test/Microsoft.AspNetCore.Hosting.Tests.csproj b/src/Hosting/Hosting/test/Microsoft.AspNetCore.Hosting.Tests.csproj index 866a08e32b43..d42f016fa831 100644 --- a/src/Hosting/Hosting/test/Microsoft.AspNetCore.Hosting.Tests.csproj +++ b/src/Hosting/Hosting/test/Microsoft.AspNetCore.Hosting.Tests.csproj @@ -4,6 +4,8 @@ $(DefaultNetCoreTargetFramework) $(NoWarn);EXTEXP0003 + + false diff --git a/src/Middleware/CORS/test/UnitTests/Microsoft.AspNetCore.Cors.Test.csproj b/src/Middleware/CORS/test/UnitTests/Microsoft.AspNetCore.Cors.Test.csproj index 0d02c5bed4a4..8c4e1718c283 100644 --- a/src/Middleware/CORS/test/UnitTests/Microsoft.AspNetCore.Cors.Test.csproj +++ b/src/Middleware/CORS/test/UnitTests/Microsoft.AspNetCore.Cors.Test.csproj @@ -2,6 +2,8 @@ $(DefaultNetCoreTargetFramework) + + false From 4868f9646543e2d44a4ad353986ec6c3c3a2738d Mon Sep 17 00:00:00 2001 From: Aditya Mandaleeka Date: Mon, 8 Dec 2025 18:52:03 -0800 Subject: [PATCH 8/8] Avoid creating payloads for delayed projects when running subset. --- src/BuildAfterTargetingPack/BuildAfterTargetingPack.csproj | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/BuildAfterTargetingPack/BuildAfterTargetingPack.csproj b/src/BuildAfterTargetingPack/BuildAfterTargetingPack.csproj index 49a8a3b6431e..85c1154ff2f0 100644 --- a/src/BuildAfterTargetingPack/BuildAfterTargetingPack.csproj +++ b/src/BuildAfterTargetingPack/BuildAfterTargetingPack.csproj @@ -57,9 +57,14 @@ +