From 359b11bcc7ff2b318230269610d53d0b0de8949d Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Sat, 18 Jul 2026 20:39:36 -0500 Subject: [PATCH 1/2] [perf] Stage CoreCLR wasm runtime pack for Mono workload install The wasm-tools workload manifest now includes the CoreCLR browser-wasm runtime pack (Microsoft.NETCore.App.Runtime.browser-wasm), added in #130380. The Mono perf build (-s mono+libs+host+packs) only produces the Mono runtime pack, so "Install workload using artifacts" fails because the CoreCLR pack isn't in the local feed. Mirror the approach from #130380: the wasm_coreclr build job publishes its runtime pack, and the Mono wasm build job depends on it, downloads it, and stages it into the local package feed before installing the workload. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: eaef2b16-b53d-4398-9bc9-c2f145999add --- .../templates/perf-wasm-build-jobs.yml | 9 ++++- .../perf-wasm-prepare-artifacts-steps.yml | 39 +++++++++++++++++++ 2 files changed, 47 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..aaf2a2375cfa77 100644 --- a/eng/pipelines/performance/templates/perf-wasm-build-jobs.yml +++ b/eng/pipelines/performance/templates/perf-wasm-build-jobs.yml @@ -11,10 +11,16 @@ 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, so the + # workload install below 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. + dependsOn: + - build_browser_wasm_linux_Release_wasm_coreclr postBuildSteps: - 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 @@ -34,4 +40,5 @@ jobs: configForBuild: Release artifactName: BrowserWasmCoreCLR sdkDirName: dotnet-none - includeRefPack: false \ No newline at end of file + includeRefPack: false + publishCoreClrRuntimePack: true 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..1a0ad1d6d85b74 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,31 @@ 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: DownloadBuildArtifacts@0 + displayName: "Download CoreCLR runtime pack for workload install" + inputs: + buildType: current + artifactName: BrowserWasmCoreCLRRuntimePack_$(_hostedOs) + downloadType: single + downloadPath: $(Build.SourcesDirectory)/artifacts/coreclr-runtimepack + + - script: >- + mkdir -p $(Build.SourcesDirectory)/artifacts/packages/${{ parameters.configForBuild }}/Shipping && + cp $(Build.SourcesDirectory)/artifacts/coreclr-runtimepack/BrowserWasmCoreCLRRuntimePack_$(_hostedOs)/*.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 +53,22 @@ 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-build-artifacts.yml + parameters: + isOfficialBuild: false + displayName: Publish CoreCLR runtime pack for workload + inputs: + PathtoPublish: $(Build.SourcesDirectory)/artifacts/staging-coreclr-runtimepack + artifactName: BrowserWasmCoreCLRRuntimePack_$(_hostedOs) + - template: /eng/pipelines/common/upload-artifact-step.yml parameters: rootFolder: '$(Build.SourcesDirectory)/artifacts/staging' From 1f4990e4beca963600885dc032de67a69fafdac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Sun, 19 Jul 2026 11:38:10 +0200 Subject: [PATCH 2/2] Use pipeline-artifact tasks for the wasm-perf CoreCLR runtime pack PR #128498 migrated eng/pipelines from PublishBuildArtifacts to PublishPipelineArtifact and removed eng/pipelines/common/templates/publish-build-artifacts.yml. This branch predates that merge, so it referenced the now-deleted publish-build-artifacts.yml template and the legacy DownloadBuildArtifacts@0 task, which fail to compile / target the wrong artifact store on current main. Switch the CoreCLR runtime pack publish/download to the post-migration tasks: - publish-build-artifacts.yml -> publish-pipeline-artifacts.yml (PathtoPublish -> targetPath) - DownloadBuildArtifacts@0 -> DownloadPipelineArtifact@2 (downloadPath -> targetPath); pipeline-artifact download doesn't nest under the artifact name, so copy the nupkgs directly from the target path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ef6da291-7777-4114-9c73-05398fb2b5f6 --- .../templates/perf-wasm-prepare-artifacts-steps.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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 1a0ad1d6d85b74..a6452608f1b349 100644 --- a/eng/pipelines/performance/templates/perf-wasm-prepare-artifacts-steps.yml +++ b/eng/pipelines/performance/templates/perf-wasm-prepare-artifacts-steps.yml @@ -16,17 +16,15 @@ 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: DownloadBuildArtifacts@0 + - task: DownloadPipelineArtifact@2 displayName: "Download CoreCLR runtime pack for workload install" inputs: buildType: current artifactName: BrowserWasmCoreCLRRuntimePack_$(_hostedOs) - downloadType: single - downloadPath: $(Build.SourcesDirectory)/artifacts/coreclr-runtimepack - + targetPath: $(Build.SourcesDirectory)/artifacts/coreclr-runtimepack - script: >- mkdir -p $(Build.SourcesDirectory)/artifacts/packages/${{ parameters.configForBuild }}/Shipping && - cp $(Build.SourcesDirectory)/artifacts/coreclr-runtimepack/BrowserWasmCoreCLRRuntimePack_$(_hostedOs)/*.nupkg $(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: >- @@ -60,13 +58,12 @@ steps: 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-build-artifacts.yml + - template: /eng/pipelines/common/templates/publish-pipeline-artifacts.yml parameters: isOfficialBuild: false displayName: Publish CoreCLR runtime pack for workload inputs: - PathtoPublish: $(Build.SourcesDirectory)/artifacts/staging-coreclr-runtimepack + targetPath: $(Build.SourcesDirectory)/artifacts/staging-coreclr-runtimepack artifactName: BrowserWasmCoreCLRRuntimePack_$(_hostedOs) - template: /eng/pipelines/common/upload-artifact-step.yml