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..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'