Skip to content

[browser] More Wasm.Build.Tests on CoreCLR#127281

Draft
maraf wants to merge 19 commits intodotnet:mainfrom
maraf:maraf/wbt-coreclr-enable-non-aot-tests
Draft

[browser] More Wasm.Build.Tests on CoreCLR#127281
maraf wants to merge 19 commits intodotnet:mainfrom
maraf:maraf/wbt-coreclr-enable-non-aot-tests

Conversation

@maraf
Copy link
Copy Markdown
Member

@maraf maraf commented Apr 22, 2026

Note

This PR description was AI-generated (GitHub Copilot CLI).

Follow-up to #127073. Now that WASM templates install and native relink work on CoreCLR in Wasm.Build.Tests (WBT), enable the non-AOT tests that were previously excluded by the class-level [TestCategory("native")] trait filter.

Important

This PR is stacked on top of #127073 and should not be merged until that PR lands.

What changes

1. Enable non-AOT tests on CoreCLR (4 WBT test classes)

src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj excludes category=native on CoreCLR:

<_XUnitTraitArg Condition="'$(RuntimeFlavor)' == 'CoreCLR'">-notrait category=native -notrait category=mono -notrait category=workload</_XUnitTraitArg>

xunit merges class-level and method-level traits, so moving native to a sub-category (e.g. native-coreclr) at method level does not help — the class-level native still causes exclusion. The fix is to remove the class-level tag and re-apply native only on the AOT-only methods.

File Change
NativeBuildTests.cs Remove class tag. Tag AOTNotSupportedWithNoTrimming, IntermediateBitcodeToObjectFilesAreNotLLVMIR, NativeBuildIsRequired. SimpleNativeBuild and ZipArchiveInteropTest (non-AOT) now run on CoreCLR.
DllImportTests.cs Remove class tag. All methods are non-AOT — all run on CoreCLR.
PInvokeTableGeneratorTests.cs Remove class tag. Tag EnsureWasmAbiRulesAreFollowedInAOT, EnsureComInteropCompilesInAOT.
NativeLibraryTests.cs Split 4 theories that had both [BuildAndRun(aot:false)] and [BuildAndRun(aot:true,…)] into separate non-AOT + AOT theories. AOT variants tagged native. The pre-existing [ActiveIssue] on ProjectUsingSkiaSharp is applied to both halves.

Splitting (rather than runtime-skip) keeps test reporting honest: AOT-on-CoreCLR shows up as "excluded by filter" instead of a false pass.

2. [DO NOT MERGE] runtime.yml + coreclr/ci.yml — trim PR CI to WBT-only

Scratch pipeline changes cherry-picked from #127073 to accelerate iteration. Keeps only the jobs needed for Mono + CoreCLR WBT. Revert before merging.

  • eng/pipelines/runtime.yml — keep only CoreCLR/Mono runtime-pack builds + Mono/CoreCLR WBT runners, with alwaysRun: true. Drop all other legs (runtime tests, library tests, installer tests, NativeAOT, Android/iOS/MacCatalyst, etc.).
  • eng/pipelines/coreclr/ci.yml — disable the runtime-coreclr PR pipeline.

Not in scope: other [TestCategory("native")] classes in WBT (BuildPublishTests, NativeRebuildTests/*, WasmSIMDTests, IcuTests, SatelliteAssembliesTests, …). Those often encode reasons beyond "class-level native is too broad" and are left for a follow-up.

Validation

  • Local build: ./dotnet.sh build src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj -c Release /p:TargetOS=browser /p:RuntimeFlavor=CoreCLR /p:Scenario=BuildWasmApps → 0W/0E.
  • Helix end-to-end validation: this PR's CI.

maraf and others added 19 commits April 17, 2026 10:51
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>
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>
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>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
<HelixDependenciesToStage SourcePath="$(EMSDK_PATH)" />.
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>
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 <Target Name="Build" DependsOnTargets="..." />
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>
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>
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>
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>
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>
These tests fail on the CoreCLR browser-wasm path for product-level
reasons tracked in dotnet#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>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Restore eng/pipelines/runtime.yml and eng/pipelines/coreclr/ci.yml to
their state on origin/main, reverting the two scratch commits:
  - e0b758c [DO NOT MERGE] runtime.yml: trim to WBT-only for PR testing
  - fb69e23 [DO NOT MERGE] Disable runtime-coreclr pipeline for PR testing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…k, pass harness env to template install

- 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>
The class is now excluded on CoreCLR via the existing
'-notrait category=native' xunit filter (and was already removed from
BuildWasmAppsJobsListCoreCLR.txt in 101fcae), so the per-method
ConditionalTheory(IsMonoRuntime) gating is no longer needed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…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>
Remove class-level [TestCategory("native")] from NativeBuildTests,
NativeLibraryTests, PInvokeTableGeneratorTests, and DllImportTests so
non-AOT methods pass the CoreCLR xunit filter (-notrait category=native).
AOT-only methods get a method-level [TestCategory("native")] to keep
them excluded on CoreCLR.

NativeLibraryTests: four mixed theories (both aot=false and aot=true
inline data) are split into a non-AOT theory and a separate AOT-only
theory tagged 'native', because xunit trait filtering is per-method,
not per-theory-row.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 22, 2026 15:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands CoreCLR coverage for Wasm.Build.Tests by narrowing the category=native test categorization to AOT-only cases, and adds supporting plumbing (env vars, template install, emsdk provisioning/payload) so CoreCLR WBT can perform native relink end-to-end.

Changes:

  • Reclassify WBT “native” tests: remove class-level TestCategory("native") and apply it only to AOT-only methods so non-AOT tests run on CoreCLR.
  • Wire CoreCLR WBT build inputs via env vars + local Directory.Build.{props,targets} imports, and ensure WASM templates are installed when running without workloads.
  • Update Helix payload/staging and pipelines to provision EMSDK for CoreCLR WBT (plus temporary PR-CI trimming changes).

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/mono/wasm/Wasm.Build.Tests/data/RunScriptTemplate.sh Re-export CoreCLR WBT path env vars to child processes.
src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.targets Import BrowserWasmApp.CoreCLR.targets for CoreCLR local runs when workloads aren’t used.
src/mono/wasm/Wasm.Build.Tests/data/Local.Directory.Build.props Populate CoreCLR-required MSBuild properties early (pre-targets import) via env vars.
src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj Set CoreCLR-only env vars (incl. EMSDK_PATH fallback) for local runs.
src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs Install WASM templates on-demand when workloads aren’t installed.
src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs Add rationale comments for CoreCLR-excluded native-category template tests.
src/mono/wasm/Wasm.Build.Tests/PInvokeTableGeneratorTests.cs Move native category to AOT-only test methods.
src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs Split mixed AOT/non-AOT theories; tag AOT variants as native.
src/mono/wasm/Wasm.Build.Tests/NativeBuildTests.cs Move native category to AOT-only test methods so non-AOT runs on CoreCLR.
src/mono/wasm/Wasm.Build.Tests/DllImportTests.cs Remove class-level native category to allow CoreCLR execution.
src/mono/wasm/Wasm.Build.Tests/Common/EnvironmentVariables.cs Add env vars for CoreCLR WBT payload-relative paths.
src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs Flow CoreCLR WBT path env vars into dotnet-new project builds.
src/libraries/sendtohelix-browser.targets Ensure EMSDK payload for CoreCLR BuildWasmApps; stage eng targets; export required env vars on Helix.
eng/pipelines/runtime.yml Temporarily trims PR CI to WBT-only legs and makes some jobs unconditional.
eng/pipelines/coreclr/ci.yml Temporarily disables the runtime-coreclr PR pipeline triggers.
eng/pipelines/common/templates/browser-wasm-coreclr-build-tests.yml Provision emsdk on the CoreCLR WBT agent before send-to-Helix.
eng/AcquireEmscriptenSdk.proj Ensure acquire runs via BeforeTargets="Build" to avoid NoTargets target override.

Comment on lines +225 to +232
// 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;

Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EnsureWasmTemplatesInstalled starts a new dotnet new install process but does not set NUGET_PACKAGES in psi.Environment. Since s_buildEnv.EnvVars doesn't include NUGET_PACKAGES, this install may write to the default user global packages folder (breaking the harness's isolation and potentially failing on restricted/readonly environments). Consider explicitly setting NUGET_PACKAGES to a deterministic per-test/per-process path (e.g., under BuildEnvironment.TmpPath) for this process, or include it in s_buildEnv.EnvVars for the duration of the install.

Copilot uses AI. Check for mistakes.
Comment on lines +239 to +252
const int processTimeoutMilliseconds = 120_000;
if (!process.WaitForExit(processTimeoutMilliseconds))
{
try
{
if (!process.HasExited)
process.Kill(entireProcessTree: true);
}
catch (InvalidOperationException)
{
}

process.WaitForExit();

Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The timeout path calls process.Kill(entireProcessTree: true) and then process.WaitForExit() with no further timeout. If the kill fails (or hangs) this can block the test process indefinitely, which is especially risky on CI/Helix. Consider bounding the post-kill wait (and/or catching broader exceptions like Win32Exception) and surfacing a clear failure if the process cannot be terminated.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +3
trigger: none

pr: none
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change disables the runtime-coreclr pipeline for both CI and PRs (trigger: none / pr: none). If merged, CoreCLR PR validation would stop running entirely, which is a high-risk operational regression. This should be reverted before merging, or gated so it only applies to temporary/experimental iterations.

Suggested change
trigger: none
pr: none
trigger:
branches:
include:
- main
pr:
branches:
include:
- main

Copilot uses AI. Check for mistakes.
Comment thread eng/pipelines/runtime.yml
Comment on lines 67 to 133
@@ -126,1921 +89,45 @@ 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
parameters:
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)

Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eng/pipelines/runtime.yml has been trimmed down to only a few browser-wasm jobs and several remaining jobs are now unconditional (alwaysRun: true / condition: true). If merged, this would remove most standard runtime PR coverage (libraries/installer/runtime tests, etc.) for all PRs targeting main/release branches. Please revert these pipeline edits before merging, or gate them behind a variable/branch condition so they cannot land accidentally.

Copilot uses AI. Check for mistakes.
@maraf maraf added arch-wasm WebAssembly architecture test-enhancement Improvements of test source code os-browser Browser variant of arch-wasm labels Apr 22, 2026
@maraf maraf added this to the 11.0.0 milestone Apr 22, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm test-enhancement Improvements of test source code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants