Skip to content

[CI] Simplify artifact downloads to exact build IDs - #4883

Merged
mattleibow merged 1 commit into
mainfrom
mattleibow-simplify-artifact-downloads
Sep 3, 2026
Merged

mattleibow merged 1 commit into
mainfrom
mattleibow-simplify-artifact-downloads

Conversation

@mattleibow

Copy link
Copy Markdown
Contributor

Description

The artifact downloader still carried the machinery for reusing native artifacts from an arbitrary earlier build: a sourceBuildId parameter, a latest → latestFromBranch fallback, and the DOWNLOAD_VERSION_TYPE / DOWNLOAD_BRANCH variables that went with it.

That capability belonged to the old buildExternals / DOWNLOAD_EXTERNALS flow, where a run could be pointed at an exact prior native build (or latest) instead of compiling. Content-based Cache@2 replaced that build-reuse decision in #3826, and the last caller passing sourceBuildId was deleted in the same change. Nothing has passed it since.

Downloads now resolve to exactly one of two sources: the current run, or the exact upstream run of the SkiaSharp pipeline resource for connected pipelines such as Tests.

Why the removal is safe

I traced every current call path — public 345, internal Build 1642, and Tests 1630:

  • Only one caller. scripts/azure-templates-jobs-bootstrapper.yml is the sole consumer of the download template, and it passes only condition and artifacts. A tree-wide search for sourceBuildId / latestFromBranch / DOWNLOAD_VERSION_TYPE / DOWNLOAD_BRANCH / DOWNLOAD_EXTERNALS across scripts/, .github/, .agents/, eng/ and documentation/ returns no other producer or consumer.
  • latest was unreachable. $buildId -eq 'latest' could only be true via sourceBuildId (no caller), RESOURCES_PIPELINE_SKIASHARP_RUNID (always a numeric run ID) or BUILD_BUILDID (always numeric). So buildVersionToDownload was already always specific in every pipeline.
  • branchName was inert. In DownloadBuildArtifactsV1, branchName is gated on buildVersionToDownload == latestFromBranch and is only forwarded to pipeline resolution on that branch. With specific, omitting it is behaviour-neutral rather than merely tolerated — so dropping DOWNLOAD_BRANCH and the PR-target-branch selection is a no-op.
  • Combined pipelines were already self-referential. In public 345 and internal 1642 the non-currentRun path resolved to the same pipeline and the same build as the currentRun path; only the ignored branchName differed.
  • Tests 1630 is unaffected. It keeps resolving through RESOURCES_PIPELINE_SKIASHARP_RUNID / _PIPELINEID, both retained.

The DOWNLOAD_PIPELINE_ID resolution is kept even though DownloadBuildArtifacts@1 does not read definition on the specific path, because task.json marks that input required when buildType == specific and an empty value risks an "input required" failure.

Also drops the stale buildExternals guidance from documentation/dev/updating-dotnet-version.md — it instructed contributors to set and then reset a pipeline parameter that no longer exists — and replaces it with how native artifact reuse actually works today (repo-deps.py hashing + Cache@2 + CACHE_SKIP).

Changes

ABI-affecting changes: None. This is CI/build infrastructure and documentation only; no managed or native API surface is touched.

  • scripts/azure-templates-steps-download-artifacts.yml — removed the sourceBuildId parameter, the latest → latestFromBranch selection, the DOWNLOAD_VERSION_TYPE and DOWNLOAD_BRANCH variables, and the branchName task input. buildVersionToDownload is now the literal specific. The resolver step now sets only DOWNLOAD_BUILD_ID and DOWNLOAD_PIPELINE_ID.
  • documentation/dev/updating-dotnet-version.md — removed the buildExternals pre-merge checklist item and rewrote the "Reusing Native Artifacts" troubleshooting section to describe content-based caching.

Required skia PR

None.

Areas Affected

  • Build/CI infrastructure
  • Documentation
  • SkiaSharp managed API
  • HarfBuzzSharp
  • Native code / C API
  • Samples
  • Tests

Testing

No new test was added: the change is a pure deletion of unreachable YAML branches, and the repo's existing PowerShell validation pattern only fits extracted script files. Extracting the six-line resolver into a script purely to unit-test it was more boilerplate than logic, so the resolver stays inline. Validation performed:

  • YAML parse — all 24 pipeline definitions (scripts/*.yml + es-metadata.yml) parse cleanly with PyYAML, 0 failures.
  • Cache coverage — python3 scripts/infra/caching/repo-deps.py validate → [PASS] All files covered!, Uncovered: 0.
  • Existing pipeline tests — SetBuildVariables.Tests.ps1 and PrepareApiScanInputs.Tests.ps1 both pass unchanged.
  • Task-behaviour verification — confirmed against DownloadBuildArtifactsV1 task.json and the agent plugin that branchName and definition are unread when buildVersionToDownload is specific.
  • Dead-code audit — independently re-verified by a second review pass; no remaining producer or consumer of any removed variable, and git log -S sourceBuildId confirms Add content-based build caching with ADO Cache@2 #3826 removed the last one.

Full CI on this PR exercises the change directly: every job that downloads artifacts (native merge, package, and the 21 test-stage download sites) runs through the modified template.

No rendering behaviour changes, so no before/after screenshots apply.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Try the packages from this PR

Warning

Do not run these scripts without first reviewing the code in this PR.

Step 1 — Download the packages

bash / macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 4883

PowerShell / Windows:

iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4883"

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-4883/packages --name skiasharp-pr-4883
More options
Option Description
--successful-only / -SuccessfulOnly Only use successful builds
--force / -Force Overwrite previously downloaded packages
--list / -List List available artifacts without downloading
--build-id ID / -BuildId ID Download from a specific build

Or download manually from Azure Pipelines — look for the nuget artifact on the build for this PR.

Remove the source when you're done:

dotnet nuget remove source skiasharp-pr-4883

@github-actions

Copy link
Copy Markdown
Contributor

📖 Documentation Preview

The documentation for this PR has been deployed and is available at:

🔗 View Staging Site
🔗 View Staging Docs
🔗 View Staging Gallery (Blazor)
🔗 View Staging Gallery (Uno Platform)
🔗 View Staging SkiaFiddle

This preview will be updated automatically when you push new commits to this PR.


This comment is automatically updated by the documentation staging workflow.

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

📊 SkiaSharp benchmarks — PR #4883

⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS

Informational only — this never blocks the PR. 🟢 faster / less allocation · 🔴 slower / more allocation; moves under 5% are hidden as noise.

⏱️ Times are raw BenchmarkDotNet means, and the ⭐ PR and baseline legs run on separate CI runners, so microbenchmarks can swing run-to-run — treat small time deltas as noise. Allocations are deterministic and the reliable signal. The interactive perf-dashboard (linked below) applies smoothing for the trend view.

Highlights

⏱️ Time — 🔴 45 slower · 🟢 20 faster

  • 🔴 ColorMathBenchmark.ToColor(Colors: 4096) · Windows · 11.93 µs → 17.18 µs (+44%)
  • 🔴 RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) · Windows · 93.61 µs → 127.73 µs (+36%)
  • 🔴 MatrixMapPointsBenchmark.MapPoints(Points: 256) · macOS · 129.4 ns → 174.4 ns (+35%)
  • 🟢 BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) · macOS · 281.56 µs → 202.23 µs (-28%)
  • 🔴 MatrixMapPointsBenchmark.MapPoints(Points: 256) · Linux · 206.0 ns → 259.1 ns (+26%)
  • …and 60 more (see details below)
Full per-OS benchmark deltas

Linux

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.26431.1)

Benchmark baseline this PR Δ
MatrixMapPointsBenchmark.MapPoints(Points: 256) 206.0 ns 259.1 ns 🔴 +26%
ColorMathBenchmark.ToColor(Colors: 4096) 14.65 µs 11.66 µs 🟢 -20%
MatrixOpsBenchmark.Invert(Count: 4096) 127.56 µs 148.92 µs 🔴 +17%
MatrixMapPointsBenchmark.MapRect(Points: 256) 10.98 µs 12.62 µs 🔴 +15%
MatrixMapPointsBenchmark.MapRect(Points: 4096) 176.40 µs 201.97 µs 🔴 +14%
MatrixOpsBenchmark.Concat(Count: 4096) 216.23 µs 247.23 µs 🔴 +14%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 72.05 µs 81.93 µs 🔴 +14%
ColorMathBenchmark.PreMultiply(Colors: 4096) 12.86 µs 14.53 µs 🔴 +13%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 4.62 µs 5.16 µs 🔴 +12%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 11.40 µs 12.67 µs 🔴 +11%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 96.20 µs 106.42 µs 🔴 +11%
MatrixMapPointsBenchmark.MapVector(Points: 256) 10.85 µs 11.93 µs 🔴 +10%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 173.02 µs 187.78 µs 🔴 +9%
PathBoundsBenchmark.TightBounds(Points: 1024) 10.54 µs 11.42 µs 🔴 +8%
ColorMathBenchmark.ToColorF(Colors: 4096) 13.14 µs 14.03 µs 🔴 +7%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 227.19 µs 242.00 µs 🔴 +7%
RuntimeEffectShaderBenchmark.DrawFrame 2.85 ms 3.03 ms 🔴 +6%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 14.32 µs 15.13 µs 🔴 +6%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 353.98 µs 372.86 µs 🔴 +5%
CanvasDrawBenchmark.Draw(Shapes: 64) 4.16 ms 4.37 ms 🔴 +5%

Windows

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.26431.1)

Benchmark baseline this PR Δ
ColorMathBenchmark.ToColor(Colors: 4096) 11.93 µs 17.18 µs 🔴 +44%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 93.61 µs 127.73 µs 🔴 +36%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 2.15 µs 2.70 µs 🔴 +25%
PathBoundsBenchmark.TightBounds(Points: 64) 1.56 µs 1.91 µs 🔴 +23%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 243.09 µs 289.92 µs 🔴 +19%
PathBoundsBenchmark.TightBounds(Points: 1024) 17.38 µs 20.37 µs 🔴 +17%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 179.7 ns 204.3 ns 🔴 +14%
CanvasDrawBenchmark.Draw(Shapes: 64) 2.57 ms 2.87 ms 🔴 +11%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 2.52 ms 2.23 ms 🟢 -11%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 152.27 µs 168.73 µs 🔴 +11%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 817.24 µs 735.05 µs 🟢 -10%
CanvasDrawBenchmark.Draw(Shapes: 512) 20.83 ms 22.90 ms 🔴 +10%
ColorMathBenchmark.PreMultiply(Colors: 4096) 14.70 µs 13.35 µs 🟢 -9%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 2.82 ms 2.57 ms 🟢 -9%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 9.63 µs 10.41 µs 🔴 +8%
MatrixOpsBenchmark.Invert(Count: 4096) 148.97 µs 137.05 µs 🟢 -8%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 11.28 ms 10.43 ms 🟢 -8%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 5.34 µs 4.94 µs 🟢 -8%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 85.47 µs 79.28 µs 🟢 -7%
ColorParseBenchmark.Parse(Iterations: 1000) 78.05 µs 83.21 µs 🔴 +7%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 3.23 ms 3.02 ms 🟢 -6%
ColorMathBenchmark.ToColorF(Colors: 4096) 14.12 µs 13.31 µs 🟢 -6%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 978.12 µs 923.43 µs 🟢 -6%

macOS

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.26431.1)

Benchmark baseline this PR Δ
MatrixMapPointsBenchmark.MapPoints(Points: 256) 129.4 ns 174.4 ns 🔴 +35%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 281.56 µs 202.23 µs 🟢 -28%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 1.14 µs 1.38 µs 🔴 +21%
ColorParseBenchmark.Parse(Iterations: 1000) 63.52 µs 74.02 µs 🔴 +17%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 187.56 µs 156.88 µs 🟢 -16%
MatrixOpsBenchmark.Invert(Count: 4096) 77.77 µs 65.76 µs 🟢 -15%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 1.39 ms 1.19 ms 🟢 -14%
MatrixMapPointsBenchmark.MapRect(Points: 256) 2.99 µs 3.41 µs 🔴 +14%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 675.69 µs 767.62 µs 🔴 +14%
ColorMathBenchmark.ToColorF(Colors: 4096) 4.93 µs 5.56 µs 🔴 +13%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 1.84 µs 2.06 µs 🔴 +12%
PathBoundsBenchmark.TightBounds(Points: 64) 978.9 ns 858.8 ns 🟢 -12%
ColorMathBenchmark.PreMultiply(Colors: 4096) 8.31 µs 9.31 µs 🔴 +12%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 6.15 ms 5.46 ms 🟢 -11%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 1.47 ms 1.63 ms 🔴 +11%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 2.66 ms 2.95 ms 🔴 +11%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 7.52 µs 8.27 µs 🔴 +10%
ColorMathBenchmark.ToColor(Colors: 4096) 18.89 µs 20.77 µs 🔴 +10%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 19.53 µs 21.39 µs 🔴 +10%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 549.17 µs 587.25 µs 🔴 +7%
CanvasDrawBenchmark.Draw(Shapes: 64) 1.48 ms 1.38 ms 🟢 -7%
RuntimeEffectShaderBenchmark.DrawFrame 562.26 µs 531.91 µs 🟢 -5%

📈 Full interactive perf-dashboard & run details →

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

📦 Artifact size report

Packages from this PR (build 1577752) vs the latest nightly baseline 4.152.0-nightly.47 (observed 2026-09-01).

Total .nupkg size: 569.6 MB → 569.0 MB (−629.1 KB, -0.1%)

Packages

⚠️ marks growth over 500.0 KB or 2%. Changes under 50.0 KB are treated as noise.

Package baseline this PR Δ Δ%
SkiaSharp.NativeAssets.WinUI 109.1 MB 108.3 MB 🟢 −769.6 KB -0.7%
SkiaSharp.NativeAssets.WebAssembly 69.7 MB 69.7 MB 🔴 +56.9 KB +0.1%

+39 package(s) unchanged (< 50.0 KB).

Per-file changes

SkiaSharp.NativeAssets.WinUI

File Size
runtimes/win-arm64/native/libGLESv2.pdb 64.5 MB → 64.4 MB (🟢 −112.0 KB)
runtimes/win-x64/native/libGLESv2.pdb 66.6 MB → 66.5 MB (🟢 −112.0 KB)
runtimes/win-x86/native/libGLESv2.pdb 67.3 MB → 67.2 MB (🟢 −96.0 KB)

Informational only — this never blocks the PR. Native binaries are labelled by os/arch.

mattleibow added a commit that referenced this pull request Aug 28, 2026
[CI] Backport Arcade release infrastructure to 4.151.x (#4863)

Context: #4802
Context: 46ea724
Context: #4842
Context: 398bcdd
Context: #4803
Context: 2dd5087
Context: #4846
Context: #4877
Context: 6386960
Context: #4859
Context: #4889
Context: #4883
Context: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1571474
Context: https://github.com/mono/SkiaSharp/actions/runs/32862258889
Context: https://github.com/mono/SkiaSharp/actions/runs/33122720179

Complete the 4.151.x release line's move from its legacy split pipelines to
repository-owned dnceng pipelines and a standard Arcade V3 package flow. Keep
public validation free of protected side effects while giving trusted internal
release builds the signing, API Scan, BAR registration, and promotion inputs
needed to produce 4.151.3.

Preserve the branch's product, runtime, managed API, C API, native source, Skia
submodule, preview-workload, Xcode, and test topology. Do not add the Apple
symbol production from #4846, `SkiaSharp.Vulkan.Silk.NET`, new product or
container families, generated bindings or documentation, or unrelated release
automation. #4859 supplied historical compatibility constraints, but its
manual release-skill design is superseded by #4889 and is not backported.
This change does not register, promote, publish, or otherwise release the PR
build.

~~ Connected dnceng release topology ~~

The old Native, Package, and Tests definitions exchanged independently numbered
artifacts, which obscured source, package, and test provenance. Make the package
root use `buildPipelineType: 'build'` so one Build owns Prepare, Native, and
Package, and make the connected Tests definition consume the folder-qualified
`\dotnet\skiasharp\skiasharp-package` resource.

Use the same repository stage templates in public validation through the local
1ES output adapter. Expand signing, API Scan, and publishing stages only for
non-PR builds in the internal project, so public and PR template expansion
cannot acquire protected release side effects. Retain the branch's native-only
pipeline role rather than importing the newer main-only topology wholesale.

Trigger the Build directly for `main` and `release/*` path changes instead of
waiting for a separate Native pipeline to finish. Keep the branch's
`azure-pipelines-complete-internal.yml` and native-only root compatible with the
shared stages because other historical entry points still consume them.

~~ dnceng execution policy ~~

The internal root still extended the DevDiv MicroBuild 1ES template and loaded
shared stages from `DevDiv/Xamarin.yaml-templates`, neither of which is
available to a dnceng-owned pipeline. Move it to the released
`v1/1ES.Official.PipelineTemplate.yml` and remove that repository dependency.

Configure Armory, BinSkim, CredScan, ESLint, PoliCheck, and PSScriptAnalyzer to
break the build, and run CodeQL on non-default branches. Keep network isolation
in Audit while permanent mirrors and allowlisting are completed; the policy is
intentionally not presented as fully enforced.

Build and merge the MSVC Win32 artifacts without the old
`System.TeamProject == 'devdiv'` condition. That predicate cannot match in
dnceng, and retaining it would remove the `native_msvc` input required by API
Scan.

~~ Exact 4.151.3 build identity ~~

Feature names and loosely parsed downstream counters could assign different
identities to producing and consuming runs. Derive the product build number
from Arcade's `yyyyMMdd.revision` OfficialBuildId, normalize GitHub and Azure
Repos source identity, and make Tests inherit the Build run name.

PR builds use `pr.<number>`, schedules use `nightly`, and ordinary builds keep
their configured preview label. Only an internal `release/*` producer may use
the `stable` sentinel to clear the suffix and emit exact 4.151.3 packages.
Emit `DOTNET_FINAL_VERSION_KIND=release` for that case and reject malformed or
incomplete source identities instead of manufacturing a plausible version.

Require exact Build run IDs when downloading pipeline artifacts and reject the
mutable `latestFromBranch` mode. Shared package downloaders use the branch
transport alias and no longer fall back to a commit alias, matching the one
transport version registered for each package ID. Keep this historical branch
fail-closed on its existing downloader shape rather than taking the broader
dead-code removal still under review in #4883.

The Prepare gate exercises GitHub and Azure Repos PRs, downstream run-name
inheritance, exact releases, and malformed identities. Build 1571474 used the
resulting `4.151.3-pr.4863.26427.5` identity.

~~ One package and transport family ~~

The historical graph packed stable and preview products separately and then
created stable, preview, symbol, branch, and commit transport variants. Pack one
coherent product family and create one PR transport family for PR validation or
one branch transport family otherwise. Keep commit aliases out of NonShipping
so BAR cannot receive multiple versions of the same transport package ID.

Run normal and transport packing in one `package_windows` job. Publish the raw
`nuget` and `nuget_special` artifacts beside deterministic
`arcade_shipping`, `arcade_nonshipping`, and `PdbArtifacts` views. Remove the
separate `nuget_preview` and `nuget_symbols` pipeline artifacts. Mark transport
projects non-shipping and give `_NuGets`, `_NativeAssets`, and `_Dependencies`
the Microsoft copyright, MIT expression, and project URL required by Arcade.

Documentation and generated sample jobs now select the build's single package
family instead of assuming stable and preview packages coexist. Package jobs
no longer restore from the shared build cache because package versions and the
transport family depend on run identity rather than repository inputs alone.
Shared consumers resolve transport packages from the dnceng transport feed.

~~ Real loose PDB artifacts ~~

Arcade V3 requires a `PdbArtifacts` input, but cloning customer packages into
manufactured fallback symbol packages would create false package identities.
Keep existing explicit symbol packages in Shipping. For product packages
without one, extract implementation and runtime PDBs under their original
package, version, TFM, and RID paths.

Skip `ref/**`, reject archive entries that escape the package extraction root,
and avoid loose-PDB duplication when an explicit symbol package owns the
symbols. Emit `.empty` only when no eligible PDB exists. A Package-stage gate
exercises both transport families, explicit-symbol ownership,
reference-symbol exclusion, empty output, and traversal rejection.

Build 1571474 published byte-identical raw and prepared package sets and a
path-safe `PdbArtifacts` payload containing only the intended loose PDBs.

~~ Explicit signing and BAR inputs ~~

Arcade's broad signing defaults do not describe SkiaSharp's mixed first-party,
Mac developer, generated JavaScript, WebGPU, and transport payloads. Replace
them with an explicit repository policy. Sign Shipping NuGets and their
classified first-party contents, preserve Mac developer signing, and classify
source payloads that must retain their existing bytes as `CertificateName=None`.

Keep NonShipping transport packages unsigned and prevent SignCheck from
unpacking them. `DO-NOT-SIGN` exclusions make validation fail if a transport or
listed source payload is unexpectedly signed. Do not add
`SkiaSharp.Vulkan.Silk.NET` to the policy because that package is absent from
4.151.x, and do not manufacture or consume the Apple symbol packages added by
#4846.

Retain the source contract's `scripts/infra/signing` cache-input category even
though no such helper directory exists yet, so the cache configuration stays
aligned with main without importing additional tooling.

Generate the Arcade V3 manifest from signed Shipping and prepared NonShipping
assets. Main and release branches select real signing and BAR publication;
other trusted branches test-sign unless explicitly forced, and forced BAR side
effects additionally require `registerInBar`. Post-build validation keeps
`publishAssetsImmediately: false` and requires default channels before
promotion.

~~ Fail-closed API Scan coverage ~~

The legacy inline scan extracted packages without proving that its binaries,
PDBs, surrogates, or configured targets existed. Add a repository-owned stage
that downloads the current `nuget` and `native_msvc` artifacts, activates the
dedicated WIF identity, runs API Scan in release mode, and reports at Note
severity.

Prepare checked Win32, NanoServer, and WinUI mappings. Use x64 MSVC surrogates
for Win32 and HarfBuzzSharp ARM64 targets, and staged x64 package binaries for
WinUI ARM64 targets. Fail when packages, binaries, PDBs, surrogate files, or
target matches are absent, and make PostAnalysis fail at Note severity. Run the
focused preparation suite during Prepare so input drift fails before a
protected scan stage is requested.

~~ Historical SDK and pipeline compatibility ~~

The repository's 10.0.108 SDK was too old for Arcade package download, while
the branch's Apple and WinUI jobs could not simply adopt every newer tool.
Move repository-owned builds and the existing checkout-consuming native
containers to SDK 10.0.203 with `latestPatch` roll-forward. Pin workload set
10.0.202 for the branch's macOS 15 and Xcode 26.3 combination.

Visual Studio MSBuild 17.x cannot load the 10.0.2xx SDK used by Cake and managed
builds. Install the retained 10.0.108 SDK side by side for the WinUI and WinUI
ANGLE jobs. Update only Dockerfiles already present and consumed on 4.151.x;
do not import absent container families or main's later product and toolchain
changes.

~~ Servicing-pool runtime prerequisites ~~

The branch still used Microsoft-hosted and `Maui-1ESPT` defaults, so it did not
inherit Arcade's release-aware dnceng routing. Move the Windows and Linux
defaults to `DncEngPublicBuildPool` or `DncEngInternalBuildPool`, which select
servicing pools for `release/*`, while retaining queue-time object overrides
and hosted Apple jobs.

The lean public servicing Linux image exposed two assumptions hidden by the
general pool. Managed Linux builds Android libraries but did not install the
Android SDK because the bootstrapper installed it only on non-Linux agents.
Provision the SDK, platform tools, build-tools 35.0.0 and 36.0.0, and configured
API levels for every Android-installing agent, then pass
`AndroidSdkDirectory` into Cake.

Both Linux WASM jobs also assumed Chrome was preinstalled. Download the pinned
Chrome package, verify its SHA-256, package name, version, and architecture,
install it, and export `CHROME_PATH` before running product tests.

Build 1571474 completed the public release topology on the final head,
including managed Android and the WASM product-test paths. The artifact and test
outputs demonstrated that the servicing images now provide the tools these
branch-native jobs require.

~~ Tracking benchmark feed compatibility ~~

The nightly resolver selects versions from the dnceng EAP feed, but the nested
tracking benchmark configuration still restored from the legacy Xamarin feed.
The nightly benchmark paths in run 32862258889 therefore failed package restore
before BenchmarkDotNet could run. Align the nested benchmark source with dnceng;
do not change benchmark logic or product code.

Current-head run 33122720179 confirmed that the selected nightly packages
restore and the existing benchmark workflows run without changing benchmark
or product behavior.

Co-authored-by: Matthew Leibowitz <[email protected]>
Co-authored-by: Matthew Leibowitz <[email protected]>
Co-authored-by: Copilot App <[email protected]>
The artifact downloader still carried the machinery for reusing native
artifacts from an arbitrary earlier build: a `sourceBuildId` parameter, a
`latest` -> `latestFromBranch` fallback, and the `DOWNLOAD_VERSION_TYPE` /
`DOWNLOAD_BRANCH` variables that went with it.

That capability belonged to the old `buildExternals` / `DOWNLOAD_EXTERNALS`
flow, which selected an exact prior native build (or `latest`) to download
instead of compiling. Content-based `Cache@2` replaced that build-reuse
decision in #3826, and the last caller passing `sourceBuildId` was deleted in
the same change. Nothing has passed it since.

With no caller supplying `latest`, `buildVersionToDownload` was always
`specific`, so `DownloadBuildArtifacts@1` never read `branchName` and the
PR-target-branch selection had no effect. Downloads now resolve to exactly one
of two sources: the current run, or the exact upstream run of the SkiaSharp
pipeline resource for connected pipelines such as Tests.

Also drops the stale `buildExternals` guidance from the .NET upgrade docs,
which pointed at a parameter that no longer exists, and replaces it with how
native artifact reuse actually works today.

Co-authored-by: Copilot App <[email protected]>
@mattleibow
mattleibow force-pushed the mattleibow-simplify-artifact-downloads branch from 9023569 to 56e7fde Compare September 1, 2026 23:45
@mattleibow
mattleibow merged commit f1c4b6d into main Sep 3, 2026
115 checks passed
@mattleibow
mattleibow deleted the mattleibow-simplify-artifact-downloads branch September 3, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants