From 2bdd66268d8b481e0fdc7f4a9d379b789d040a41 Mon Sep 17 00:00:00 2001 From: maraf Date: Fri, 17 Apr 2026 10:51:20 +0000 Subject: [PATCH 01/16] Pack CoreCLR WBT native-build files as Helix payload Wire up the CoreCLR browser WBT Helix leg so that per-app native relink can run on Helix workers: - Add a dedicated HelixCorrelationPayload ItemGroup for the CoreCLR flavor that ships eng/native.wasm.targets and eng/AcquireEmscriptenSdk.targets next to BrowserBuildTargetsDir (BrowserWasmApp.CoreCLR.targets' import chain needs them). - Hoist Microsoft.NET.Sdk.WebAssembly.Pack (WasmSdkTargets/WasmSdkTools) out of the Mono-only block into the shared NeedsEMSDK block so 'dotnet new wasmbrowser' resolves on CoreCLR workers too. - Export REPOSITORY_ENGINEERING_DIR, EMSDK_PATH, WASM_BUILD_SUPPORT_DIR and WASM_APP_BUILDER_DIR from the generated RunScriptTemplate so the CoreCLR relink targets can locate their tool payloads on Helix. - Resolve and bridge those values through BuildEnvironment + EnvironmentVariables so local 'dotnet test' runs without Helix still find the locally built targets/emsdk. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/libraries/sendtohelix-browser.targets | 41 +++++++++++++++++-- .../Common/BuildEnvironment.cs | 14 +++++++ .../Common/EnvironmentVariables.cs | 4 ++ .../Wasm.Build.Tests/Wasm.Build.Tests.csproj | 18 ++++++++ .../data/Local.Directory.Build.props | 21 +++++++++- .../data/Local.Directory.Build.targets | 14 +++++++ .../data/RunScriptTemplate.cmd | 14 +++++++ .../data/RunScriptTemplate.sh | 14 +++++++ 8 files changed, 136 insertions(+), 4 deletions(-) diff --git a/src/libraries/sendtohelix-browser.targets b/src/libraries/sendtohelix-browser.targets index 3db4fb049625a5..bc76ee7c0dd9ae 100644 --- a/src/libraries/sendtohelix-browser.targets +++ b/src/libraries/sendtohelix-browser.targets @@ -62,6 +62,8 @@ true true + + true false true true @@ -135,6 +137,27 @@ + + + + + + + + + + + + + + + $(RepositoryEngineeringDir)testing\scenarios\BuildWasmAppsJobsList.txt $(RepositoryEngineeringDir)testing\scenarios\BuildWasmAppsJobsListCoreCLR.txt @@ -214,15 +237,27 @@ - + + + + + + + + + + - - + + + + diff --git a/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs b/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs index 8bdb3cd76134d7..77be019fbfaf5b 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs @@ -151,6 +151,20 @@ public BuildEnvironment() // EnvVars["WasmTestForwardConsole"] = "true"; // only necessary for firefox, because chromedriver supports it natively // EnvVars["WasmTestAsyncFlushOnExit"] = "true"; // only necessary for old nodejs versions // EnvVars["WasmTestAppendElementOnExit"] = "true"; // only used by xharness // https://github.com/dotnet/xharness/blob/799df8d4c86ff50c83b7a57df9e3691eeab813ec/src/Microsoft.DotNet.XHarness.CLI/Commands/WASM/Browser/WasmBrowserTestRunner.cs#L122-L141 + + // Flow paths required by BrowserWasmApp.CoreCLR.targets into the dotnet-new-generated + // test project builds so its import chain (native.wasm.targets / AcquireEmscriptenSdk.targets) + // and UsingTask for WasmAppBuilder.dll resolve on both Helix and local runs. + // Names match those read by data/Local.Directory.Build.{props,targets}; MSBuild exposes + // env vars as properties with the same name, so SCREAMING_SNAKE keys stay consistent. + if (!string.IsNullOrEmpty(EnvironmentVariables.RepositoryEngineeringDir)) + EnvVars["REPOSITORY_ENGINEERING_DIR"] = EnvironmentVariables.RepositoryEngineeringDir; + if (!string.IsNullOrEmpty(EnvironmentVariables.BrowserBuildTargetsDir)) + EnvVars["BROWSER_BUILD_TARGETS_DIR"] = EnvironmentVariables.BrowserBuildTargetsDir; + if (!string.IsNullOrEmpty(EnvironmentVariables.WasmAppBuilderTasksAssemblyPath)) + EnvVars["WASM_APP_BUILDER_TASKS_ASSEMBLY_PATH"] = EnvironmentVariables.WasmAppBuilderTasksAssemblyPath; + if (!string.IsNullOrEmpty(EnvironmentVariables.EmsdkPath)) + EnvVars["EMSDK_PATH"] = EnvironmentVariables.EmsdkPath; } DotNet = Path.Combine(sdkForWorkloadPath!, "dotnet"); diff --git a/src/mono/wasm/Wasm.Build.Tests/Common/EnvironmentVariables.cs b/src/mono/wasm/Wasm.Build.Tests/Common/EnvironmentVariables.cs index fb12b0830c7a0f..c121945a78c226 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Common/EnvironmentVariables.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Common/EnvironmentVariables.cs @@ -28,5 +28,9 @@ internal static class EnvironmentVariables internal static readonly string? WasiSdkPath = Environment.GetEnvironmentVariable("WASI_SDK_PATH"); internal static readonly bool WorkloadsTestPreviousVersions = Environment.GetEnvironmentVariable("WORKLOADS_TEST_PREVIOUS_VERSIONS") is "true"; internal static readonly string? RuntimeFlavor = Environment.GetEnvironmentVariable("RUNTIME_FLAVOR_FOR_TESTS"); + internal static readonly string? RepositoryEngineeringDir = Environment.GetEnvironmentVariable("REPOSITORY_ENGINEERING_DIR"); + internal static readonly string? BrowserBuildTargetsDir = Environment.GetEnvironmentVariable("BROWSER_BUILD_TARGETS_DIR"); + internal static readonly string? WasmAppBuilderTasksAssemblyPath = Environment.GetEnvironmentVariable("WASM_APP_BUILDER_TASKS_ASSEMBLY_PATH"); + internal static readonly string? EmsdkPath = Environment.GetEnvironmentVariable("EMSDK_PATH"); } } diff --git a/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj b/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj index 8eb86c51e5f93b..2faa2cedc0d48f 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj +++ b/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj @@ -111,6 +111,11 @@ <_SdkPathForLocalTesting Condition="'$(TestUsingWorkloads)' != 'true'">$([System.IO.Path]::GetDirectoryName($(SdkWithNoWorkloadForTestingPath))) <_SdkPathForLocalTesting>$([System.IO.Path]::GetFilename($(_SdkPathForLocalTesting))) + + + <_LocalEmsdkPathForTests Condition="'$(RuntimeFlavor)' == 'CoreCLR' and '$(EMSDK_PATH)' != ''">$(EMSDK_PATH) + <_LocalEmsdkPathForTests Condition="'$(RuntimeFlavor)' == 'CoreCLR' and '$(_LocalEmsdkPathForTests)' == ''">$([MSBuild]::NormalizeDirectory('$(BrowserProjectRoot)', 'emsdk')) @@ -142,6 +147,19 @@ + + + + + + + + + + + + + diff --git a/src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.props b/src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.props index 058246e4086204..253dc52772f6ba 100644 --- a/src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.props +++ b/src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.props @@ -1 +1,20 @@ - + + + + $(RUNTIME_FLAVOR_FOR_TESTS) + + + + $(REPOSITORY_ENGINEERING_DIR) + $(WASM_APP_BUILDER_TASKS_ASSEMBLY_PATH) + + \ No newline at end of file diff --git a/src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.targets b/src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.targets index 6f9b3ab9ef9994..e661632c3ebb33 100644 --- a/src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.targets +++ b/src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.targets @@ -2,4 +2,18 @@ + + + + <_CoreCLRBrowserBuildTargetsDir Condition="'$(BROWSER_BUILD_TARGETS_DIR)' != ''">$(BROWSER_BUILD_TARGETS_DIR) + + + diff --git a/src/mono/wasm/Wasm.Build.Tests/data/RunScriptTemplate.cmd b/src/mono/wasm/Wasm.Build.Tests/data/RunScriptTemplate.cmd index 0fe961d7e8199e..ebc35c4515d43a 100644 --- a/src/mono/wasm/Wasm.Build.Tests/data/RunScriptTemplate.cmd +++ b/src/mono/wasm/Wasm.Build.Tests/data/RunScriptTemplate.cmd @@ -70,6 +70,20 @@ if [%RUNTIME_FLAVOR%] NEQ [] ( set RUNTIME_FLAVOR_FOR_TESTS=%RUNTIME_FLAVOR% ) +:: CoreCLR WBT: ensure payload-relative paths remain set for the test process. +if [%REPOSITORY_ENGINEERING_DIR%] NEQ [] ( + set REPOSITORY_ENGINEERING_DIR=%REPOSITORY_ENGINEERING_DIR% +) +if [%BROWSER_BUILD_TARGETS_DIR%] NEQ [] ( + set BROWSER_BUILD_TARGETS_DIR=%BROWSER_BUILD_TARGETS_DIR% +) +if [%WASM_APP_BUILDER_TASKS_ASSEMBLY_PATH%] NEQ [] ( + set WASM_APP_BUILDER_TASKS_ASSEMBLY_PATH=%WASM_APP_BUILDER_TASKS_ASSEMBLY_PATH% +) +if [%EMSDK_PATH%] NEQ [] ( + set EMSDK_PATH=%EMSDK_PATH% +) + if [%HELIX_CORRELATION_PAYLOAD%] NEQ [] ( robocopy /mt /np /nfl /NDL /nc /e %BASE_DIR%\%SDK_DIR_NAME% %EXECUTION_DIR%\%SDK_DIR_NAME% set _SDK_DIR=%EXECUTION_DIR%\%SDK_DIR_NAME% diff --git a/src/mono/wasm/Wasm.Build.Tests/data/RunScriptTemplate.sh b/src/mono/wasm/Wasm.Build.Tests/data/RunScriptTemplate.sh index 9cac0dd1442ed3..fee3487daae1d2 100644 --- a/src/mono/wasm/Wasm.Build.Tests/data/RunScriptTemplate.sh +++ b/src/mono/wasm/Wasm.Build.Tests/data/RunScriptTemplate.sh @@ -55,6 +55,20 @@ function set_env_vars() export RUNTIME_FLAVOR_FOR_TESTS=$RUNTIME_FLAVOR fi + # CoreCLR WBT: make payload-relative paths visible to any child process that calls this helper. + if [[ -n "$REPOSITORY_ENGINEERING_DIR" ]]; then + export REPOSITORY_ENGINEERING_DIR + fi + if [[ -n "$BROWSER_BUILD_TARGETS_DIR" ]]; then + export BROWSER_BUILD_TARGETS_DIR + fi + if [[ -n "$WASM_APP_BUILDER_TASKS_ASSEMBLY_PATH" ]]; then + export WASM_APP_BUILDER_TASKS_ASSEMBLY_PATH + fi + if [[ -n "$EMSDK_PATH" ]]; then + export EMSDK_PATH + fi + local _SDK_DIR= if [[ -n "$HELIX_WORKITEM_UPLOAD_ROOT" ]]; then cp -r $BASE_DIR/$SDK_DIR_NAME $EXECUTION_DIR From 1c405ae1e7f558a53da4535aaca128d36be3f040 Mon Sep 17 00:00:00 2001 From: maraf Date: Fri, 17 Apr 2026 10:51:34 +0000 Subject: [PATCH 02/16] Introduce native-coreclr WBT category and enable first test class All WBT tests tagged [TestCategory("native")] are excluded on CoreCLR by Wasm.Build.Tests.csproj's trait filter. Now that the CoreCLR native relink payload ships to Helix, seed a small CoreCLR-enabled subset via a new trait category: - Replace class-level [TestCategory("native")] with [TestCategory("native-coreclr")] on Wasm.Build.Templates.Tests.NativeBuildTests (both methods are non-AOT and exercise native relink via the wasmbrowser template). - Add Wasm.Build.Templates.Tests.NativeBuildTests to the CoreCLR WBT jobs list so xharness discovers and schedules it. xunit trait filter semantics: '-notrait category=native' excludes any test that carries the 'native' trait on its class or method. Class+ method traits merge, so dual-tagging does not work -- tags must be replaced, not added, to enable a test on CoreCLR. The existing '-notrait category=native -notrait category=mono -notrait category=workload' filter already allows 'native-coreclr' through, so no csproj change is required. Mono coverage is preserved: Mono's xunit invocation does not filter on category=native*, so retagging leaves the tests running on Mono unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt | 1 + src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt b/eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt index 4f567f5cba1082..e9fd3fdaa77399 100644 --- a/eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt +++ b/eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt @@ -12,3 +12,4 @@ Wasm.Build.Tests.WasmRunOutOfAppBundleTests Wasm.Build.Tests.WasmTemplateTests Wasm.Build.Tests.MaxParallelDownloadsTests Wasm.Build.Tests.LibraryInitializerTests +Wasm.Build.Templates.Tests.NativeBuildTests diff --git a/src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs b/src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs index 34a81b98004a9d..e9eaf719f08825 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs @@ -11,7 +11,7 @@ namespace Wasm.Build.Templates.Tests { - [TestCategory("native")] + [TestCategory("native-coreclr")] public class NativeBuildTests : WasmTemplateTestsBase { public NativeBuildTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) From e0b758c7bc383fc928ecdff1243fb7e9e333a23d Mon Sep 17 00:00:00 2001 From: maraf Date: Fri, 17 Apr 2026 10:55:57 +0000 Subject: [PATCH 03/16] [DO NOT MERGE] runtime.yml: trim to WBT-only for PR testing Scratch pipeline to accelerate iteration on WBT changes. Keeps only: Build stage: - browser_wasm / browser_wasm_win CoreCLR runtime pack build (nameSuffix: CoreCLR, publishes WBT artifacts) - browser-wasm-coreclr-build-tests runner (alwaysRun: true) - browser_wasm / browser_wasm_win Mono runtime pack builds (SingleThreaded + MultiThreaded, publishes WBT artifacts) - browser-wasm-build-tests runner (alwaysRun: true) Removed: all other product builds, NativeAOT, runtime tests, library tests, installer tests, Android/iOS/MacCatalyst/Mono interp/Minijit test legs. Path-filter conditions on the remaining WBT build jobs are simplified so everything runs unconditionally on PR. Revert this commit before merging to main. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/pipelines/runtime.yml | 1961 +------------------------------------ 1 file changed, 24 insertions(+), 1937 deletions(-) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 461e9b3611295c..d8e95b723363a1 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -67,43 +67,6 @@ extends: - stage: Build jobs: - # - # Build CoreCLR verticals where we don't run host tests - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - linux_musl_arm - - linux_musl_arm64 - - windows_arm64 - - linux_arm - jobParameters: - nameSuffix: AllSubsets_CoreCLR_ReleaseRuntimeLibs - buildArgs: -s clr+libs+host+packs -rc Release -lc Release -c $(_BuildConfig) - timeoutInMinutes: 120 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - linux_arm64 - - linux_musl_x64 - jobParameters: - nameSuffix: AllSubsets_CoreCLR - buildArgs: -s clr+libs+host+packs -rc Release -c Release -lc $(_BuildConfig) - timeoutInMinutes: 120 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), - eq(variables['isRollingBuild'], true)) - # Release build of browser wasm for WBT - template: /eng/pipelines/common/platform-matrix.yml parameters: @@ -126,107 +89,6 @@ extends: parameters: testGroup: innerloop liveLibrariesBuildConfig: Release - condition: >- - or( - eq(variables['wasmDarcDependenciesChanged'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_wasm_coreclr_runtimetests.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_wasmbuildtests.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: checked - platforms: - - browser_wasm - jobParameters: - nameSuffix: CoreCLR_ReleaseLibraries - buildArgs: -s clr+libs+libs.tests+packs -c Release -rc $(_BuildConfig) /p:TestAssemblies=false /p:ArchiveTests=true /p:InstallWorkloadForTesting=false - timeoutInMinutes: 120 - postBuildSteps: - - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml - parameters: - extraBuildArgs: -os browser - - 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 - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/helix - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: CoreCLR_ReleaseLibraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - - template: /eng/pipelines/common/wasm-post-build-steps.yml - parameters: - publishArtifactsForWorkload: true - publishWBT: true - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - parameters: - testGroup: innerloop - liveLibrariesBuildConfig: Release - - template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml - parameters: - testGroup: innerloop - condition: >- - or( - eq(variables['wasmDarcDependenciesChanged'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_wasm_coreclr_runtimetests.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: checked - platforms: - - browser_wasm_win - jobParameters: - nameSuffix: CoreCLR_ReleaseLibraries - buildArgs: -s clr+libs+libs.tests+packs -c Release -rc $(_BuildConfig) /p:TestAssemblies=false /p:ArchiveTests=true /p:InstallWorkloadForTesting=false - timeoutInMinutes: 120 - 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 - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/helix - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: CoreCLR_ReleaseLibraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - - template: /eng/pipelines/common/wasm-post-build-steps.yml - parameters: - publishArtifactsForWorkload: true - publishWBT: true - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - parameters: - testGroup: innerloop - liveLibrariesBuildConfig: Release - condition: >- - or( - eq(variables['wasmDarcDependenciesChanged'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_wasm_coreclr_runtimetests.containsChange'], true), - eq(variables['isRollingBuild'], true)) # Browser Wasm.Build.Tests - template: /eng/pipelines/common/templates/browser-wasm-coreclr-build-tests.yml @@ -234,1813 +96,38 @@ extends: platforms: - browser_wasm - browser_wasm_win - alwaysRun: ${{ variables.isRollingBuild }} + alwaysRun: true extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - # - # Build CoreCLR and Libraries with Libraries tests - # For running libraries tests and installer tests - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - linux_x64 - - linux_musl_x64 - - osx_arm64 - - windows_x64 - jobParameters: - nameSuffix: CoreCLR_Libraries - buildArgs: -s clr+libs+libs.tests -rc Release -c $(_BuildConfig) /p:ArchiveTests=true - timeoutInMinutes: 120 - 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_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - displayName: Build Assets - - template: /eng/pipelines/common/upload-artifact-step.yml - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/helix - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: CoreCLR_Libraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: - - windows_x86 - jobParameters: - nameSuffix: CoreCLR_Libraries - buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true - timeoutInMinutes: 120 - 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_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - displayName: Build Assets - - template: /eng/pipelines/common/upload-artifact-step.yml - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/helix - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: CoreCLR_Libraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Build CoreCLR and Libraries - # For running installer tests - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: - - osx_x64 - jobParameters: - nameSuffix: CoreCLR_Libraries - buildArgs: -s clr+libs -c $(_BuildConfig) - timeoutInMinutes: 120 - 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_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - displayName: Build Assets - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Build CoreCLR and Libraries with the respective tests - # for the test configurations we run. - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - linux_arm64 - - osx_arm64 - jobParameters: - nameSuffix: Libraries_CheckedCoreCLR - buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) -rc Checked /p:ArchiveTests=true - timeoutInMinutes: 120 - postBuildSteps: - - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml - - 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 - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/helix - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: Libraries_CheckedCoreCLR_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml - parameters: - testGroup: innerloop - configOverride: Checked - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - linux_x64 - - windows_x64 - jobParameters: - nameSuffix: Libraries_CheckedCoreCLR - buildArgs: -s clr+clr.wasmjit+libs -c $(_BuildConfig) -rc Checked - timeoutInMinutes: 120 - postBuildSteps: - - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml - - 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 - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml - parameters: - testGroup: innerloop - configOverride: Checked - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - linux_musl_x64 - - windows_x86 - jobParameters: - nameSuffix: Libraries_CheckedCoreCLR - buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) -rc Checked /p:ArchiveTests=true - timeoutInMinutes: 120 - 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 - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/helix - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: Libraries_CheckedCoreCLR_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - osx_x64 - jobParameters: - nameSuffix: Libraries_CheckedCoreCLR - buildArgs: -s clr+libs -c $(_BuildConfig) -rc Checked - timeoutInMinutes: 120 - postBuildSteps: - - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml - - 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 - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml - parameters: - testGroup: innerloop - configOverride: Checked - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: checked - platforms: - - linux_arm - - windows_arm64 - - windows_x86 - jobParameters: - nameSuffix: CoreCLR_ReleaseLibraries - buildArgs: -s clr+libs -rc $(_BuildConfig) -c Release - timeoutInMinutes: 120 - postBuildSteps: - - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml - - 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 - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml - parameters: - testGroup: innerloop - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: checked - platforms: - - linux_x64 - - linux_musl_arm - - linux_musl_arm64 - - windows_x64 - jobParameters: - nameSuffix: CoreCLR_ReleaseLibraries - buildArgs: -s clr+libs+libs.tests -rc $(_BuildConfig) -c Release /p:ArchiveTests=true - timeoutInMinutes: 120 - 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 - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/helix - includeRootFolder: false - archiveType: $(archiveType) - archiveExtension: $(archiveExtension) - tarCompression: $(tarCompression) - artifactName: CoreCLR_ReleaseLibraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Build the whole product using GNU compiler toolchain - # When CoreCLR, Mono, Libraries, Installer and src/tests are changed - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: checked - platforms: - - gcc_linux_x64 - jobParameters: - testGroup: innerloop - nameSuffix: Native_GCC - buildArgs: -s clr.native+libs.native+mono+host.native -c $(_BuildConfig) -gcc - postBuildSteps: - - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests.yml - parameters: - testBuildArgs: skipmanaged skipgeneratelayout skiprestorepackages -gcc - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Build CoreCLR and run crossgen on S.P.CoreLib - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: checked - runtimeFlavor: coreclr - platforms: - - linux_x86 - jobParameters: - testScope: innerloop - nameSuffix: CoreCLR - buildArgs: -s clr.runtime+clr.jit+clr.iltools+clr.spmi+clr.corelib+clr.nativecorelib -c $(_BuildConfig) - timeoutInMinutes: 120 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Build CoreCLR as a non-portable build - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: checked - runtimeFlavor: coreclr - platforms: - - tizen_armel - jobParameters: - testScope: innerloop - nameSuffix: CoreCLR_NonPortable - buildArgs: -s clr.native+clr.tools+clr.corelib+clr.nativecorelib+clr.aot+clr.packages --targetrid tizen.9.0.0-armel -c $(_BuildConfig) /p:PortableBuild=false - timeoutInMinutes: 120 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Build CoreCLR + Libs + Host - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - runtimeFlavor: coreclr - platforms: - - freebsd_x64 - - linux_riscv64 - - linux_loongarch64 - jobParameters: - testScope: innerloop - nameSuffix: CoreCLR_Bootstrapped - buildArgs: -s clr+libs+host+packs+tools.cdac -c $(_BuildConfig) -rc Checked --bootstrap - timeoutInMinutes: 120 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # CoreCLR NativeAOT debug build and smoke tests - # Only when CoreCLR is changed - # - - 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 - buildConfig: Debug - platforms: - - linux_x64 - - windows_x64 - variables: - - name: timeoutPerTestInMinutes - value: 60 - - name: timeoutPerTestCollectionInMinutes - value: 180 - jobParameters: - timeoutInMinutes: 180 - nameSuffix: NativeAOT - buildArgs: -s clr.aot+libs -rc $(_BuildConfig) -lc Release /p:RunAnalyzers=false - postBuildSteps: - - template: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml - parameters: - creator: dotnet-bot - testBuildArgs: nativeaot tree nativeaot - liveLibrariesBuildConfig: Release - testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - parameters: - testGroup: innerloop - liveLibrariesBuildConfig: Release - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # CoreCLR NativeAOT checked build and smoke tests - # Only when CoreCLR is changed - # - - template: /eng/pipelines/common/platform-matrix.yml + # For Wasm.Build.Tests - runtime pack builds + - template: /eng/pipelines/common/templates/wasm-build-only.yml parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - buildConfig: Checked platforms: - - windows_x64 - variables: - - name: timeoutPerTestInMinutes - value: 60 - - name: timeoutPerTestCollectionInMinutes - value: 180 - jobParameters: - timeoutInMinutes: 180 - nameSuffix: NativeAOT - buildArgs: -s clr.aot+libs.native+libs.sfx -rc $(_BuildConfig) -lc Release /p:RunAnalyzers=false - postBuildSteps: - - template: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml - parameters: - creator: dotnet-bot - testBuildArgs: 'nativeaot tree ";nativeaot;Loader;Interop;async;" /p:BuildNativeAotFrameworkObjects=true' - liveLibrariesBuildConfig: Release - testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - parameters: - testGroup: innerloop - liveLibrariesBuildConfig: Release - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), - eq(variables['isRollingBuild'], true)) + - browser_wasm + - browser_wasm_win + condition: true + nameSuffix: SingleThreaded + extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + publishArtifactsForWorkload: true + publishWBT: true - # - # CoreCLR NativeAOT release build and smoke tests - # Only when CoreCLR is changed - # - - template: /eng/pipelines/common/platform-matrix.yml + - template: /eng/pipelines/common/templates/wasm-build-only.yml parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - buildConfig: Release platforms: - - linux_x64 - - windows_x64 - - osx_arm64 - - linux_arm64 - - windows_arm64 - variables: - - name: timeoutPerTestInMinutes - value: 60 - - name: timeoutPerTestCollectionInMinutes - value: 180 - jobParameters: - testGroup: innerloop - timeoutInMinutes: 180 - nameSuffix: NativeAOT - buildArgs: -s clr.aot+libs+tools.illink -c $(_BuildConfig) -rc $(_BuildConfig) -lc Release /p:RunAnalyzers=false - postBuildSteps: - - template: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml - parameters: - creator: dotnet-bot - testBuildArgs: 'nativeaot tree ";nativeaot;tracing/eventpipe/providervalidation;"' - liveLibrariesBuildConfig: Release - testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - parameters: - testGroup: innerloop - liveLibrariesBuildConfig: Release - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), - eq(variables['isRollingBuild'], true)) + - browser_wasm + - browser_wasm_win + condition: true + nameSuffix: MultiThreaded + extraBuildArgs: /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + publishArtifactsForWorkload: true + publishWBT: false - # - # CoreCLR NativeAOT release build and libraries tests - # Only when CoreCLR or library is changed - # - - template: /eng/pipelines/common/platform-matrix.yml + # Browser Wasm.Build.Tests + - template: /eng/pipelines/common/templates/browser-wasm-build-tests.yml parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release platforms: - - windows_arm64 - - linux_arm64 - - osx_arm64 - jobParameters: - testGroup: innerloop - isSingleFile: true - nameSuffix: NativeAOT_Libraries - buildArgs: -s clr.aot+libs+libs.tests -c $(_BuildConfig) /p:TestNativeAot=true /p:RunSmokeTestsOnly=true /p:ArchiveTests=true /p:RunAnalyzers=false - timeoutInMinutes: 240 # Doesn't actually take long, but we've seen the ARM64 Helix queue often get backlogged for 2+ hours - # extra steps, run tests - postBuildSteps: - - template: /eng/pipelines/libraries/helix.yml - parameters: - creator: dotnet-bot - testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), - eq(variables['isRollingBuild'], true)) + - browser_wasm + - browser_wasm_win + alwaysRun: true + extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - # Build and test clr tools - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: checked - platforms: - - linux_x64 - jobParameters: - timeoutInMinutes: 120 - nameSuffix: CLR_Tools_Tests - buildArgs: -s clr.aot+clr.iltools+clr.corelib+clr.nativecorelib+libs.sfx+clr.toolstests+tools.cdac+tools.cdactests -c $(_BuildConfig) -test - enablePublishTestResults: true - testResultsFormat: 'xunit' - # We want to run AOT tests when illink changes because there's share code and tests from illink which are used by AOT - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_cdac.containsChange'], true), - eq(variables['isRollingBuild'], true)) - # - # Build CrossDacs - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: - - windows_x64 - variables: - - name: _archParameter - value: -arch x64,x86,arm,arm64 - jobParameters: - buildArgs: -s linuxdac+alpinedac -c Checked,$(_BuildConfig) - nameSuffix: CrossDac - isOfficialBuild: false - timeoutInMinutes: 60 - postBuildSteps: - - publish: $(Build.SourcesDirectory)/artifacts/bin/coreclr - displayName: Publish CrossDacs for diagnostics - artifact: CoreCLRCrossDacArtifacts - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # Build Mono AOT offset headers once, for validation - # Only when mono changed - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: - - android_x64 - - browser_wasm - - wasi_wasm - - ios_arm64 # tvos and ios use the same offsets so we only need to build once - - maccatalyst_x64 - variables: - - name: _osParameter - value: -os linux - - name: _archParameter - value: -arch x64 - jobParameters: - nameSuffix: MonoAOTOffsets - buildArgs: -s mono.aotcross -c $(_BuildConfig) /p:MonoGenerateOffsetsOSGroups=$(osGroup) /p:ValidateMonoOffsets=true - postBuildSteps: - # Upload offset files - - task: CopyFiles@2 - displayName: Collect offset files - condition: failed() - inputs: - sourceFolder: '$(Build.SourcesDirectory)/src/mono/mono/offsets' - contents: '*.h.new' - targetFolder: '$(Build.SourcesDirectory)/artifacts/obj/mono/offsetfiles/' - - - publish: '$(Build.SourcesDirectory)/artifacts/obj/mono/offsetfiles' - condition: failed() - artifact: MonoAOTOffsets_$(osGroup)$(osSubGroup) - displayName: Upload offset files - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # Build the whole product using Mono runtime - # Only when libraries, mono or installer are changed - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - runtimeFlavor: mono - platforms: - - tvossimulator_arm64 - - linux_x64 - - linux_arm - - linux_arm64 - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - linux_musl_x64 - - osx_x64 - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # WebAssembly legs - # - - template: /eng/pipelines/common/templates/wasm-library-tests.yml - parameters: - platforms: - - browser_wasm - alwaysRun: ${{ variables.isRollingBuild }} - extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - scenarios: - - WasmTestOnChrome - - WasmTestOnFirefox - - - template: /eng/pipelines/common/templates/wasm-library-tests.yml - parameters: - platforms: - - browser_wasm_win - alwaysRun: ${{ variables.isRollingBuild }} - extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - scenarios: - - WasmTestOnChrome - - # WebAssembly CoreCLR - - template: /eng/pipelines/common/templates/wasm-coreclr-library-tests.yml - parameters: - platforms: - - browser_wasm - alwaysRun: ${{ variables.isRollingBuild }} - extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - scenarios: - - WasmTestOnChrome - - # WebAssembly CoreCLR - smoke tests only on Firefox and V8 - - template: /eng/pipelines/common/templates/wasm-coreclr-library-tests.yml - parameters: - platforms: - - browser_wasm - alwaysRun: ${{ variables.isRollingBuild }} - shouldRunSmokeOnly: 'true' - nameSuffix: _SmokeFirefoxV8 - extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - scenarios: - - WasmTestOnFirefox - - WasmTestOnV8 - - # EAT Library tests - only run on linux - - template: /eng/pipelines/common/templates/wasm-library-aot-tests.yml - parameters: - platforms: - - browser_wasm - nameSuffix: _EAT - buildAOTOnHelix: false - runAOT: false - shouldRunSmokeOnly: false - alwaysRun: ${{ variables.isRollingBuild }} - extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) /maxcpucount:2 - - # AOT Library tests - - template: /eng/pipelines/common/templates/wasm-library-aot-tests.yml - parameters: - platforms: - - browser_wasm - - browser_wasm_win - nameSuffix: _Smoke_AOT - runAOT: true - buildAOTOnHelix: false - shouldRunSmokeOnly: true - alwaysRun: ${{ variables.isRollingBuild }} - extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - - # For Wasm.Build.Tests - runtime pack builds - - template: /eng/pipelines/common/templates/wasm-build-only.yml - parameters: - platforms: - - browser_wasm - - browser_wasm_win - condition: or(eq(variables.isRollingBuild, true), eq(variables.wasmSingleThreadedBuildOnlyNeededOnDefaultPipeline, true)) - nameSuffix: SingleThreaded - extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - publishArtifactsForWorkload: true - publishWBT: true - - - template: /eng/pipelines/common/templates/wasm-build-only.yml - parameters: - platforms: - - browser_wasm - - browser_wasm_win - condition: or(eq(variables.isRollingBuild, true), eq(variables.wasmSingleThreadedBuildOnlyNeededOnDefaultPipeline, true)) - nameSuffix: MultiThreaded - extraBuildArgs: /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - publishArtifactsForWorkload: true - publishWBT: false - - # Browser Wasm.Build.Tests - - template: /eng/pipelines/common/templates/browser-wasm-build-tests.yml - parameters: - platforms: - - browser_wasm - - browser_wasm_win - alwaysRun: ${{ variables.isRollingBuild }} - extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - - # Wasm runtime tests - - template: /eng/pipelines/common/templates/wasm-runtime-tests.yml - parameters: - platforms: - - browser_wasm - alwaysRun: ${{ variables.isRollingBuild }} - extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - - # WASI/WASM - - - template: /eng/pipelines/common/templates/wasm-build-only.yml - parameters: - platforms: - - wasi_wasm - - wasi_wasm_win - extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - condition: or(eq(variables.isRollingBuild, true), eq(variables.wasmSingleThreadedBuildOnlyNeededOnDefaultPipeline, true)) - publishArtifactsForWorkload: false - publishWBT: false - - # - # Android devices - # Build the whole product using Mono and run libraries tests - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - android_arm - - android_arm64 - variables: - # map dependencies variables to local variables - - name: librariesContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - - name: monoContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'] ] - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_Smoke - buildArgs: -s mono+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:EnableAdditionalTimezoneChecks=true - timeoutInMinutes: 120 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isRollingBuild'], true)) - # extra steps, run tests - postBuildSteps: - - template: /eng/pipelines/libraries/helix.yml - parameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_$(_BuildConfig) - condition: >- - or( - eq(variables['librariesContainsChange'], true), - eq(variables['monoContainsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Android arm64 devices and x64 emulators - # Build the whole product using CoreCLR and run functional tests - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: coreclr - platforms: - - android_x64 - - android_arm64 - variables: - # map dependencies variables to local variables - - name: librariesContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - - name: coreclrContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'] ] - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_CoreCLR_Smoke - buildArgs: -s clr.runtime+clr.alljits+clr.corelib+clr.nativecorelib+clr.tools+clr.packages+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true - timeoutInMinutes: 180 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isRollingBuild'], true)) - # extra steps, run tests - postBuildSteps: - - template: /eng/pipelines/libraries/helix.yml - parameters: - creator: dotnet-bot - testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig) - condition: >- - or( - eq(variables['librariesContainsChange'], true), - eq(variables['coreclrContainsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # iOS devices - Full AOT + AggressiveTrimming to reduce size - # Build the whole product using Mono and run libraries tests - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - ios_arm64 - variables: - # map dependencies variables to local variables - - name: librariesContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - - name: monoContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'] ] - - name: illinkContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'] ] - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_Smoke - buildArgs: -s mono+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true /p:RunSmokeTestsOnly=true /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=false /p:EnableAggressiveTrimming=true - timeoutInMinutes: 120 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), - eq(variables['isRollingBuild'], true)) - # extra steps, run tests - postBuildSteps: - - template: /eng/pipelines/libraries/helix.yml - parameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_$(_BuildConfig) - extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true - condition: >- - or( - eq(variables['librariesContainsChange'], true), - eq(variables['monoContainsChange'], true), - eq(variables['illinkContainsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # iOS devices - # Build the whole product using Native AOT and run libraries tests - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: coreclr - platforms: - - ios_arm64 - variables: - # map dependencies variables to local variables - - name: librariesContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - - name: coreclrContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'] ] - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_NativeAOT_Smoke - buildArgs: --cross -s clr.alljits+clr.tools+clr.nativeaotruntime+clr.nativeaotlibs+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:DevTeamProvisioning=- /p:BuildTestsOnHelix=true /p:UseNativeAOTRuntime=true /p:RunAOTCompilation=false /p:ContinuousIntegrationBuild=true - timeoutInMinutes: 180 - useNativeAOTRuntime: true - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isRollingBuild'], true)) - # extra steps, run tests - postBuildSteps: - - template: /eng/pipelines/libraries/helix.yml - parameters: - creator: dotnet-bot - testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) - extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true - condition: >- - or( - eq(variables['librariesContainsChange'], true), - eq(variables['coreclrContainsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # iOS devices - # Build the whole product using CoreCLR and run libraries tests - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: coreclr - platforms: - - ios_arm64 - variables: - # map dependencies variables to local variables - - name: librariesContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - - name: coreclrContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'] ] - - name: illinkContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'] ] - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_CoreCLR_Smoke - buildArgs: -s clr+clr.runtime+libs+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:UseMonoRuntime=false /p:UseNativeAOTRuntime=false /p:RunSmokeTestsOnly=true /p:BuildTestsOnHelix=true /p:UsePortableRuntimePack=false - timeoutInMinutes: 120 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), - eq(variables['isRollingBuild'], true)) - # extra steps, run tests - postBuildSteps: - - template: /eng/pipelines/libraries/helix.yml - parameters: - creator: dotnet-bot - testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig) - extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true - condition: >- - or( - eq(variables['librariesContainsChange'], true), - eq(variables['coreclrContainsChange'], true), - eq(variables['illinkContainsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # MacCatalyst interp - requires AOT Compilation and Interp flags - # Build the whole product using Mono and run libraries tests - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - maccatalyst_arm64 - variables: - # map dependencies variables to local variables - - name: librariesContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - - name: monoContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'] ] - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_Smoke - buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:DevTeamProvisioning=adhoc /p:RunAOTCompilation=true /p:MonoForceInterpreter=true - timeoutInMinutes: 180 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isRollingBuild'], true)) - # extra steps, run tests - postBuildSteps: - - template: /eng/pipelines/libraries/helix.yml - parameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_$(_BuildConfig) - condition: >- - or( - eq(variables['librariesContainsChange'], true), - eq(variables['monoContainsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # MacCatalyst - # Build the whole product using Native AOT and run libraries tests - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: coreclr - platforms: - - maccatalyst_arm64 - variables: - # map dependencies variables to local variables - - name: librariesContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - - name: coreclrContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'] ] - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_NativeAOT_Smoke - buildArgs: --cross -s clr.alljits+clr.tools+clr.nativeaotruntime+clr.nativeaotlibs+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:DevTeamProvisioning=adhoc /p:BuildTestsOnHelix=true /p:UseNativeAOTRuntime=true /p:RunAOTCompilation=false /p:ContinuousIntegrationBuild=true - timeoutInMinutes: 180 - useNativeAOTRuntime: true - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isRollingBuild'], true)) - # extra steps, run tests - postBuildSteps: - - template: /eng/pipelines/libraries/helix.yml - parameters: - creator: dotnet-bot - testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) - extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true - condition: >- - or( - eq(variables['librariesContainsChange'], true), - eq(variables['coreclrContainsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # MacCatalyst - # Build the whole product using CoreCLR and run libraries smoke tests - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release - runtimeFlavor: coreclr - platforms: - - maccatalyst_arm64 - variables: - # map dependencies variables to local variables - - name: librariesContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] - - name: coreclrContainsChange - value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'] ] - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_CoreCLR_Smoke - buildArgs: -s clr+clr.runtime+libs+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:DevTeamProvisioning=adhoc /p:UseMonoRuntime=false /p:UseNativeAOTRuntime=false /p:BuildTestsOnHelix=true - timeoutInMinutes: 180 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isRollingBuild'], true)) - # extra steps, run tests - postBuildSteps: - - template: /eng/pipelines/libraries/helix.yml - parameters: - creator: dotnet-bot - testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig) - extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true - condition: >- - or( - eq(variables['librariesContainsChange'], true), - eq(variables['coreclrContainsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Build Mono and Installer on LLVMAOT mode - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: Release - runtimeFlavor: mono - platforms: - - linux_x64 - - linux_arm64 - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_LLVMAOT - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - /p:MonoEnableLLVM=true /p:MonoAOTEnableLLVM=true /p:MonoBundleLLVMOptimizer=true - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - runtimeFlavor: mono - platforms: - - osx_x64 - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_LLVMAOT - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - /p:MonoEnableLLVM=true /p:MonoAOTEnableLLVM=true /p:MonoBundleLLVMOptimizer=true - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Build Mono debug - # Only when mono changed - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - runtimeFlavor: mono - buildConfig: debug - platforms: - - osx_x64 - - osx_arm64 - - linux_x64 - - linux_arm64 - # - linux_musl_arm64 - - windows_x64 - - windows_x86 - # - windows_arm64 - jobParameters: - nameSuffix: Mono_Runtime - buildArgs: -s mono -c $(_BuildConfig) - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Build Mono release AOT cross-compilers - # Only when mono changed - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - runtimeFlavor: mono - buildConfig: release - platforms: - - linux_x64 - - linux_musl_x64 - - linux_arm64 - - linux_musl_arm64 - - windows_arm64 - - windows_x64 - - osx_x64 - - osx_arm64 - jobParameters: - buildArgs: -c $(_BuildConfig) /p:DotNetBuildMonoCrossAOT=true - nameSuffix: CrossAOT_Mono - runtimeVariant: crossaot - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Build and test libraries for .NET Framework - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: Release - platforms: - - windows_x86 - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - jobParameters: - framework: net481 - buildArgs: -s tools+libs+libs.tests -framework net481 -c $(_BuildConfig) -testscope innerloop /p:ArchiveTests=true - nameSuffix: Libraries_NET481 - timeoutInMinutes: 150 - postBuildSteps: - - template: /eng/pipelines/libraries/helix.yml - parameters: - creator: dotnet-bot - testRunNamePrefixSuffix: NET481_$(_BuildConfig) - extraHelixArguments: /p:BuildTargetFramework=net481 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Build and test libraries for all TFMs and create packages - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - windows_x64 - jobParameters: - buildArgs: -test -s tools.illink+libs+libs.tests -pack -c $(_BuildConfig) /p:TestAssemblies=false /p:TestPackages=true - nameSuffix: Libraries_WithPackages - timeoutInMinutes: 150 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Installer Build and Test - # These are always built since they only take like 15 minutes - # we expect these to be done before we finish libraries or coreclr testing. - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - windows_x86 - - osx_x64 - helixQueuesTemplate: /eng/pipelines/installer/helix-queues-setup.yml - jobParameters: - nameSuffix: Installer_Build_And_Test - buildArgs: -s host+packs -c $(_BuildConfig) -lc Release -rc Release - dependsOnGlobalBuilds: - - nameSuffix: CoreCLR_Libraries - buildConfig: release - preBuildSteps: - - template: /eng/pipelines/common/download-artifact-step.yml - parameters: - artifactName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Release - artifactFileName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Release$(archiveExtension) - unpackFolder: $(Build.SourcesDirectory)/artifacts/bin - displayName: 'unified artifacts' - timeoutInMinutes: 150 - postBuildSteps: - - template: /eng/pipelines/installer/helix.yml - parameters: - creator: dotnet-bot - condition: - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: - - windows_x64 - - osx_arm64 - - linux_x64 - helixQueuesTemplate: /eng/pipelines/installer/helix-queues-setup.yml - jobParameters: - nameSuffix: Installer_Build_And_Test - buildArgs: -s host+packs -c $(_BuildConfig) -lc ${{ variables.debugOnPrReleaseOnRolling }} -rc Release - dependsOnGlobalBuilds: - - nameSuffix: CoreCLR_Libraries - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - preBuildSteps: - - template: /eng/pipelines/common/download-artifact-step.yml - parameters: - artifactName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(debugOnPrReleaseOnRolling) - artifactFileName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(debugOnPrReleaseOnRolling)$(archiveExtension) - unpackFolder: $(Build.SourcesDirectory)/artifacts/bin - displayName: 'unified artifacts' - timeoutInMinutes: 150 - postBuildSteps: - - template: /eng/pipelines/installer/helix.yml - parameters: - creator: dotnet-bot - condition: - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Build the whole product using Mono and run runtime tests - # - - 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 - buildConfig: Release - runtimeFlavor: mono - platforms: - - osx_x64 - - linux_arm64 - variables: - - name: timeoutPerTestInMinutes - value: 60 - - name: timeoutPerTestCollectionInMinutes - value: 180 - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_Minijit_RuntimeTests - runtimeVariant: minijit - buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release - timeoutInMinutes: 180 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - postBuildSteps: - - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml - parameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_Release - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - - # - # Build the whole product using Mono and run runtime tests - # - - 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 - buildConfig: Release - runtimeFlavor: mono - platforms: - - windows_x64 - variables: - - name: timeoutPerTestInMinutes - value: 60 - - name: timeoutPerTestCollectionInMinutes - value: 180 - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_Minijit_RuntimeTests - runtimeVariant: minijit - buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release -lc ${{ variables.debugOnPrReleaseOnRolling }} - timeoutInMinutes: 180 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - postBuildSteps: - - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml - parameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_Release - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - parameters: - liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - - # - # Mono CoreCLR runtime Test executions using live libraries in interpreter mode - # Only when Mono is changed - - - 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 - buildConfig: Release - runtimeFlavor: mono - platforms: - - osx_x64 - variables: - - name: timeoutPerTestInMinutes - value: 60 - - name: timeoutPerTestCollectionInMinutes - value: 180 - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_Interpreter_RuntimeTests - runtimeVariant: monointerpreter - buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release - timeoutInMinutes: 180 - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isRollingBuild'], true)) - postBuildSteps: - - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml - parameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_Release - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - # - # Mono CoreCLR runtime Test executions using live libraries and LLVM AOT - # Only when Mono is changed - # - - 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 - buildConfig: Release - runtimeFlavor: mono - platforms: - - linux_x64 - # Disabled pending outcome of https://github.com/dotnet/runtime/issues/60234 investigation - #- linux_arm64 - variables: - - name: timeoutPerTestInMinutes - value: 60 - - name: timeoutPerTestCollectionInMinutes - value: 180 - jobParameters: - testGroup: innerloop - nameSuffix: AllSubsets_Mono_LLVMAot_RuntimeTests - runtimeVariant: llvmaot - buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release /p:MonoEnableLLVM=true /p:MonoAOTEnableLLVM=true /p:MonoBundleLLVMOptimizer=true - timeoutInMinutes: 180 - - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isRollingBuild'], true)) - postBuildSteps: - - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml - parameters: - creator: dotnet-bot - llvmAotStepContainer: linux_x64_llvmaot - testRunNamePrefixSuffix: Mono_Release - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - - # - # CoreCLR Test builds using live libraries release build - # Only when CoreCLR is changed - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml - buildConfig: checked - platforms: - - CoreClrTestBuildHost # Either osx_x64 or linux_x64 - jobParameters: - testGroup: innerloop - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # CoreCLR Test executions using live libraries - # Only when CoreCLR is changed - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - buildConfig: checked - platforms: - - linux_arm - - windows_x86 - - windows_arm64 - helixQueueGroup: pr - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testGroup: innerloop - liveLibrariesBuildConfig: Release - unifiedArtifactsName: CoreCLR_ReleaseLibraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - unifiedBuildNameSuffix: CoreCLR_ReleaseLibraries - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - buildConfig: checked - platforms: - - browser_wasm - helixQueueGroup: pr - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testGroup: innerloop - liveLibrariesBuildConfig: Release - unifiedArtifactsName: CoreCLR_ReleaseLibraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - unifiedBuildNameSuffix: CoreCLR_ReleaseLibraries - extraBuildArgs: -os browser -p:HostConfiguration=Release - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - buildConfig: checked - platforms: - - osx_arm64 - - osx_x64 - - linux_x64 - - linux_arm64 - - windows_x64 - helixQueueGroup: pr - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - jobParameters: - testGroup: innerloop - liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - unifiedArtifactsName: Libraries_CheckedCoreCLR_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(debugOnPrReleaseOnRolling) - unifiedBuildNameSuffix: Libraries_CheckedCoreCLR - unifiedBuildConfigOverride: ${{ variables.debugOnPrReleaseOnRolling }} - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Libraries Release Test Execution against a release coreclr runtime - # Only when the PR contains a libraries change - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/run-test-job.yml - buildConfig: Release - platforms: - - windows_x86 - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - jobParameters: - isOfficialBuild: false - testScope: innerloop - liveRuntimeBuildConfig: release - unifiedArtifactsName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - helixArtifactsName: CoreCLR_Libraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - unifiedBuildNameSuffix: CoreCLR_Libraries - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Libraries Debug Test Execution against a release coreclr runtime - # Only when the PR contains a libraries change - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/run-test-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - windows_x64 - - osx_arm64 - - linux_x64 - - linux_musl_x64 - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - jobParameters: - isOfficialBuild: false - testScope: innerloop - liveRuntimeBuildConfig: release - unifiedArtifactsName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(debugOnPrReleaseOnRolling) - helixArtifactsName: CoreCLR_Libraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(debugOnPrReleaseOnRolling) - unifiedBuildNameSuffix: CoreCLR_Libraries - unifiedBuildConfigOverride: ${{ variables.debugOnPrReleaseOnRolling }} - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(variables['isRollingBuild'], true)) - # The next three jobs run checked coreclr + libraries tests. - # The matrix looks like the following, where the right columns specify which configurations - # the libraries tests are built in. - # ________________________________________ - # | Platform | PR | Rolling | - # | ---------------- | ------- | ------- | - # | linux-arm64 | Debug | Release | - # | windows-x86 | Debug | Release | - # | linux-musl-x64 | Debug | Release | - # | osx-arm64 | Debug | Release | - # | linux-musl-arm | Release | Release | - # | linux-musl-arm64 | Release | Release | - # | linux-x64 | Release | Release | - # | windows-x64 | Release | Release | - - # - # Debug (PR) / Release (rolling) Libraries Test Execution against a checked runtime - # Only when the PR contains a coreclr change - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/run-test-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - linux_arm64 - - windows_x86 - - linux_musl_x64 - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - helixQueueGroup: libraries - jobParameters: - testScope: innerloop - liveRuntimeBuildConfig: checked - unifiedArtifactsName: Libraries_CheckedCoreCLR_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - helixArtifactsName: Libraries_CheckedCoreCLR_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - unifiedBuildNameSuffix: Libraries_CheckedCoreCLR - condition: >- - or( - 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)) - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/libraries/run-test-job.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - platforms: - - osx_arm64 - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml - helixQueueGroup: libraries - jobParameters: - testScope: innerloop - liveRuntimeBuildConfig: checked - unifiedArtifactsName: Libraries_CheckedCoreCLR_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - helixArtifactsName: Libraries_CheckedCoreCLR_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) - unifiedBuildNameSuffix: Libraries_CheckedCoreCLR - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Build and test Mono Interpreter with the libraries testss - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - runtimeFlavor: mono - runtimeVariant: monointerpreter - platforms: - - linux_x64 - #- osx_x64 - #- windows_x64 - jobParameters: - testGroup: innerloop - nameSuffix: Mono_Interpreter_LibrariesTests - buildArgs: -s mono+libs+libs.tests -rc Release -c $(_BuildConfig) /p:ArchiveTests=true - timeoutInMinutes: 480 - # extra steps, run tests - postBuildSteps: - - template: /eng/pipelines/libraries/helix.yml - parameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_Interpreter_$(_BuildConfig) - interpreter: true - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), - eq(variables['isRollingBuild'], true)) - - # - # Build and test Mono Minijit with the libraries testss - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - runtimeFlavor: mono - platforms: - - linux_arm64 - - linux_x64 - - osx_x64 - #- windows_x64 - jobParameters: - testGroup: innerloop - nameSuffix: Mono_MiniJIT_LibrariesTests - buildArgs: -s mono+libs+libs.tests -rc Release -c $(_BuildConfig) /p:ArchiveTests=true - timeoutInMinutes: 480 - # extra steps, run tests - postBuildSteps: - - template: /eng/pipelines/libraries/helix.yml - parameters: - creator: dotnet-bot - testRunNamePrefixSuffix: Mono_Minijit_$(_BuildConfig) - condition: >- - or( - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), - eq(variables['isRollingBuild'], true)) From fb69e23306049def644113f22b642dbf0c20a9af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Fri, 17 Apr 2026 12:47:23 +0000 Subject: [PATCH 04/16] [DO NOT MERGE] Disable runtime-coreclr pipeline for PR testing Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/pipelines/coreclr/ci.yml | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/eng/pipelines/coreclr/ci.yml b/eng/pipelines/coreclr/ci.yml index 3d677aea8c6c5a..6fbd24a2d25976 100644 --- a/eng/pipelines/coreclr/ci.yml +++ b/eng/pipelines/coreclr/ci.yml @@ -1,25 +1,6 @@ -trigger: - batch: true - branches: - include: - - release/*.* - paths: - include: - - '*' - - src/libraries/System.Private.CoreLib/* - exclude: - - '**.md' - - .devcontainer/* - - .github/* - - docs/* - - LICENSE.TXT - - PATENTS.TXT - - THIRD-PARTY-NOTICES.TXT - - src/installer/* - - src/libraries/* - - eng/pipelines/installer/* - - eng/pipelines/libraries/* - - eng/pipelines/runtime.yml +trigger: none + +pr: none schedules: - cron: "0 9,18,1 * * *" # run at 9:00, 18:00 and 01:00 (UTC) which is 2:00, 11:00 and 18:00 (PST). From 760da0cf1fb0196e96719c1fb336565042def805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Fri, 17 Apr 2026 15:56:36 +0000 Subject: [PATCH 05/16] Provision emsdk for CoreCLR WBT Send-to-Helix CoreCLR_WasmBuildTests failed in 'Send to Helix' with sendtohelixhelp.proj(367,5): error : Could not find emsdk at , needed to provision for running tests on helix because $(EMSDK_PATH) was empty when StageDependenciesForHelix evaluated . Mono WBT agents have EMSDK_PATH set as a side-effect of the wasm runtime build; CoreCLR WBT agents only build Wasm.Build.Tests.csproj and do not provision emsdk. Mirror the sendtohelix-wasi.targets pattern: wrap the emsdk HelixDependenciesToStage item in a target that runs BeforeTargets=StageDependenciesForHelix with DependsOnTargets=AcquireEmscriptenSdkUnconditional so that emsdk is provisioned from NuGet packages (already referenced by AcquireEmscriptenSdk.targets) when EMSDK_PATH is not already set. No-op when EMSDK_PATH is already provided by the agent, so Mono WBT behavior is unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/libraries/sendtohelix-browser.targets | 25 ++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/libraries/sendtohelix-browser.targets b/src/libraries/sendtohelix-browser.targets index bc76ee7c0dd9ae..1e8d1cc89e8db3 100644 --- a/src/libraries/sendtohelix-browser.targets +++ b/src/libraries/sendtohelix-browser.targets @@ -90,14 +90,25 @@ <_HelixLocalNodePath Condition="'$(NeedsEMSDK)' == 'true' and '$(WindowsShell)' == 'true'">%HELIX_CORRELATION_PAYLOAD%\build\emsdk\node - - + - + DependsOnTargets="AcquireEmscriptenSdkUnconditional" + BeforeTargets="StageDependenciesForHelix"> + + + + From aac8d948de6399ca55c609edcf4d1231a22100b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Mon, 20 Apr 2026 12:55:25 +0000 Subject: [PATCH 06/16] Provision emsdk on CoreCLR WBT agent before sendtohelix The CoreCLR WBT pipeline splits build and send-to-helix across two agents. The upstream build job acquires emsdk on its own agent via src/coreclr/runtime.proj's BuildRuntimeDependsOnTargets, but that state is not shipped as a build artifact, so when sendtohelix.proj runs on the WBT agent, src/mono/browser/emsdk/ is missing. The IncludeEmsdkForHelixStaging target then falls through to _AcquireLocalEmscriptenSdk inside sendtohelix.proj whose @(PackageReference) set is polluted by Arcade, producing a bogus emsdk folder and a 'Correlation Payload not found' Helix error. Fix: add a 'Provision emsdk' preBuildStep to browser-wasm-coreclr-build-tests.yml that invokes the existing `provision.emsdk` subset, which drives eng/AcquireEmscriptenSdk.proj. That project's @(PackageReference) set contains only the four emsdk packages, so it produces a clean src/mono/browser/emsdk/. After this step the WBT agent matches a Mono WBT agent post-runtime-build: EMSDK_PATH is set on import, _AcquireLocalEmscriptenSdk is Inputs/Outputs-skipped, and IncludeEmsdkForHelixStaging stages the real emsdk. Also fix eng/AcquireEmscriptenSdk.proj: its was being shadowed by Microsoft.Build.NoTargets' own Build target, so `./build.sh -s provision.emsdk` never actually invoked AcquireEmscriptenSdkUnconditional. Hook via BeforeTargets="Build" instead. The subset had no other consumers in CI so this has no regression surface. Verified locally: ./build.sh -s provision.emsdk -os browser -c Release populates src/mono/browser/emsdk/ with the expected layout (bin/, emscripten/, node/, lib/, emsdk_env.sh, .emscripten) and zero bogus package files. A follow-up invocation is a 357 ms no-op. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/AcquireEmscriptenSdk.proj | 10 +++++++++- .../browser-wasm-coreclr-build-tests.yml | 15 +++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/eng/AcquireEmscriptenSdk.proj b/eng/AcquireEmscriptenSdk.proj index 1b5f158d778604..dad96ee3a08e67 100644 --- a/eng/AcquireEmscriptenSdk.proj +++ b/eng/AcquireEmscriptenSdk.proj @@ -6,6 +6,14 @@ - + + diff --git a/eng/pipelines/common/templates/browser-wasm-coreclr-build-tests.yml b/eng/pipelines/common/templates/browser-wasm-coreclr-build-tests.yml index cdb9b26ba1dd69..ac76b6332c3801 100644 --- a/eng/pipelines/common/templates/browser-wasm-coreclr-build-tests.yml +++ b/eng/pipelines/common/templates/browser-wasm-coreclr-build-tests.yml @@ -100,6 +100,21 @@ jobs: TargetFolder: '$(Build.SourcesDirectory)/artifacts' CleanTargetFolder: false + # Provision emsdk on this agent so src/mono/browser/emsdk/ is populated + # before sendtohelix runs. The upstream runtime-build job acquires emsdk on + # its own agent (via src/coreclr/runtime.proj's BuildRuntimeDependsOnTargets), + # but that state is not shipped in its build artifacts. Mono WBT provisions + # implicitly because it builds the runtime in the same job; CoreCLR WBT is + # split across two agents, so we acquire it here on the WBT agent. + - ${{ if eq(platform, 'browser_wasm_win') }}: + - script: build.cmd -s provision.emsdk -os browser -c $(_BuildConfig) + displayName: Provision emsdk + workingDirectory: $(Build.SourcesDirectory) + - ${{ else }}: + - script: ./build.sh -s provision.emsdk -os browser -c $(_BuildConfig) + displayName: Provision emsdk + workingDirectory: $(Build.SourcesDirectory) + # build WBT buildArgs: >- $(wbtProjectArg) $(Build.SourcesDirectory)/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj From 2392ae2297add868ea0d183e4dbf753b10ba57fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Mon, 20 Apr 2026 14:05:54 +0000 Subject: [PATCH 07/16] Stage emsdk for Helix at evaluation time, not via BeforeTargets StageDependenciesForHelix guards its body with a condition over @(HelixDependenciesToStage) that is evaluated before any BeforeTargets hook can populate the item. A BeforeTargets-scoped ItemGroup therefore runs, but the target body itself is skipped and nothing is staged. Move the emsdk HelixDependenciesToStage item to project-evaluation scope (matching the existing wasmtime pattern) so it is visible when StageDependenciesForHelix evaluates its condition. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/libraries/sendtohelix-browser.targets | 32 +++++++++++------------ 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/src/libraries/sendtohelix-browser.targets b/src/libraries/sendtohelix-browser.targets index 1e8d1cc89e8db3..e992e02d6cda83 100644 --- a/src/libraries/sendtohelix-browser.targets +++ b/src/libraries/sendtohelix-browser.targets @@ -91,24 +91,22 @@ - - - - - + + + From ab012ca3342e4180cb17abfd88606d4a269ac6af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Tue, 21 Apr 2026 09:18:20 +0000 Subject: [PATCH 08/16] Opt CoreCLR WBT out of shipping runtime pack as Helix payload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The runtime pack is acquired on the Helix worker via the downloaded nupkg, so shipping the raw $(MicrosoftNetCoreAppRuntimePackDir) layout as a correlation payload is unnecessary — and fails on the CoreCLR WBT agent, which doesn't have that folder (the upstream runtime-pack build job only publishes packages/**, not bin/microsoft.netcore.app.runtime.browser-wasm/**). Move the payload into the Mono-only block alongside the other Mono-only build tooling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/libraries/sendtohelix-browser.targets | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libraries/sendtohelix-browser.targets b/src/libraries/sendtohelix-browser.targets index e992e02d6cda83..34eaf96f7dee9f 100644 --- a/src/libraries/sendtohelix-browser.targets +++ b/src/libraries/sendtohelix-browser.targets @@ -246,7 +246,6 @@ - @@ -254,8 +253,11 @@ - + + From 3f0eb6a2e0f0ee7cdccaeda233e3d3458e0d6641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Tue, 21 Apr 2026 10:23:18 +0000 Subject: [PATCH 09/16] Stage CoreCLR WBT eng/*.targets as directory payload HelixCorrelationPayload pointing at individual .targets files causes the Helix client to try unzipping them ("File is not a zip file" retries + DownloadError). Copy native.wasm.targets and AcquireEmscriptenSdk.targets into an intermediate staging directory and ship that directory as build/eng. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/libraries/sendtohelix-browser.targets | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/libraries/sendtohelix-browser.targets b/src/libraries/sendtohelix-browser.targets index 34eaf96f7dee9f..3af0478473c414 100644 --- a/src/libraries/sendtohelix-browser.targets +++ b/src/libraries/sendtohelix-browser.targets @@ -265,10 +265,22 @@ + of BrowserWasmApp.CoreCLR.targets) shipped alongside BrowserBuildTargetsDir. Stage them into + a directory first — HelixCorrelationPayload on individual files causes the Helix client to + try unzipping them as archives. --> + + <_CoreCLRWbtEngPayloadDir>$(ArtifactsObjDir)helix-staging\coreclr-wbt-eng\ + + + <_CoreCLRWbtEngFiles Include="$(RepositoryEngineeringDir)native.wasm.targets" /> + <_CoreCLRWbtEngFiles Include="$(RepositoryEngineeringDir)AcquireEmscriptenSdk.targets" /> + + - - + From 80b4dfc1f37baabc38c42c067be1f2438ed7e62d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Fri, 10 Apr 2026 09:14:12 +0000 Subject: [PATCH 10/16] Install WASM templates before 'dotnet new' in WBT When running without workloads, the browser/console WASM templates are not pre-installed. Add EnsureWasmTemplatesInstalled() which installs them from the built nugets path via 'dotnet new install' before CreateWasmTemplateProject calls 'dotnet new'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Templates/WasmTemplateTestsBase.cs | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs b/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs index 0760f1d12d2f62..a37be522589ab1 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Collections.Specialized; using System.Configuration; +using System.Diagnostics; using System.IO; using System.Linq; using System.Text; @@ -27,6 +28,9 @@ public class WasmTemplateTestsBase : BuildTestBase protected readonly BuildOptions _defaultBuildOptions; protected const string DefaultRuntimeAssetsRelativePath = "./_framework/"; + private static bool s_wasmTemplatesInstalled; + private static readonly object s_wasmTemplatesLock = new(); + public WasmTemplateTestsBase(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext, ProjectProviderBase? provider = null) : base(provider ?? new WasmSdkBasedProjectProvider(output, DefaultTargetFramework), output, buildContext) { @@ -83,6 +87,8 @@ public ProjectInfo CreateWasmTemplateProject( extraArgs += $" -f {defaultTarget}"; } + EnsureWasmTemplatesInstalled(); + using DotNetCommand cmd = new DotNetCommand(s_buildEnv, _testOutput, useDefaultArgs: false); CommandResult result = cmd.WithWorkingDirectory(_projectDir) .WithEnvironmentVariable("NUGET_PACKAGES", _nugetPackagesDir) @@ -173,6 +179,63 @@ private static void AddCoreClrProjectProperties(ref string extraProperties, ref """; } + /// + /// Installs the WASM browser/console templates from the built nugets path + /// using dotnet new install if needed. This is a no-op when + /// the workload is already installed (templates come with the workload). + /// + private static void EnsureWasmTemplatesInstalled() + { + if (s_buildEnv.IsWorkload) + return; + + if (s_wasmTemplatesInstalled) + return; + + lock (s_wasmTemplatesLock) + { + if (s_wasmTemplatesInstalled) + return; + + string? templateNupkg = Directory.GetFiles(s_buildEnv.BuiltNuGetsPath, "Microsoft.NET.Runtime.WebAssembly.Templates.*.nupkg") + .Where(f => !f.EndsWith(".symbols.nupkg", StringComparison.OrdinalIgnoreCase)) + .FirstOrDefault(); + + if (templateNupkg is null) + throw new InvalidOperationException( + $"Could not find WebAssembly template nupkg in '{s_buildEnv.BuiltNuGetsPath}'"); + + Console.WriteLine($"[templates] Installing WASM templates from {templateNupkg} using {s_buildEnv.DotNet}"); + + var psi = new ProcessStartInfo + { + FileName = s_buildEnv.DotNet, + Arguments = $"new install \"{templateNupkg}\" --force", + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false + }; + psi.Environment["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "1"; + + using var process = Process.Start(psi) + ?? throw new InvalidOperationException("Failed to start 'dotnet new install' process"); + + var stdoutTask = process.StandardOutput.ReadToEndAsync(); + var stderrTask = process.StandardError.ReadToEndAsync(); + process.WaitForExit(); + + string stdout = stdoutTask.Result; + string stderr = stderrTask.Result; + + if (process.ExitCode != 0) + throw new InvalidOperationException( + $"'dotnet new install' failed with exit code {process.ExitCode}.\nStdout: {stdout}\nStderr: {stderr}"); + + Console.WriteLine($"[templates] WASM template install completed successfully"); + s_wasmTemplatesInstalled = true; + } + } + public virtual (string projectDir, string buildOutput) PublishProject( ProjectInfo info, Configuration configuration, From 686d1ea7892e57578ea2945dd788146a93236b13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Tue, 21 Apr 2026 13:46:55 +0000 Subject: [PATCH 11/16] Skip NativeBuildTests on CoreCLR runtime These tests fail on the CoreCLR browser-wasm path for product-level reasons tracked in #127073: - ProjectWithDllImportsRequiringMarshalIlGen_ArrayTypeParameter: getAssemblyExports() call in the default wasmbrowser main.js throws TypeLoad on CoreCLR when the user assembly has no [JSExport], because JSHostImplementation.CoreCLR.BindAssemblyExports uses throwOnError:true while the Mono native path is tolerant. - BuildWithUndefinedNativeSymbol(allowUndefined:false): WasmAllowUndefinedSymbols=false is not honored on the CoreCLR native build path; the build succeeds instead of failing. Gate both on IsMonoRuntime until the CoreCLR product gaps are addressed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs b/src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs index e9eaf719f08825..a383fc6a5321f2 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs @@ -19,7 +19,9 @@ public NativeBuildTests(ITestOutputHelper output, SharedBuildPerTestClassFixture { } - [Theory] + // Skipped on CoreCLR: WasmAllowUndefinedSymbols=false is not honored on the CoreCLR native-build path. + // See https://github.com/dotnet/runtime/pull/127073 for diagnosis. + [ConditionalTheory(typeof(BuildTestBase), nameof(IsMonoRuntime))] [InlineData(true)] [InlineData(false)] public void BuildWithUndefinedNativeSymbol(bool allowUndefined) @@ -57,7 +59,10 @@ public void BuildWithUndefinedNativeSymbol(bool allowUndefined) } } - [Theory] + // Skipped on CoreCLR: the default template's main.js calls getAssemblyExports() which throws on CoreCLR + // when the user assembly has no [JSExport] (JSHostImplementation.CoreCLR.BindAssemblyExports uses + // throwOnError: true, while Mono's native path is tolerant). See https://github.com/dotnet/runtime/pull/127073. + [ConditionalTheory(typeof(BuildTestBase), nameof(IsMonoRuntime))] [InlineData(Configuration.Debug)] [InlineData(Configuration.Release)] public async Task ProjectWithDllImportsRequiringMarshalIlGen_ArrayTypeParameter(Configuration config) From 101fcae36534a7e5169ab2a69f5ff6d54d5fc771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Tue, 21 Apr 2026 20:01:32 +0200 Subject: [PATCH 12/16] Update eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt b/eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt index e9fd3fdaa77399..4f567f5cba1082 100644 --- a/eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt +++ b/eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt @@ -12,4 +12,3 @@ Wasm.Build.Tests.WasmRunOutOfAppBundleTests Wasm.Build.Tests.WasmTemplateTests Wasm.Build.Tests.MaxParallelDownloadsTests Wasm.Build.Tests.LibraryInitializerTests -Wasm.Build.Templates.Tests.NativeBuildTests From 79e033dbab7a388c8f780fb4151e4dd124860603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Tue, 21 Apr 2026 18:01:44 +0000 Subject: [PATCH 13/16] Revert [DO NOT MERGE] pipeline changes Restore eng/pipelines/runtime.yml and eng/pipelines/coreclr/ci.yml to their state on origin/main, reverting the two scratch commits: - e0b758c7bc3 [DO NOT MERGE] runtime.yml: trim to WBT-only for PR testing - fb69e233060 [DO NOT MERGE] Disable runtime-coreclr pipeline for PR testing Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/pipelines/coreclr/ci.yml | 25 +- eng/pipelines/runtime.yml | 1961 +++++++++++++++++++++++++++++++++- 2 files changed, 1959 insertions(+), 27 deletions(-) diff --git a/eng/pipelines/coreclr/ci.yml b/eng/pipelines/coreclr/ci.yml index 6fbd24a2d25976..3d677aea8c6c5a 100644 --- a/eng/pipelines/coreclr/ci.yml +++ b/eng/pipelines/coreclr/ci.yml @@ -1,6 +1,25 @@ -trigger: none - -pr: none +trigger: + batch: true + branches: + include: + - release/*.* + paths: + include: + - '*' + - src/libraries/System.Private.CoreLib/* + exclude: + - '**.md' + - .devcontainer/* + - .github/* + - docs/* + - LICENSE.TXT + - PATENTS.TXT + - THIRD-PARTY-NOTICES.TXT + - src/installer/* + - src/libraries/* + - eng/pipelines/installer/* + - eng/pipelines/libraries/* + - eng/pipelines/runtime.yml schedules: - cron: "0 9,18,1 * * *" # run at 9:00, 18:00 and 01:00 (UTC) which is 2:00, 11:00 and 18:00 (PST). diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index d8e95b723363a1..461e9b3611295c 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -67,6 +67,43 @@ extends: - stage: Build jobs: + # + # Build CoreCLR verticals where we don't run host tests + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - linux_musl_arm + - linux_musl_arm64 + - windows_arm64 + - linux_arm + jobParameters: + nameSuffix: AllSubsets_CoreCLR_ReleaseRuntimeLibs + buildArgs: -s clr+libs+host+packs -rc Release -lc Release -c $(_BuildConfig) + timeoutInMinutes: 120 + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - linux_arm64 + - linux_musl_x64 + jobParameters: + nameSuffix: AllSubsets_CoreCLR + buildArgs: -s clr+libs+host+packs -rc Release -c Release -lc $(_BuildConfig) + timeoutInMinutes: 120 + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # Release build of browser wasm for WBT - template: /eng/pipelines/common/platform-matrix.yml parameters: @@ -89,6 +126,107 @@ extends: parameters: testGroup: innerloop liveLibrariesBuildConfig: Release + condition: >- + or( + eq(variables['wasmDarcDependenciesChanged'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_wasm_coreclr_runtimetests.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_wasmbuildtests.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: checked + platforms: + - browser_wasm + jobParameters: + nameSuffix: CoreCLR_ReleaseLibraries + buildArgs: -s clr+libs+libs.tests+packs -c Release -rc $(_BuildConfig) /p:TestAssemblies=false /p:ArchiveTests=true /p:InstallWorkloadForTesting=false + timeoutInMinutes: 120 + postBuildSteps: + - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml + parameters: + extraBuildArgs: -os browser + - 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 + parameters: + rootFolder: $(Build.SourcesDirectory)/artifacts/helix + includeRootFolder: false + archiveType: $(archiveType) + archiveExtension: $(archiveExtension) + tarCompression: $(tarCompression) + artifactName: CoreCLR_ReleaseLibraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + - template: /eng/pipelines/common/wasm-post-build-steps.yml + parameters: + publishArtifactsForWorkload: true + publishWBT: true + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + parameters: + testGroup: innerloop + liveLibrariesBuildConfig: Release + - template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml + parameters: + testGroup: innerloop + condition: >- + or( + eq(variables['wasmDarcDependenciesChanged'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_wasm_coreclr_runtimetests.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: checked + platforms: + - browser_wasm_win + jobParameters: + nameSuffix: CoreCLR_ReleaseLibraries + buildArgs: -s clr+libs+libs.tests+packs -c Release -rc $(_BuildConfig) /p:TestAssemblies=false /p:ArchiveTests=true /p:InstallWorkloadForTesting=false + timeoutInMinutes: 120 + 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 + parameters: + rootFolder: $(Build.SourcesDirectory)/artifacts/helix + includeRootFolder: false + archiveType: $(archiveType) + archiveExtension: $(archiveExtension) + tarCompression: $(tarCompression) + artifactName: CoreCLR_ReleaseLibraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + - template: /eng/pipelines/common/wasm-post-build-steps.yml + parameters: + publishArtifactsForWorkload: true + publishWBT: true + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + parameters: + testGroup: innerloop + liveLibrariesBuildConfig: Release + condition: >- + or( + eq(variables['wasmDarcDependenciesChanged'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_wasm_coreclr_runtimetests.containsChange'], true), + eq(variables['isRollingBuild'], true)) # Browser Wasm.Build.Tests - template: /eng/pipelines/common/templates/browser-wasm-coreclr-build-tests.yml @@ -96,38 +234,1813 @@ extends: platforms: - browser_wasm - browser_wasm_win - alwaysRun: true + alwaysRun: ${{ variables.isRollingBuild }} extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - # For Wasm.Build.Tests - runtime pack builds - - template: /eng/pipelines/common/templates/wasm-build-only.yml + # + # Build CoreCLR and Libraries with Libraries tests + # For running libraries tests and installer tests + # + - template: /eng/pipelines/common/platform-matrix.yml parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} platforms: - - browser_wasm - - browser_wasm_win - condition: true - nameSuffix: SingleThreaded - extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - publishArtifactsForWorkload: true - publishWBT: true + - linux_x64 + - linux_musl_x64 + - osx_arm64 + - windows_x64 + jobParameters: + nameSuffix: CoreCLR_Libraries + buildArgs: -s clr+libs+libs.tests -rc Release -c $(_BuildConfig) /p:ArchiveTests=true + timeoutInMinutes: 120 + 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_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + displayName: Build Assets + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: $(Build.SourcesDirectory)/artifacts/helix + includeRootFolder: false + archiveType: $(archiveType) + archiveExtension: $(archiveExtension) + tarCompression: $(tarCompression) + artifactName: CoreCLR_Libraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(variables['isRollingBuild'], true)) - - template: /eng/pipelines/common/templates/wasm-build-only.yml + - template: /eng/pipelines/common/platform-matrix.yml parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release platforms: - - browser_wasm - - browser_wasm_win - condition: true - nameSuffix: MultiThreaded - extraBuildArgs: /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - publishArtifactsForWorkload: true - publishWBT: false + - windows_x86 + jobParameters: + nameSuffix: CoreCLR_Libraries + buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true + timeoutInMinutes: 120 + 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_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + displayName: Build Assets + - template: /eng/pipelines/common/upload-artifact-step.yml + parameters: + rootFolder: $(Build.SourcesDirectory)/artifacts/helix + includeRootFolder: false + archiveType: $(archiveType) + archiveExtension: $(archiveExtension) + tarCompression: $(tarCompression) + artifactName: CoreCLR_Libraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(variables['isRollingBuild'], true)) - # Browser Wasm.Build.Tests - - template: /eng/pipelines/common/templates/browser-wasm-build-tests.yml + # + # Build CoreCLR and Libraries + # For running installer tests + # + - template: /eng/pipelines/common/platform-matrix.yml parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release platforms: - - browser_wasm - - browser_wasm_win - alwaysRun: true - extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + - osx_x64 + jobParameters: + nameSuffix: CoreCLR_Libraries + buildArgs: -s clr+libs -c $(_BuildConfig) + timeoutInMinutes: 120 + 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_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + displayName: Build Assets + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Build CoreCLR and Libraries with the respective tests + # for the test configurations we run. + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - linux_arm64 + - osx_arm64 + jobParameters: + nameSuffix: Libraries_CheckedCoreCLR + buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) -rc Checked /p:ArchiveTests=true + timeoutInMinutes: 120 + postBuildSteps: + - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml + - 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 + parameters: + rootFolder: $(Build.SourcesDirectory)/artifacts/helix + includeRootFolder: false + archiveType: $(archiveType) + archiveExtension: $(archiveExtension) + tarCompression: $(tarCompression) + artifactName: Libraries_CheckedCoreCLR_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml + parameters: + testGroup: innerloop + configOverride: Checked + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - linux_x64 + - windows_x64 + jobParameters: + nameSuffix: Libraries_CheckedCoreCLR + buildArgs: -s clr+clr.wasmjit+libs -c $(_BuildConfig) -rc Checked + timeoutInMinutes: 120 + postBuildSteps: + - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml + - 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 + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml + parameters: + testGroup: innerloop + configOverride: Checked + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - linux_musl_x64 + - windows_x86 + jobParameters: + nameSuffix: Libraries_CheckedCoreCLR + buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) -rc Checked /p:ArchiveTests=true + timeoutInMinutes: 120 + 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 + parameters: + rootFolder: $(Build.SourcesDirectory)/artifacts/helix + includeRootFolder: false + archiveType: $(archiveType) + archiveExtension: $(archiveExtension) + tarCompression: $(tarCompression) + artifactName: Libraries_CheckedCoreCLR_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - osx_x64 + jobParameters: + nameSuffix: Libraries_CheckedCoreCLR + buildArgs: -s clr+libs -c $(_BuildConfig) -rc Checked + timeoutInMinutes: 120 + postBuildSteps: + - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml + - 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 + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml + parameters: + testGroup: innerloop + configOverride: Checked + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: checked + platforms: + - linux_arm + - windows_arm64 + - windows_x86 + jobParameters: + nameSuffix: CoreCLR_ReleaseLibraries + buildArgs: -s clr+libs -rc $(_BuildConfig) -c Release + timeoutInMinutes: 120 + postBuildSteps: + - template: /eng/pipelines/coreclr/templates/build-native-test-assets-step.yml + - 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 + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml + parameters: + testGroup: innerloop + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: checked + platforms: + - linux_x64 + - linux_musl_arm + - linux_musl_arm64 + - windows_x64 + jobParameters: + nameSuffix: CoreCLR_ReleaseLibraries + buildArgs: -s clr+libs+libs.tests -rc $(_BuildConfig) -c Release /p:ArchiveTests=true + timeoutInMinutes: 120 + 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 + parameters: + rootFolder: $(Build.SourcesDirectory)/artifacts/helix + includeRootFolder: false + archiveType: $(archiveType) + archiveExtension: $(archiveExtension) + tarCompression: $(tarCompression) + artifactName: CoreCLR_ReleaseLibraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Build the whole product using GNU compiler toolchain + # When CoreCLR, Mono, Libraries, Installer and src/tests are changed + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: checked + platforms: + - gcc_linux_x64 + jobParameters: + testGroup: innerloop + nameSuffix: Native_GCC + buildArgs: -s clr.native+libs.native+mono+host.native -c $(_BuildConfig) -gcc + postBuildSteps: + - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests.yml + parameters: + testBuildArgs: skipmanaged skipgeneratelayout skiprestorepackages -gcc + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Build CoreCLR and run crossgen on S.P.CoreLib + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: checked + runtimeFlavor: coreclr + platforms: + - linux_x86 + jobParameters: + testScope: innerloop + nameSuffix: CoreCLR + buildArgs: -s clr.runtime+clr.jit+clr.iltools+clr.spmi+clr.corelib+clr.nativecorelib -c $(_BuildConfig) + timeoutInMinutes: 120 + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Build CoreCLR as a non-portable build + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: checked + runtimeFlavor: coreclr + platforms: + - tizen_armel + jobParameters: + testScope: innerloop + nameSuffix: CoreCLR_NonPortable + buildArgs: -s clr.native+clr.tools+clr.corelib+clr.nativecorelib+clr.aot+clr.packages --targetrid tizen.9.0.0-armel -c $(_BuildConfig) /p:PortableBuild=false + timeoutInMinutes: 120 + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Build CoreCLR + Libs + Host + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + runtimeFlavor: coreclr + platforms: + - freebsd_x64 + - linux_riscv64 + - linux_loongarch64 + jobParameters: + testScope: innerloop + nameSuffix: CoreCLR_Bootstrapped + buildArgs: -s clr+libs+host+packs+tools.cdac -c $(_BuildConfig) -rc Checked --bootstrap + timeoutInMinutes: 120 + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # CoreCLR NativeAOT debug build and smoke tests + # Only when CoreCLR is changed + # + - 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 + buildConfig: Debug + platforms: + - linux_x64 + - windows_x64 + variables: + - name: timeoutPerTestInMinutes + value: 60 + - name: timeoutPerTestCollectionInMinutes + value: 180 + jobParameters: + timeoutInMinutes: 180 + nameSuffix: NativeAOT + buildArgs: -s clr.aot+libs -rc $(_BuildConfig) -lc Release /p:RunAnalyzers=false + postBuildSteps: + - template: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml + parameters: + creator: dotnet-bot + testBuildArgs: nativeaot tree nativeaot + liveLibrariesBuildConfig: Release + testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + parameters: + testGroup: innerloop + liveLibrariesBuildConfig: Release + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # CoreCLR NativeAOT checked build and smoke tests + # Only when CoreCLR is changed + # + - 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 + buildConfig: Checked + platforms: + - windows_x64 + variables: + - name: timeoutPerTestInMinutes + value: 60 + - name: timeoutPerTestCollectionInMinutes + value: 180 + jobParameters: + timeoutInMinutes: 180 + nameSuffix: NativeAOT + buildArgs: -s clr.aot+libs.native+libs.sfx -rc $(_BuildConfig) -lc Release /p:RunAnalyzers=false + postBuildSteps: + - template: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml + parameters: + creator: dotnet-bot + testBuildArgs: 'nativeaot tree ";nativeaot;Loader;Interop;async;" /p:BuildNativeAotFrameworkObjects=true' + liveLibrariesBuildConfig: Release + testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + parameters: + testGroup: innerloop + liveLibrariesBuildConfig: Release + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # + # CoreCLR NativeAOT release build and smoke tests + # Only when CoreCLR is changed + # + - 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 + buildConfig: Release + platforms: + - linux_x64 + - windows_x64 + - osx_arm64 + - linux_arm64 + - windows_arm64 + variables: + - name: timeoutPerTestInMinutes + value: 60 + - name: timeoutPerTestCollectionInMinutes + value: 180 + jobParameters: + testGroup: innerloop + timeoutInMinutes: 180 + nameSuffix: NativeAOT + buildArgs: -s clr.aot+libs+tools.illink -c $(_BuildConfig) -rc $(_BuildConfig) -lc Release /p:RunAnalyzers=false + postBuildSteps: + - template: /eng/pipelines/coreclr/nativeaot-post-build-steps.yml + parameters: + creator: dotnet-bot + testBuildArgs: 'nativeaot tree ";nativeaot;tracing/eventpipe/providervalidation;"' + liveLibrariesBuildConfig: Release + testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + parameters: + testGroup: innerloop + liveLibrariesBuildConfig: Release + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # CoreCLR NativeAOT release build and libraries tests + # Only when CoreCLR or library is changed + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + platforms: + - windows_arm64 + - linux_arm64 + - osx_arm64 + jobParameters: + testGroup: innerloop + isSingleFile: true + nameSuffix: NativeAOT_Libraries + buildArgs: -s clr.aot+libs+libs.tests -c $(_BuildConfig) /p:TestNativeAot=true /p:RunSmokeTestsOnly=true /p:ArchiveTests=true /p:RunAnalyzers=false + timeoutInMinutes: 240 # Doesn't actually take long, but we've seen the ARM64 Helix queue often get backlogged for 2+ hours + # extra steps, run tests + postBuildSteps: + - template: /eng/pipelines/libraries/helix.yml + parameters: + creator: dotnet-bot + testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # Build and test clr tools + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: checked + platforms: + - linux_x64 + jobParameters: + timeoutInMinutes: 120 + nameSuffix: CLR_Tools_Tests + buildArgs: -s clr.aot+clr.iltools+clr.corelib+clr.nativecorelib+libs.sfx+clr.toolstests+tools.cdac+tools.cdactests -c $(_BuildConfig) -test + enablePublishTestResults: true + testResultsFormat: 'xunit' + # We want to run AOT tests when illink changes because there's share code and tests from illink which are used by AOT + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_cdac.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # + # Build CrossDacs + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + platforms: + - windows_x64 + variables: + - name: _archParameter + value: -arch x64,x86,arm,arm64 + jobParameters: + buildArgs: -s linuxdac+alpinedac -c Checked,$(_BuildConfig) + nameSuffix: CrossDac + isOfficialBuild: false + timeoutInMinutes: 60 + postBuildSteps: + - publish: $(Build.SourcesDirectory)/artifacts/bin/coreclr + displayName: Publish CrossDacs for diagnostics + artifact: CoreCLRCrossDacArtifacts + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # Build Mono AOT offset headers once, for validation + # Only when mono changed + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + platforms: + - android_x64 + - browser_wasm + - wasi_wasm + - ios_arm64 # tvos and ios use the same offsets so we only need to build once + - maccatalyst_x64 + variables: + - name: _osParameter + value: -os linux + - name: _archParameter + value: -arch x64 + jobParameters: + nameSuffix: MonoAOTOffsets + buildArgs: -s mono.aotcross -c $(_BuildConfig) /p:MonoGenerateOffsetsOSGroups=$(osGroup) /p:ValidateMonoOffsets=true + postBuildSteps: + # Upload offset files + - task: CopyFiles@2 + displayName: Collect offset files + condition: failed() + inputs: + sourceFolder: '$(Build.SourcesDirectory)/src/mono/mono/offsets' + contents: '*.h.new' + targetFolder: '$(Build.SourcesDirectory)/artifacts/obj/mono/offsetfiles/' + + - publish: '$(Build.SourcesDirectory)/artifacts/obj/mono/offsetfiles' + condition: failed() + artifact: MonoAOTOffsets_$(osGroup)$(osSubGroup) + displayName: Upload offset files + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # Build the whole product using Mono runtime + # Only when libraries, mono or installer are changed + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + runtimeFlavor: mono + platforms: + - tvossimulator_arm64 + - linux_x64 + - linux_arm + - linux_arm64 + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - linux_musl_x64 + - osx_x64 + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # WebAssembly legs + # + - template: /eng/pipelines/common/templates/wasm-library-tests.yml + parameters: + platforms: + - browser_wasm + alwaysRun: ${{ variables.isRollingBuild }} + extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + scenarios: + - WasmTestOnChrome + - WasmTestOnFirefox + + - template: /eng/pipelines/common/templates/wasm-library-tests.yml + parameters: + platforms: + - browser_wasm_win + alwaysRun: ${{ variables.isRollingBuild }} + extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + scenarios: + - WasmTestOnChrome + + # WebAssembly CoreCLR + - template: /eng/pipelines/common/templates/wasm-coreclr-library-tests.yml + parameters: + platforms: + - browser_wasm + alwaysRun: ${{ variables.isRollingBuild }} + extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + scenarios: + - WasmTestOnChrome + + # WebAssembly CoreCLR - smoke tests only on Firefox and V8 + - template: /eng/pipelines/common/templates/wasm-coreclr-library-tests.yml + parameters: + platforms: + - browser_wasm + alwaysRun: ${{ variables.isRollingBuild }} + shouldRunSmokeOnly: 'true' + nameSuffix: _SmokeFirefoxV8 + extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + scenarios: + - WasmTestOnFirefox + - WasmTestOnV8 + + # EAT Library tests - only run on linux + - template: /eng/pipelines/common/templates/wasm-library-aot-tests.yml + parameters: + platforms: + - browser_wasm + nameSuffix: _EAT + buildAOTOnHelix: false + runAOT: false + shouldRunSmokeOnly: false + alwaysRun: ${{ variables.isRollingBuild }} + extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) /maxcpucount:2 + + # AOT Library tests + - template: /eng/pipelines/common/templates/wasm-library-aot-tests.yml + parameters: + platforms: + - browser_wasm + - browser_wasm_win + nameSuffix: _Smoke_AOT + runAOT: true + buildAOTOnHelix: false + shouldRunSmokeOnly: true + alwaysRun: ${{ variables.isRollingBuild }} + extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + + # For Wasm.Build.Tests - runtime pack builds + - template: /eng/pipelines/common/templates/wasm-build-only.yml + parameters: + platforms: + - browser_wasm + - browser_wasm_win + condition: or(eq(variables.isRollingBuild, true), eq(variables.wasmSingleThreadedBuildOnlyNeededOnDefaultPipeline, true)) + nameSuffix: SingleThreaded + extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + publishArtifactsForWorkload: true + publishWBT: true + + - template: /eng/pipelines/common/templates/wasm-build-only.yml + parameters: + platforms: + - browser_wasm + - browser_wasm_win + condition: or(eq(variables.isRollingBuild, true), eq(variables.wasmSingleThreadedBuildOnlyNeededOnDefaultPipeline, true)) + nameSuffix: MultiThreaded + extraBuildArgs: /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + publishArtifactsForWorkload: true + publishWBT: false + + # Browser Wasm.Build.Tests + - template: /eng/pipelines/common/templates/browser-wasm-build-tests.yml + parameters: + platforms: + - browser_wasm + - browser_wasm_win + alwaysRun: ${{ variables.isRollingBuild }} + extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + + # Wasm runtime tests + - template: /eng/pipelines/common/templates/wasm-runtime-tests.yml + parameters: + platforms: + - browser_wasm + alwaysRun: ${{ variables.isRollingBuild }} + extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + + # WASI/WASM + + - template: /eng/pipelines/common/templates/wasm-build-only.yml + parameters: + platforms: + - wasi_wasm + - wasi_wasm_win + extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + condition: or(eq(variables.isRollingBuild, true), eq(variables.wasmSingleThreadedBuildOnlyNeededOnDefaultPipeline, true)) + publishArtifactsForWorkload: false + publishWBT: false + + # + # Android devices + # Build the whole product using Mono and run libraries tests + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - android_arm + - android_arm64 + variables: + # map dependencies variables to local variables + - name: librariesContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + - name: monoContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'] ] + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_Smoke + buildArgs: -s mono+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:EnableAdditionalTimezoneChecks=true + timeoutInMinutes: 120 + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # extra steps, run tests + postBuildSteps: + - template: /eng/pipelines/libraries/helix.yml + parameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_$(_BuildConfig) + condition: >- + or( + eq(variables['librariesContainsChange'], true), + eq(variables['monoContainsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Android arm64 devices and x64 emulators + # Build the whole product using CoreCLR and run functional tests + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: coreclr + platforms: + - android_x64 + - android_arm64 + variables: + # map dependencies variables to local variables + - name: librariesContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + - name: coreclrContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'] ] + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_CoreCLR_Smoke + buildArgs: -s clr.runtime+clr.alljits+clr.corelib+clr.nativecorelib+clr.tools+clr.packages+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true + timeoutInMinutes: 180 + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # extra steps, run tests + postBuildSteps: + - template: /eng/pipelines/libraries/helix.yml + parameters: + creator: dotnet-bot + testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig) + condition: >- + or( + eq(variables['librariesContainsChange'], true), + eq(variables['coreclrContainsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # iOS devices - Full AOT + AggressiveTrimming to reduce size + # Build the whole product using Mono and run libraries tests + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - ios_arm64 + variables: + # map dependencies variables to local variables + - name: librariesContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + - name: monoContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'] ] + - name: illinkContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'] ] + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_Smoke + buildArgs: -s mono+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true /p:RunSmokeTestsOnly=true /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=false /p:EnableAggressiveTrimming=true + timeoutInMinutes: 120 + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # extra steps, run tests + postBuildSteps: + - template: /eng/pipelines/libraries/helix.yml + parameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_$(_BuildConfig) + extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true + condition: >- + or( + eq(variables['librariesContainsChange'], true), + eq(variables['monoContainsChange'], true), + eq(variables['illinkContainsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # iOS devices + # Build the whole product using Native AOT and run libraries tests + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: coreclr + platforms: + - ios_arm64 + variables: + # map dependencies variables to local variables + - name: librariesContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + - name: coreclrContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'] ] + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_NativeAOT_Smoke + buildArgs: --cross -s clr.alljits+clr.tools+clr.nativeaotruntime+clr.nativeaotlibs+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:DevTeamProvisioning=- /p:BuildTestsOnHelix=true /p:UseNativeAOTRuntime=true /p:RunAOTCompilation=false /p:ContinuousIntegrationBuild=true + timeoutInMinutes: 180 + useNativeAOTRuntime: true + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # extra steps, run tests + postBuildSteps: + - template: /eng/pipelines/libraries/helix.yml + parameters: + creator: dotnet-bot + testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) + extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true + condition: >- + or( + eq(variables['librariesContainsChange'], true), + eq(variables['coreclrContainsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # iOS devices + # Build the whole product using CoreCLR and run libraries tests + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: coreclr + platforms: + - ios_arm64 + variables: + # map dependencies variables to local variables + - name: librariesContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + - name: coreclrContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'] ] + - name: illinkContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'] ] + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_CoreCLR_Smoke + buildArgs: -s clr+clr.runtime+libs+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:UseMonoRuntime=false /p:UseNativeAOTRuntime=false /p:RunSmokeTestsOnly=true /p:BuildTestsOnHelix=true /p:UsePortableRuntimePack=false + timeoutInMinutes: 120 + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # extra steps, run tests + postBuildSteps: + - template: /eng/pipelines/libraries/helix.yml + parameters: + creator: dotnet-bot + testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig) + extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true + condition: >- + or( + eq(variables['librariesContainsChange'], true), + eq(variables['coreclrContainsChange'], true), + eq(variables['illinkContainsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # MacCatalyst interp - requires AOT Compilation and Interp flags + # Build the whole product using Mono and run libraries tests + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - maccatalyst_arm64 + variables: + # map dependencies variables to local variables + - name: librariesContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + - name: monoContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'] ] + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_Smoke + buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:DevTeamProvisioning=adhoc /p:RunAOTCompilation=true /p:MonoForceInterpreter=true + timeoutInMinutes: 180 + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # extra steps, run tests + postBuildSteps: + - template: /eng/pipelines/libraries/helix.yml + parameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_$(_BuildConfig) + condition: >- + or( + eq(variables['librariesContainsChange'], true), + eq(variables['monoContainsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # MacCatalyst + # Build the whole product using Native AOT and run libraries tests + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: coreclr + platforms: + - maccatalyst_arm64 + variables: + # map dependencies variables to local variables + - name: librariesContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + - name: coreclrContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'] ] + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_NativeAOT_Smoke + buildArgs: --cross -s clr.alljits+clr.tools+clr.nativeaotruntime+clr.nativeaotlibs+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:DevTeamProvisioning=adhoc /p:BuildTestsOnHelix=true /p:UseNativeAOTRuntime=true /p:RunAOTCompilation=false /p:ContinuousIntegrationBuild=true + timeoutInMinutes: 180 + useNativeAOTRuntime: true + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # extra steps, run tests + postBuildSteps: + - template: /eng/pipelines/libraries/helix.yml + parameters: + creator: dotnet-bot + testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) + extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true + condition: >- + or( + eq(variables['librariesContainsChange'], true), + eq(variables['coreclrContainsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # MacCatalyst + # Build the whole product using CoreCLR and run libraries smoke tests + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + runtimeFlavor: coreclr + platforms: + - maccatalyst_arm64 + variables: + # map dependencies variables to local variables + - name: librariesContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ] + - name: coreclrContainsChange + value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'] ] + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_CoreCLR_Smoke + buildArgs: -s clr+clr.runtime+libs+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunSmokeTestsOnly=true /p:DevTeamProvisioning=adhoc /p:UseMonoRuntime=false /p:UseNativeAOTRuntime=false /p:BuildTestsOnHelix=true + timeoutInMinutes: 180 + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # extra steps, run tests + postBuildSteps: + - template: /eng/pipelines/libraries/helix.yml + parameters: + creator: dotnet-bot + testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig) + extraHelixArguments: /p:NeedsToBuildAppsOnHelix=true + condition: >- + or( + eq(variables['librariesContainsChange'], true), + eq(variables['coreclrContainsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Build Mono and Installer on LLVMAOT mode + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: Release + runtimeFlavor: mono + platforms: + - linux_x64 + - linux_arm64 + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_LLVMAOT + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + /p:MonoEnableLLVM=true /p:MonoAOTEnableLLVM=true /p:MonoBundleLLVMOptimizer=true + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + runtimeFlavor: mono + platforms: + - osx_x64 + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_LLVMAOT + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + /p:MonoEnableLLVM=true /p:MonoAOTEnableLLVM=true /p:MonoBundleLLVMOptimizer=true + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Build Mono debug + # Only when mono changed + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + runtimeFlavor: mono + buildConfig: debug + platforms: + - osx_x64 + - osx_arm64 + - linux_x64 + - linux_arm64 + # - linux_musl_arm64 + - windows_x64 + - windows_x86 + # - windows_arm64 + jobParameters: + nameSuffix: Mono_Runtime + buildArgs: -s mono -c $(_BuildConfig) + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Build Mono release AOT cross-compilers + # Only when mono changed + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + runtimeFlavor: mono + buildConfig: release + platforms: + - linux_x64 + - linux_musl_x64 + - linux_arm64 + - linux_musl_arm64 + - windows_arm64 + - windows_x64 + - osx_x64 + - osx_arm64 + jobParameters: + buildArgs: -c $(_BuildConfig) /p:DotNetBuildMonoCrossAOT=true + nameSuffix: CrossAOT_Mono + runtimeVariant: crossaot + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Build and test libraries for .NET Framework + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: Release + platforms: + - windows_x86 + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + jobParameters: + framework: net481 + buildArgs: -s tools+libs+libs.tests -framework net481 -c $(_BuildConfig) -testscope innerloop /p:ArchiveTests=true + nameSuffix: Libraries_NET481 + timeoutInMinutes: 150 + postBuildSteps: + - template: /eng/pipelines/libraries/helix.yml + parameters: + creator: dotnet-bot + testRunNamePrefixSuffix: NET481_$(_BuildConfig) + extraHelixArguments: /p:BuildTargetFramework=net481 + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Build and test libraries for all TFMs and create packages + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - windows_x64 + jobParameters: + buildArgs: -test -s tools.illink+libs+libs.tests -pack -c $(_BuildConfig) /p:TestAssemblies=false /p:TestPackages=true + nameSuffix: Libraries_WithPackages + timeoutInMinutes: 150 + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Installer Build and Test + # These are always built since they only take like 15 minutes + # we expect these to be done before we finish libraries or coreclr testing. + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - windows_x86 + - osx_x64 + helixQueuesTemplate: /eng/pipelines/installer/helix-queues-setup.yml + jobParameters: + nameSuffix: Installer_Build_And_Test + buildArgs: -s host+packs -c $(_BuildConfig) -lc Release -rc Release + dependsOnGlobalBuilds: + - nameSuffix: CoreCLR_Libraries + buildConfig: release + preBuildSteps: + - template: /eng/pipelines/common/download-artifact-step.yml + parameters: + artifactName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Release + artifactFileName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_Release$(archiveExtension) + unpackFolder: $(Build.SourcesDirectory)/artifacts/bin + displayName: 'unified artifacts' + timeoutInMinutes: 150 + postBuildSteps: + - template: /eng/pipelines/installer/helix.yml + parameters: + creator: dotnet-bot + condition: + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + platforms: + - windows_x64 + - osx_arm64 + - linux_x64 + helixQueuesTemplate: /eng/pipelines/installer/helix-queues-setup.yml + jobParameters: + nameSuffix: Installer_Build_And_Test + buildArgs: -s host+packs -c $(_BuildConfig) -lc ${{ variables.debugOnPrReleaseOnRolling }} -rc Release + dependsOnGlobalBuilds: + - nameSuffix: CoreCLR_Libraries + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + preBuildSteps: + - template: /eng/pipelines/common/download-artifact-step.yml + parameters: + artifactName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(debugOnPrReleaseOnRolling) + artifactFileName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(debugOnPrReleaseOnRolling)$(archiveExtension) + unpackFolder: $(Build.SourcesDirectory)/artifacts/bin + displayName: 'unified artifacts' + timeoutInMinutes: 150 + postBuildSteps: + - template: /eng/pipelines/installer/helix.yml + parameters: + creator: dotnet-bot + condition: + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Build the whole product using Mono and run runtime tests + # + - 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 + buildConfig: Release + runtimeFlavor: mono + platforms: + - osx_x64 + - linux_arm64 + variables: + - name: timeoutPerTestInMinutes + value: 60 + - name: timeoutPerTestCollectionInMinutes + value: 180 + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_Minijit_RuntimeTests + runtimeVariant: minijit + buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release + timeoutInMinutes: 180 + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + postBuildSteps: + - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml + parameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_Release + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + + # + # Build the whole product using Mono and run runtime tests + # + - 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 + buildConfig: Release + runtimeFlavor: mono + platforms: + - windows_x64 + variables: + - name: timeoutPerTestInMinutes + value: 60 + - name: timeoutPerTestCollectionInMinutes + value: 180 + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_Minijit_RuntimeTests + runtimeVariant: minijit + buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release -lc ${{ variables.debugOnPrReleaseOnRolling }} + timeoutInMinutes: 180 + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + postBuildSteps: + - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml + parameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_Release + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + parameters: + liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + + # + # Mono CoreCLR runtime Test executions using live libraries in interpreter mode + # Only when Mono is changed + + - 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 + buildConfig: Release + runtimeFlavor: mono + platforms: + - osx_x64 + variables: + - name: timeoutPerTestInMinutes + value: 60 + - name: timeoutPerTestCollectionInMinutes + value: 180 + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_Interpreter_RuntimeTests + runtimeVariant: monointerpreter + buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release + timeoutInMinutes: 180 + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isRollingBuild'], true)) + postBuildSteps: + - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml + parameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_Release + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + # + # Mono CoreCLR runtime Test executions using live libraries and LLVM AOT + # Only when Mono is changed + # + - 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 + buildConfig: Release + runtimeFlavor: mono + platforms: + - linux_x64 + # Disabled pending outcome of https://github.com/dotnet/runtime/issues/60234 investigation + #- linux_arm64 + variables: + - name: timeoutPerTestInMinutes + value: 60 + - name: timeoutPerTestCollectionInMinutes + value: 180 + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_LLVMAot_RuntimeTests + runtimeVariant: llvmaot + buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release /p:MonoEnableLLVM=true /p:MonoAOTEnableLLVM=true /p:MonoBundleLLVMOptimizer=true + timeoutInMinutes: 180 + + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isRollingBuild'], true)) + postBuildSteps: + - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml + parameters: + creator: dotnet-bot + llvmAotStepContainer: linux_x64_llvmaot + testRunNamePrefixSuffix: Mono_Release + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + + # + # CoreCLR Test builds using live libraries release build + # Only when CoreCLR is changed + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml + buildConfig: checked + platforms: + - CoreClrTestBuildHost # Either osx_x64 or linux_x64 + jobParameters: + testGroup: innerloop + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # CoreCLR Test executions using live libraries + # Only when CoreCLR is changed + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + buildConfig: checked + platforms: + - linux_arm + - windows_x86 + - windows_arm64 + helixQueueGroup: pr + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + testGroup: innerloop + liveLibrariesBuildConfig: Release + unifiedArtifactsName: CoreCLR_ReleaseLibraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + unifiedBuildNameSuffix: CoreCLR_ReleaseLibraries + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + buildConfig: checked + platforms: + - browser_wasm + helixQueueGroup: pr + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + testGroup: innerloop + liveLibrariesBuildConfig: Release + unifiedArtifactsName: CoreCLR_ReleaseLibraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + unifiedBuildNameSuffix: CoreCLR_ReleaseLibraries + extraBuildArgs: -os browser -p:HostConfiguration=Release + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + buildConfig: checked + platforms: + - osx_arm64 + - osx_x64 + - linux_x64 + - linux_arm64 + - windows_x64 + helixQueueGroup: pr + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + jobParameters: + testGroup: innerloop + liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + unifiedArtifactsName: Libraries_CheckedCoreCLR_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(debugOnPrReleaseOnRolling) + unifiedBuildNameSuffix: Libraries_CheckedCoreCLR + unifiedBuildConfigOverride: ${{ variables.debugOnPrReleaseOnRolling }} + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Libraries Release Test Execution against a release coreclr runtime + # Only when the PR contains a libraries change + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/run-test-job.yml + buildConfig: Release + platforms: + - windows_x86 + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + jobParameters: + isOfficialBuild: false + testScope: innerloop + liveRuntimeBuildConfig: release + unifiedArtifactsName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + helixArtifactsName: CoreCLR_Libraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + unifiedBuildNameSuffix: CoreCLR_Libraries + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Libraries Debug Test Execution against a release coreclr runtime + # Only when the PR contains a libraries change + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/run-test-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - windows_x64 + - osx_arm64 + - linux_x64 + - linux_musl_x64 + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + jobParameters: + isOfficialBuild: false + testScope: innerloop + liveRuntimeBuildConfig: release + unifiedArtifactsName: CoreCLR_Libraries_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(debugOnPrReleaseOnRolling) + helixArtifactsName: CoreCLR_Libraries_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(debugOnPrReleaseOnRolling) + unifiedBuildNameSuffix: CoreCLR_Libraries + unifiedBuildConfigOverride: ${{ variables.debugOnPrReleaseOnRolling }} + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # The next three jobs run checked coreclr + libraries tests. + # The matrix looks like the following, where the right columns specify which configurations + # the libraries tests are built in. + # ________________________________________ + # | Platform | PR | Rolling | + # | ---------------- | ------- | ------- | + # | linux-arm64 | Debug | Release | + # | windows-x86 | Debug | Release | + # | linux-musl-x64 | Debug | Release | + # | osx-arm64 | Debug | Release | + # | linux-musl-arm | Release | Release | + # | linux-musl-arm64 | Release | Release | + # | linux-x64 | Release | Release | + # | windows-x64 | Release | Release | + + # + # Debug (PR) / Release (rolling) Libraries Test Execution against a checked runtime + # Only when the PR contains a coreclr change + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/run-test-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - linux_arm64 + - windows_x86 + - linux_musl_x64 + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + helixQueueGroup: libraries + jobParameters: + testScope: innerloop + liveRuntimeBuildConfig: checked + unifiedArtifactsName: Libraries_CheckedCoreCLR_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + helixArtifactsName: Libraries_CheckedCoreCLR_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + unifiedBuildNameSuffix: Libraries_CheckedCoreCLR + condition: >- + or( + 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)) + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/run-test-job.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + platforms: + - osx_arm64 + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + helixQueueGroup: libraries + jobParameters: + testScope: innerloop + liveRuntimeBuildConfig: checked + unifiedArtifactsName: Libraries_CheckedCoreCLR_BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + helixArtifactsName: Libraries_CheckedCoreCLR_TestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig) + unifiedBuildNameSuffix: Libraries_CheckedCoreCLR + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Build and test Mono Interpreter with the libraries testss + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + runtimeFlavor: mono + runtimeVariant: monointerpreter + platforms: + - linux_x64 + #- osx_x64 + #- windows_x64 + jobParameters: + testGroup: innerloop + nameSuffix: Mono_Interpreter_LibrariesTests + buildArgs: -s mono+libs+libs.tests -rc Release -c $(_BuildConfig) /p:ArchiveTests=true + timeoutInMinutes: 480 + # extra steps, run tests + postBuildSteps: + - template: /eng/pipelines/libraries/helix.yml + parameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_Interpreter_$(_BuildConfig) + interpreter: true + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + # + # Build and test Mono Minijit with the libraries testss + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} + runtimeFlavor: mono + platforms: + - linux_arm64 + - linux_x64 + - osx_x64 + #- windows_x64 + jobParameters: + testGroup: innerloop + nameSuffix: Mono_MiniJIT_LibrariesTests + buildArgs: -s mono+libs+libs.tests -rc Release -c $(_BuildConfig) /p:ArchiveTests=true + timeoutInMinutes: 480 + # extra steps, run tests + postBuildSteps: + - template: /eng/pipelines/libraries/helix.yml + parameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_Minijit_$(_BuildConfig) + condition: >- + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(variables['isRollingBuild'], true)) From 0b71c68d76b6962b0f4fe77526da19ced7c0965a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Tue, 21 Apr 2026 18:05:18 +0000 Subject: [PATCH 14/16] Address PR feedback: normalize WBT path env vars, drop no-op cmd block, pass harness env to template install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - RunScriptTemplate.cmd: remove 'set VAR=%%VAR%%' no-op block — the vars are inherited from the parent environment into the setlocal scope automatically. - Local.Directory.Build.targets / .props: normalize env-var-sourced paths via GetFullPath + EnsureTrailingSlash so imports are robust to missing trailing separators. - WasmTemplateTestsBase.EnsureWasmTemplatesInstalled: propagate BuildEnvironment.EnvVars to the 'dotnet new install' process so templates install under the same isolated SDK/NuGet config used by the rest of the test run. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Templates/WasmTemplateTestsBase.cs | 5 +++++ .../data/Local.Directory.Build.props | 4 ++-- .../data/Local.Directory.Build.targets | 2 +- .../Wasm.Build.Tests/data/RunScriptTemplate.cmd | 14 -------------- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs b/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs index a37be522589ab1..2863d07a061dea 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs @@ -215,6 +215,11 @@ private static void EnsureWasmTemplatesInstalled() RedirectStandardError = true, UseShellExecute = false }; + // Use the same isolated environment as the rest of the test suite + // (DOTNET_ROOT/DOTNET_INSTALL_DIR/PATH/NUGET_PACKAGES overrides), so + // `dotnet new install` picks up the harness's SDK and NuGet config. + foreach (var kvp in s_buildEnv.EnvVars) + psi.Environment[kvp.Key] = kvp.Value; psi.Environment["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "1"; using var process = Process.Start(psi) diff --git a/src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.props b/src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.props index 253dc52772f6ba..cfc91b807cc6c3 100644 --- a/src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.props +++ b/src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.props @@ -14,7 +14,7 @@ - $(REPOSITORY_ENGINEERING_DIR) - $(WASM_APP_BUILDER_TASKS_ASSEMBLY_PATH) + $([MSBuild]::EnsureTrailingSlash($([System.IO.Path]::GetFullPath('$(REPOSITORY_ENGINEERING_DIR)')))) + $([System.IO.Path]::GetFullPath('$(WASM_APP_BUILDER_TASKS_ASSEMBLY_PATH)')) \ No newline at end of file diff --git a/src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.targets b/src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.targets index e661632c3ebb33..4349163c8f8f88 100644 --- a/src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.targets +++ b/src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.targets @@ -11,7 +11,7 @@ $(BrowserProjectRoot)build/ locally. --> - <_CoreCLRBrowserBuildTargetsDir Condition="'$(BROWSER_BUILD_TARGETS_DIR)' != ''">$(BROWSER_BUILD_TARGETS_DIR) + <_CoreCLRBrowserBuildTargetsDir Condition="'$(BROWSER_BUILD_TARGETS_DIR)' != ''">$([MSBuild]::EnsureTrailingSlash($([System.IO.Path]::GetFullPath('$(BROWSER_BUILD_TARGETS_DIR)')))) Date: Tue, 21 Apr 2026 18:15:03 +0000 Subject: [PATCH 15/16] Revert NativeBuildTests category to 'native' The class is now excluded on CoreCLR via the existing '-notrait category=native' xunit filter (and was already removed from BuildWasmAppsJobsListCoreCLR.txt in 101fcae3653), so the per-method ConditionalTheory(IsMonoRuntime) gating is no longer needed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Templates/NativeBuildTests.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs b/src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs index a383fc6a5321f2..000513a7c766be 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs @@ -11,7 +11,7 @@ namespace Wasm.Build.Templates.Tests { - [TestCategory("native-coreclr")] + [TestCategory("native")] public class NativeBuildTests : WasmTemplateTestsBase { public NativeBuildTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) @@ -19,9 +19,9 @@ public NativeBuildTests(ITestOutputHelper output, SharedBuildPerTestClassFixture { } - // Skipped on CoreCLR: WasmAllowUndefinedSymbols=false is not honored on the CoreCLR native-build path. - // See https://github.com/dotnet/runtime/pull/127073 for diagnosis. - [ConditionalTheory(typeof(BuildTestBase), nameof(IsMonoRuntime))] + // Excluded on CoreCLR via the `category=native` trait filter: WasmAllowUndefinedSymbols=false + // is not honored on the CoreCLR native-build path. See https://github.com/dotnet/runtime/pull/127073. + [Theory] [InlineData(true)] [InlineData(false)] public void BuildWithUndefinedNativeSymbol(bool allowUndefined) @@ -59,10 +59,11 @@ public void BuildWithUndefinedNativeSymbol(bool allowUndefined) } } - // Skipped on CoreCLR: the default template's main.js calls getAssemblyExports() which throws on CoreCLR - // when the user assembly has no [JSExport] (JSHostImplementation.CoreCLR.BindAssemblyExports uses - // throwOnError: true, while Mono's native path is tolerant). See https://github.com/dotnet/runtime/pull/127073. - [ConditionalTheory(typeof(BuildTestBase), nameof(IsMonoRuntime))] + // Excluded on CoreCLR via the `category=native` trait filter: the default template's main.js calls + // getAssemblyExports() which throws on CoreCLR when the user assembly has no [JSExport] + // (JSHostImplementation.CoreCLR.BindAssemblyExports uses throwOnError: true, while Mono's native + // path is tolerant). See https://github.com/dotnet/runtime/pull/127073. + [Theory] [InlineData(Configuration.Debug)] [InlineData(Configuration.Release)] public async Task ProjectWithDllImportsRequiringMarshalIlGen_ArrayTypeParameter(Configuration config) From cb6c648185738d1f8154fe00239cf62aaf53b0cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Wed, 22 Apr 2026 08:15:43 +0000 Subject: [PATCH 16/16] Address PR feedback: timeout + isolated DOTNET_CLI_HOME for template install - Add a 120s timeout to 'dotnet new install' in EnsureWasmTemplatesInstalled; terminate the process tree on timeout and include captured stdout/stderr in the failure message so a hang doesn't stall the entire test run. - Set DOTNET_CLI_HOME (sibling of NUGET_PACKAGES when available, else next to the template nupkg) so template state doesn't leak into the default user profile and can't collide across Helix agents or jobs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Templates/WasmTemplateTestsBase.cs | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs b/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs index 2863d07a061dea..13087c1cb1fc29 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs @@ -215,22 +215,50 @@ private static void EnsureWasmTemplatesInstalled() RedirectStandardError = true, UseShellExecute = false }; + // Isolate the template cache so the install doesn't touch the default user profile + // and can't collide across Helix jobs/agents (or fail if the profile is not writable). + string dotnetCliHome = s_buildEnv.EnvVars.TryGetValue("NUGET_PACKAGES", out string? nugetPackagesPath) && !string.IsNullOrWhiteSpace(nugetPackagesPath) + ? Path.Combine(Path.GetDirectoryName(nugetPackagesPath)!, ".dotnet-cli-home") + : Path.Combine(Path.GetDirectoryName(templateNupkg)!, ".dotnet-cli-home"); + Directory.CreateDirectory(dotnetCliHome); + // Use the same isolated environment as the rest of the test suite // (DOTNET_ROOT/DOTNET_INSTALL_DIR/PATH/NUGET_PACKAGES overrides), so // `dotnet new install` picks up the harness's SDK and NuGet config. foreach (var kvp in s_buildEnv.EnvVars) psi.Environment[kvp.Key] = kvp.Value; psi.Environment["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "1"; + psi.Environment["DOTNET_CLI_HOME"] = dotnetCliHome; using var process = Process.Start(psi) ?? throw new InvalidOperationException("Failed to start 'dotnet new install' process"); var stdoutTask = process.StandardOutput.ReadToEndAsync(); var stderrTask = process.StandardError.ReadToEndAsync(); - process.WaitForExit(); - string stdout = stdoutTask.Result; - string stderr = stderrTask.Result; + const int processTimeoutMilliseconds = 120_000; + if (!process.WaitForExit(processTimeoutMilliseconds)) + { + try + { + if (!process.HasExited) + process.Kill(entireProcessTree: true); + } + catch (InvalidOperationException) + { + } + + process.WaitForExit(); + + string timedOutStdout = stdoutTask.GetAwaiter().GetResult(); + string timedOutStderr = stderrTask.GetAwaiter().GetResult(); + + throw new InvalidOperationException( + $"'dotnet new install' timed out after {processTimeoutMilliseconds} ms.\nStdout: {timedOutStdout}\nStderr: {timedOutStderr}"); + } + + string stdout = stdoutTask.GetAwaiter().GetResult(); + string stderr = stderrTask.GetAwaiter().GetResult(); if (process.ExitCode != 0) throw new InvalidOperationException(