Repository navigation
Add Darc package publishing and retrieval - #4800
Conversation
Register real-signed package builds in BAR through Arcade V3, require default-channel promotion, and add a fail-closed Darc downloader that pins repository, commit, channel, package versions, and signatures while emitting provenance evidence. Co-authored-by: Copilot App <[email protected]>
📦 Try the packages from this PRWarning 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 -- 4800PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4800"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-4800/packages --name skiasharp-pr-4800More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4800 |
Use the configured General Testing Internal channel and its private Azure DevOps feed in the operator flow instead of a placeholder channel name. Co-authored-by: Copilot App <[email protected]>
📊 SkiaSharp benchmarks — PR #4800⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS
Highlights⏱️ Time — 🔴 53 slower · 🟢 26 faster
📦 Allocations — 🔴 1 more alloc · 🟢 0 less alloc
Full per-OS benchmark deltasLinux⏱️ Time (vs 🌙 nightly
📦 Allocations (vs 🌙 nightly
Windows⏱️ Time (vs 🌙 nightly
macOS⏱️ Time (vs 🌙 nightly
|
Record the exact production default-channel configuration, pipeline permissions, and temporary validation-branch workflow without changing maestro-configuration itself. Co-authored-by: Copilot App <[email protected]>
Migrate CI to dnceng with Arcade shipping and transport (#4803) Context: #4775 Context: #4800 Context: #4801 Context: #4802 Context: #4838 Context: #4842 Context: #4846 Context: #4859 Context: https://dev.azure.com/dnceng/internal/_git/dotnet-SkiaSharp/pullrequest/63954 Context: https://dev.azure.com/dnceng/internal/_build/results?buildId=3057398 Replace the legacy DevDiv Native -> Managed -> Tests chain with repository-owned dnceng pipelines and a standard Arcade V3 package flow. Keep public validation unsigned, reserve protected identities for internal signing, scanning, BAR registration, and promotion, and leave the binding, native, and runtime product surface unchanged. ~~ Connected dnceng topology ~~ The split Native and Package definitions handed artifacts across independently numbered runs, which made source, package, and test provenance harder to keep connected. Make internal definition 1642 own Prepare, Native, and Package in one Build run, and make Tests 1630 consume the folder-qualified `\dotnet\skiasharp\skiasharp-package` resource. Trigger 1642 directly for `main` and `release/*` path changes, plus a daily main schedule, instead of waiting for completion of a separate Native pipeline. Remove the obsolete native-only and internal-complete YAML roots, and derive managed, test, and sample dependencies from the shared build/test pipeline role. Public definition 345 and downstream Tests 1630 keep those shared stages through the local output adapter; for public CI this avoids the inaccessible private 1ES template repository. Expansion guards require the internal project, a non-PR reason, and a non-PR ref before signing, compliance, or publishing stages can exist. ~~ dnceng execution policy ~~ Move the internal root from the DevDiv MicroBuild 1ES template to the released v1 1ES Official template, and move its Windows and Linux agents to NetCore1ESPool-Internal. Apple jobs remain on Microsoft-hosted macOS images. Armory, BinSkim, CredScan, ESLint, PoliCheck, and PSScriptAnalyzer are configured to break; CodeQL also runs on non-default branches. Network isolation remains in Audit while permanent mirrors and allowlisting are completed. The combined root carries forward the managed Apple macOS 15/Xcode 26.3 and native Apple macOS 14/Xcode 16.2 split. The repository remains on SDK 10.0.203 and workload set 10.0.202, but Visual Studio MSBuild 17.x cannot load .NET 10.0.2xx. Install `DOTNET_VERSION_WINUI` (10.0.108) side by side on the three WinUI C++/WinRT jobs. Build and merge the MSVC Win32 artifacts unconditionally, dropping the former `System.TeamProject == 'devdiv'` gate. ~~ Provider-neutral build identity ~~ Replace feature-name and loosely parsed downstream counters with Arcade's `yyyyMMdd.revision` OfficialBuildId, converted to the existing `short-date.revision` package suffix. Normalize GitHub and Azure Repos PR numbers, source commits, source branches, and repository URLs before packing; fail when required identity is absent or an inherited Build run name is malformed. PR builds use `pr.<number>`, scheduled builds use `nightly`, and ordinary builds retain their source-controlled label. A producing pipeline may select the `stable` sentinel only on an internal `release/*` branch; it clears the suffix to produce exact `X.Y.Z` packages. Downstream Tests inherit the selected Build run name, including an exact-release identity, rather than generating a second identity. Each run creates one transport alias family as well: PR aliases for PR validation and branch aliases otherwise. Remove commit aliases so one BAR cannot receive multiple versions of the same transport package ID. Package outputs are not cached because their versions and transport family depend on run identity, not only repository inputs. ~~ Deterministic Arcade package inputs ~~ Replace the separate normal and special packaging jobs, and the stable, preview, and symbol transport variants they produced, with one Cake graph in a single `package_windows` job. It publishes raw `nuget` and `nuget_special` artifacts plus prepared `arcade_shipping`, `arcade_nonshipping`, and `PdbArtifacts` inputs. Shipping contains product and explicit symbol packages; NonShipping contains the run's single `_NuGets`/`_NativeAssets*` transport family. `_NuGets` uses numbered dependency packages to keep each payload chunk near 200 MB. Arcade V3 expects `PdbArtifacts`, so provide real loose symbols rather than a permanent placeholder or manufactured fallback packages. For product packages without an explicit symbol package, extract implementation and runtime PDBs under package/version/TFM/RID paths. Exclude `ref/**`, reject ZIP paths that escape the package root, avoid loose-PDB duplication for packages with explicit symbols, and emit `.empty` only when no eligible PDB exists. Consume the Apple symbol packages introduced by #4846 instead of manufacturing fallback copies. The public PR downloaders now query definition 345 by exact PR merge ref, consume the canonical `nuget` artifact, exclude `.symbols.nupkg`, and use isolated temp directories. Documentation and sample generation select the single package family instead of assuming stable and preview packages coexist. The exact 3057398 artifact audit matched raw and prepared package payloads, contained 209 path-safe loose PDBs, and confirmed that the Package stage emitted only the five contract artifacts, with no `package_windows` artifact. ~~ Self-verifying build logic ~~ Build identity, API Scan input preparation, and Arcade asset assembly encode release constraints that would otherwise fail only in later or protected stages. Add dedicated suites for each and run them as pipeline gates rather than relying on YAML string checks or post-release inspection. Prepare runs `SetBuildVariables.Tests.ps1` and `PrepareApiScanInputs.Tests.ps1` before product stages, so identity failures and API Scan input drift are caught even when API Scan does not expand. Package runs `AssembleArcadeAssets.Tests.ps1` after packing against real ZIP fixtures, proving PDB extraction, `ref/**` exclusion, traversal rejection, explicit-symbol ownership, PR/branch transport selection, and `.empty` fallback on each run. ~~ Shipping-only signing ~~ Replace the legacy SignList and Arcade defaults with the explicit policy in `eng/Signing.props`. Any new signable payload must be added to one of its first-party, Mac developer, third-party, or skipped classifications for signing validation to succeed. First-party binaries use the repository's certificate mappings and skip the third-party copyright check because they intentionally lack Microsoft copyright metadata. Only prepared Shipping NuGets enter Arcade signing; product and explicit symbol packages are signed together. `eng/SignCheckExclusionsFile.txt` marks NonShipping transport `DO-NOT-SIGN, DO-NOT-UNPACK` and marks JavaScript and generated WebGPU payloads `DO-NOT-SIGN`; those payloads use `CertificateName=None` and remain authenticated by their signed NuGet container. `DO-NOT-SIGN` is fail-closed, so SignCheck fails if a listed file is ever signed. Main and release branches select real signing automatically. Other trusted internal branches test-sign unless `forceRealSigning` is requested, and forced BAR side effects additionally require `registerInBar`. Use standard Arcade SignTool and SignCheck validation rather than retaining the migration prototype's duplicate recursive verifier. ~~ API Scan input coverage ~~ Move API Scan into a repository-owned internal stage that downloads the current `nuget` and `native_msvc` artifacts, authenticates through the dedicated WIF connection, and runs in release mode. Package extraction preserves symbols and builds checked surrogates for Win32, NanoServer, and WinUI, including shipped ARM64 binaries that require API-compatible x64 MSVC inputs. Use the same HTTPS SymWeb symbol path in the scan task and generated surrogate configuration. Input preparation fails when packages, binaries, PDBs, surrogate files, or configured target matches are absent. Reporting, TSA upload, and PostAnalysis use Note-level API Scan policy; raw logs are published for audit. The stage runs when explicitly requested and on scheduled main builds, independently of BAR registration. ~~ BAR registration and promotion ~~ Generate one Arcade V3 manifest from signed Shipping and prepared NonShipping artifacts, with explicit symbol blobs and the standard PDB artifact alongside it. Protected registration is structurally limited to non-PR internal builds. Main and release branches register automatically; a forced feature-branch run must opt into both real signing and BAR registration. Use standard post-build validation with `publishAssetsImmediately: false` and `requireDefaultChannels: true`, so a missing Maestro mapping fails closed and Darc performs configured channel promotion only after asset publication finishes. NuGet.org publication remains a separate protected operation; #4859 carries the release-tooling adaptation to this BAR model. Exact Build 3057398 completed real signing, Note-level API Scan, BAR registration, asset validation, and Darc promotion. BAR 328638 reached General Testing with 41 shipping package assets, 22 non-shipping transport assets, 14 symbol blobs, and one manifest, with no recorded incoherencies or staleness. Co-authored-by: Matthew Leibowitz <[email protected]> Co-authored-by: Matthew Leibowitz <[email protected]> Co-authored-by: Copilot App <[email protected]>
Description
Adds the producer and consumer halves needed to use SkiaSharp release packages through Darc/Maestro without treating a channel as binary storage.
The internal package pipeline now generates an Arcade V3 manifest from the real-signed NuGets, registers the build/assets in BAR after API Scan, validates them, and promotes through enabled default channels. A fail-closed downloader resolves one BAR build, verifies repository/commit/branch/channel identity, gathers only registered SkiaSharp/HarfBuzzSharp assets, requires exact base-package versions, verifies NuGet signatures, and emits SHA-512 provenance evidence.
Maestro already provides
General Testing Internal(channel ID 1647), mapped to the privategeneral-testing-internalAzure Artifacts feed. The release guide records the exact separatemaestro-configurationfile, branch mappings, permissions, and temporary validation-branch entry required after approval; this PR intentionally does not modify that repository.This is stacked on
dev/dnceng-pipelines; it must not merge before the parent CI migration.Related issues
None.
Required skia PR
None.
Areas affected
binding/)externals/skia/src/c,include/c)Changes
None — release infrastructure and operator tooling only; no public API or runtime behavior changes.
Testing
python3 -m unittest discover -s scripts/infra/darc/tests -v(9 passed)git diff --check.-publishtarget locally withPushToLocalStorage=true; it generatedAssetManifest/sign_nugets.xmland staged the declared shipping package.dotnet nuget verify --allagainst a signed package.1.1.0-beta.26413.1and verified the relevantget-build,get-latest-build,gather-drop, andadd-build-to-channelCLI options.maestro-configurationproduction containsGeneral Testing Internaland no SkiaSharp default-channel mapping; verified Arcade maps channel ID 1647 tohttps://pkgs.dev.azure.com/dnceng/internal/_packaging/general-testing-internal/nuget/v3/index.json.Checklist
Changesabove lists all public API and behavioral changes (or "None.")