From 6f795e7c634a391a6380f12794f2df94610a4841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Sun, 19 Jul 2026 10:59:32 +0200 Subject: [PATCH 1/2] Fix runtime-wasm-perf Mono job by supplying CoreCLR browser-wasm runtime pack PR #130380 added the CoreCLR browser-wasm runtime pack (Microsoft.NETCore.App.Runtime.browser-wasm) to the shared wasm-tools workload manifest. As a result the Mono perf build job's `dotnet workload install wasm-tools` from the local feed fails, because the Mono build (-s mono+libs+host+packs) never produces that CoreCLR pack. Mirror the fix #130380 applied to the Wasm.Build.Tests pipelines: publish the CoreCLR browser-wasm runtime pack nuget from the wasm_coreclr build job as the BrowserWasmCoreCLRRuntimePack pipeline artifact, and make the Mono build job depend on it and download it into the local Shipping package feed before the workload install step. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ef6da291-7777-4114-9c73-05398fb2b5f6 --- .../templates/perf-wasm-build-jobs.yml | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/performance/templates/perf-wasm-build-jobs.yml b/eng/pipelines/performance/templates/perf-wasm-build-jobs.yml index f38b57ca04c583..0a8f5c98ba0a99 100644 --- a/eng/pipelines/performance/templates/perf-wasm-build-jobs.yml +++ b/eng/pipelines/performance/templates/perf-wasm-build-jobs.yml @@ -11,7 +11,19 @@ jobs: buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) nameSuffix: wasm isOfficialBuild: false + # The wasm-tools workload manifest now includes the CoreCLR browser-wasm runtime pack + # (https://github.com/dotnet/runtime/pull/130380), so installing the workload requires + # that pack in the local feed. The Mono build doesn't produce it, so depend on the + # CoreCLR build job and download the pack from it. + dependsOn: + - build_browser_wasm_linux_Release_wasm_coreclr postBuildSteps: + - task: DownloadPipelineArtifact@2 + displayName: Download CoreCLR browser-wasm runtime pack + inputs: + buildType: current + artifactName: BrowserWasmCoreCLRRuntimePack + targetPath: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping - template: /eng/pipelines/performance/templates/perf-wasm-prepare-artifacts-steps.yml parameters: configForBuild: Release @@ -34,4 +46,19 @@ jobs: configForBuild: Release artifactName: BrowserWasmCoreCLR sdkDirName: dotnet-none - includeRefPack: false \ No newline at end of file + includeRefPack: false + # Publish the CoreCLR browser-wasm runtime pack nuget separately so the Mono perf + # build can install the wasm-tools workload, whose manifest now includes this pack + # (see https://github.com/dotnet/runtime/pull/130380). + - script: >- + mkdir -p $(Build.SourcesDirectory)/artifacts/staging-coreclr-runtime-pack && + cp $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping/Microsoft.NETCore.App.Runtime.browser-wasm.*.nupkg $(Build.SourcesDirectory)/artifacts/staging-coreclr-runtime-pack + displayName: "Stage CoreCLR browser-wasm runtime pack nuget" + - template: /eng/pipelines/common/templates/publish-pipeline-artifacts.yml + parameters: + isOfficialBuild: false + displayName: Publish CoreCLR browser-wasm runtime pack + inputs: + targetPath: $(Build.SourcesDirectory)/artifacts/staging-coreclr-runtime-pack + artifactName: BrowserWasmCoreCLRRuntimePack + condition: succeeded() \ No newline at end of file From dcb3e78040f0b2a2be22498c3b74204fb669cdd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Sun, 19 Jul 2026 11:29:56 +0200 Subject: [PATCH 2/2] Fix YAML compile error and use pipeline-artifact tasks for wasm-perf CoreCLR pack The previous approach invoked publish-pipeline-artifacts.yml directly as a postBuildStep. global-build-job.yml forwards osGroup/archType/buildConfig/etc. to every postBuildStep template, and publish-pipeline-artifacts.yml declares typed parameters, which enforce strict validation and reject those forwarded params -> 'Unexpected parameter' pipeline compile errors. Move the publish (CoreCLR job) and download+stage (Mono job) logic into the untyped perf-wasm-prepare-artifacts-steps.yml template behind publishCoreClrRuntimePack/downloadCoreClrRuntimePack params, mirroring the structure of #131026 but using the post-#128498 pipeline-artifact tasks (PublishPipelineArtifact/DownloadPipelineArtifact) instead of the removed publish-build-artifacts.yml template and legacy DownloadBuildArtifacts@0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ef6da291-7777-4114-9c73-05398fb2b5f6 --- .../templates/perf-wasm-build-jobs.yml | 29 +++------------ .../perf-wasm-prepare-artifacts-steps.yml | 36 +++++++++++++++++++ 2 files changed, 41 insertions(+), 24 deletions(-) diff --git a/eng/pipelines/performance/templates/perf-wasm-build-jobs.yml b/eng/pipelines/performance/templates/perf-wasm-build-jobs.yml index 0a8f5c98ba0a99..7657a8fdf4e7b4 100644 --- a/eng/pipelines/performance/templates/perf-wasm-build-jobs.yml +++ b/eng/pipelines/performance/templates/perf-wasm-build-jobs.yml @@ -12,21 +12,16 @@ jobs: nameSuffix: wasm isOfficialBuild: false # The wasm-tools workload manifest now includes the CoreCLR browser-wasm runtime pack - # (https://github.com/dotnet/runtime/pull/130380), so installing the workload requires - # that pack in the local feed. The Mono build doesn't produce it, so depend on the - # CoreCLR build job and download the pack from it. + # (https://github.com/dotnet/runtime/pull/130380), so installing the workload needs that + # pack staged into the local feed. It's produced by the wasm_coreclr build job, so depend + # on it and download its published runtime pack before the workload install. dependsOn: - build_browser_wasm_linux_Release_wasm_coreclr postBuildSteps: - - task: DownloadPipelineArtifact@2 - displayName: Download CoreCLR browser-wasm runtime pack - inputs: - buildType: current - artifactName: BrowserWasmCoreCLRRuntimePack - targetPath: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping - template: /eng/pipelines/performance/templates/perf-wasm-prepare-artifacts-steps.yml parameters: configForBuild: Release + downloadCoreClrRuntimePack: true # Build CoreCLR runtime for browser-wasm (used by --wasm-coreclr benchmarks) - template: /eng/pipelines/common/platform-matrix.yml @@ -47,18 +42,4 @@ jobs: artifactName: BrowserWasmCoreCLR sdkDirName: dotnet-none includeRefPack: false - # Publish the CoreCLR browser-wasm runtime pack nuget separately so the Mono perf - # build can install the wasm-tools workload, whose manifest now includes this pack - # (see https://github.com/dotnet/runtime/pull/130380). - - script: >- - mkdir -p $(Build.SourcesDirectory)/artifacts/staging-coreclr-runtime-pack && - cp $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping/Microsoft.NETCore.App.Runtime.browser-wasm.*.nupkg $(Build.SourcesDirectory)/artifacts/staging-coreclr-runtime-pack - displayName: "Stage CoreCLR browser-wasm runtime pack nuget" - - template: /eng/pipelines/common/templates/publish-pipeline-artifacts.yml - parameters: - isOfficialBuild: false - displayName: Publish CoreCLR browser-wasm runtime pack - inputs: - targetPath: $(Build.SourcesDirectory)/artifacts/staging-coreclr-runtime-pack - artifactName: BrowserWasmCoreCLRRuntimePack - condition: succeeded() \ No newline at end of file + publishCoreClrRuntimePack: true \ No newline at end of file diff --git a/eng/pipelines/performance/templates/perf-wasm-prepare-artifacts-steps.yml b/eng/pipelines/performance/templates/perf-wasm-prepare-artifacts-steps.yml index a0a76570a1cb11..a6452608f1b349 100644 --- a/eng/pipelines/performance/templates/perf-wasm-prepare-artifacts-steps.yml +++ b/eng/pipelines/performance/templates/perf-wasm-prepare-artifacts-steps.yml @@ -4,8 +4,29 @@ parameters: runtimeFlavor: 'mono' sdkDirName: 'dotnet-latest' includeRefPack: true + # The Mono (default) build installs the wasm-tools workload, whose manifest now includes the + # CoreCLR browser-wasm runtime pack (Microsoft.NETCore.App.Runtime.browser-wasm). A Mono-only + # build doesn't produce that pack, so download it from the CoreCLR build job and stage it into + # the local package feed before installing the workload. + downloadCoreClrRuntimePack: false + # The CoreCLR build publishes its runtime pack so the Mono build (above) can consume it. + publishCoreClrRuntimePack: false steps: + # Stage the CoreCLR browser-wasm runtime pack (built by the wasm_coreclr job) into the local + # package feed so the wasm-tools workload install below can resolve it. + - ${{ if eq(parameters.downloadCoreClrRuntimePack, true) }}: + - task: DownloadPipelineArtifact@2 + displayName: "Download CoreCLR runtime pack for workload install" + inputs: + buildType: current + artifactName: BrowserWasmCoreCLRRuntimePack_$(_hostedOs) + targetPath: $(Build.SourcesDirectory)/artifacts/coreclr-runtimepack + - script: >- + mkdir -p $(Build.SourcesDirectory)/artifacts/packages/${{ parameters.configForBuild }}/Shipping && + cp $(Build.SourcesDirectory)/artifacts/coreclr-runtimepack/*.nupkg $(Build.SourcesDirectory)/artifacts/packages/${{ parameters.configForBuild }}/Shipping/ + displayName: "Stage CoreCLR runtime pack into local feed" + - script: >- ./dotnet.sh build -p:TargetOS=browser -p:TargetArchitecture=wasm /nr:false /p:TreatWarningsAsErrors=true /p:Configuration=${{ parameters.configForBuild }} @@ -30,6 +51,21 @@ steps: - script: cp -r $(Build.SourcesDirectory)/artifacts/bin/microsoft.netcore.app.ref $(Build.SourcesDirectory)/artifacts/staging displayName: "Stage ref pack directory" + # Publish the CoreCLR browser-wasm runtime pack nuget on its own so the Mono build job can stage + # it into its local feed for the wasm-tools workload install. + - ${{ if eq(parameters.publishCoreClrRuntimePack, true) }}: + - script: >- + mkdir -p $(Build.SourcesDirectory)/artifacts/staging-coreclr-runtimepack && + find $(Build.SourcesDirectory)/artifacts/packages/${{ parameters.configForBuild }}/Shipping -maxdepth 1 -name 'Microsoft.NETCore.App.Runtime.browser-wasm.*.nupkg' -not -name '*.symbols.nupkg' -exec cp {} $(Build.SourcesDirectory)/artifacts/staging-coreclr-runtimepack \; + displayName: "Stage CoreCLR runtime pack for workload" + - template: /eng/pipelines/common/templates/publish-pipeline-artifacts.yml + parameters: + isOfficialBuild: false + displayName: Publish CoreCLR runtime pack for workload + inputs: + targetPath: $(Build.SourcesDirectory)/artifacts/staging-coreclr-runtimepack + artifactName: BrowserWasmCoreCLRRuntimePack_$(_hostedOs) + - template: /eng/pipelines/common/upload-artifact-step.yml parameters: rootFolder: '$(Build.SourcesDirectory)/artifacts/staging'