Repository navigation
Combine SkiaSharp Native and Package pipelines - #4801
Conversation
Bring the internal pipeline branch up to f8c0133 after completing the green Native, Package, and Tests validation. Co-authored-by: Copilot App <[email protected]>
Queue the tests pipeline explicitly from successful feature-branch package builds until definition 1630 can evaluate the updated resource name from internal main. Pass the current commit and package run as pipeline resources so one Native run flows through all three pipelines. Co-authored-by: Copilot App <[email protected]>
Always build, merge, and re-upload the MSVC native artifacts as part of the pipeline contract. Limit the hosted-agent diagnostic retry to the exact post-checkout probe that previously flaked. Co-authored-by: Copilot App <[email protected]>
Collect current-run NuGet, symbol, and MSVC artifacts; generate the existing SkiaSharp surrogate configuration; authenticate through the dotnet-apiscan WIF connection; and run APIScan with retained logs and PostAnalysis. Co-authored-by: Copilot App <[email protected]>
Add API Scan HTML/SARIF reporting, TSA bug upload, raw log publication, and warning-level enforcement. Map unsupported Windows ARM64 images to equivalent x64 surrogates so all shipped binaries remain covered without suppressing findings. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
Preserve the old Xamarin template policy by explicitly selecting APIScan release mode instead of inheriting the prerelease task default. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
Restore the registered SkiaSharp software version used by the old release scan and fail hard when APIScan itself cannot execute. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
Keep TSA reporting active while making Armory, BinSkim, CredScan, ESLint, PoliCheck, and PSScriptAnalyzer fail closed. Run CodeQL on the migration branch, and restore API Scan Note-level all-tool reporting, TSA upload, and enforcement parity with DevDiv. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
Add an opt-in, test-only signing stage that copies the existing NuGet artifact and invokes the matching Arcade SignTool without rebuilding products. Preserve the artifact-carried SignList policy, validate recursive payload fidelity, and document ESRP/API Scan onboarding boundaries. Co-authored-by: Copilot App <[email protected]>
Move internal roots to the v1 Official template and the public CI root to the v1 Unofficial template, thread 1ES container handling through tests, and remove the local fake wrapper. The public definition must be recreated in dnceng/internal before cutover because dnceng-public cannot resolve the 1ES template repository. Co-authored-by: Copilot App <[email protected]>
Sync eng/common from the exact Arcade SDK source commit, add dependency-flow metadata and a signing-only project graph, and move general build tooling to the supported .NET 10.0.302 SDK. Preserve the WinUI 10.0.108 compatibility band by installing it side-by-side only for WinUI jobs. Co-authored-by: Copilot App <[email protected]>
Keep the existing SDK and workload set pin across the repository and native build containers while adopting Arcade. The SDK upgrade remains a separate compatibility change. Co-authored-by: Copilot App <[email protected]>
Stage already-built shipping packages in Arcade's standard layout, use the templates-official MicroBuild job wrapper and eng/common signing command, validate nested signatures, and retain a fail-closed exact payload policy in eng/Signing.props. Remove the isolated SignTool bootstrap and legacy SignList translation. Co-authored-by: Copilot App <[email protected]>
MicroBuild test certificates are intentionally untrusted by NuGet verification. Keep test-sign validation on SignTool's post-sign checks and payload fidelity, and run Arcade SignCheck plus NuGet trust validation only for ESRP real signing. Co-authored-by: Copilot App <[email protected]>
The automation-owned Arcade tree and signing-only policy do not contribute to native or managed cache outputs, so exclude them from repository cache coverage validation. Co-authored-by: Copilot App <[email protected]>
Treat eng as a global build dependency, associate signing scripts with the signing job, and remove the cache switch from the internal complete pipeline. Only the public mono-SkiaSharp root can enable build caching. Co-authored-by: Copilot App <[email protected]>
Allow the package definition to test-sign an existing successful package build without rebuilding native or managed products. Verify the source definition, repository, result, and real-sign branch trust before downloading artifacts. Co-authored-by: Copilot App <[email protected]>
The generated Dawn JavaScript and Python files do not support 3PartySHA2 Authenticode signing. Keep them explicitly unsigned and enforce byte-for-byte preservation through payload verification. Co-authored-by: Copilot App <[email protected]>
MicroBuild test signing validates MacDeveloper policy without rewriting dylib bytes. Permit unchanged dylibs only in test mode while keeping real ESRP signing fail-closed, and cover both paths in payload tests. Co-authored-by: Copilot App <[email protected]>
Allow approved feature-branch real-sign validation without publishing signed artifacts. Omit package outputs at expansion, preserve verification evidence in logs, delete signed directories on every exit path, and intentionally fail the validation job. Co-authored-by: Copilot App <[email protected]>
Restore the established forceRealSigning override while selecting real signing automatically on main and release branches. Validate intentionally unsigned third-party JavaScript through exact SignCheck DO-NOT-SIGN rules, and retain signed packages only after all Arcade, NuGet, and payload checks succeed. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 6372475e-4a57-459d-b31f-7430ed2ce7f6
Enable the Arcade signing stage for every non-PR internal package and complete run while leaving the public pipeline unsigned. Preserve real signing on main and release branches, test signing elsewhere, and the explicit forceRealSigning override. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 6372475e-4a57-459d-b31f-7430ed2ce7f6
Remove the duplicate dotnet nuget verify pass because Arcade SignCheck already applies NuGet integrity and signature trust/validity verification. Retain repository payload-fidelity checks for archive mutations that Arcade does not compare against unsigned inputs. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 6372475e-4a57-459d-b31f-7430ed2ce7f6
Document the exact repository-owned script entry points, official Arcade validation responsibilities, current artifact flow, retry provenance, and the signing-only pipeline boundary. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 6372475e-4a57-459d-b31f-7430ed2ce7f6
Import signing as a sibling from the stage aggregator instead of nesting it under the package stage template. Remove the obsolete use1ESPipelineTemplates switch and legacy Docker task because every supported root now extends 1ES Official or Unofficial. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 6372475e-4a57-459d-b31f-7430ed2ce7f6
Remove the temporary cross-run signing retry and provenance API path. Signing now hard-depends on the package stage and consumes only the current run's NuGet artifact; failures are retried in-place or by rebuilding in a new pipeline run. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 6372475e-4a57-459d-b31f-7430ed2ce7f6
Keep the existing public PR definition on standard Azure Pipelines while internal roots use real 1ES templates. Add a public output adapter, restore public pool demands and Docker task selection, and keep signing structurally internal-only. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 6372475e-4a57-459d-b31f-7430ed2ce7f6
Restore the existing latestFeature policy while retaining 10.0.108 as the repository baseline. Public test containers use floating .NET 10 SDK images whose installed feature band has advanced beyond 10.0.1xx. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 6372475e-4a57-459d-b31f-7430ed2ce7f6
Remove the migration-only branch trigger and REST tests handoff now that the declarative Native -> Package -> Tests chain will live in the default branch. Run API Scan automatically for internal main and release package builds, alongside real signing. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
Move the native stages into the Package pipeline so native and package artifacts are produced from one exact run while Tests remains downstream. Retain the Native definition for manual diagnostics and harden signing against pull-request merge refs. 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 -- 4801PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4801"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-4801/packages --name skiasharp-pr-4801More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4801 |
Permit an explicitly requested manual feature-branch run to audit network isolation while keeping enforcement mandatory for automatic, pull request, main, and release builds. Co-authored-by: Copilot App <[email protected]>
Exclude tags and other non-branch refs from the manual network-isolation audit escape hatch. Co-authored-by: Copilot App <[email protected]>
📊 SkiaSharp benchmarks — PR #4801⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS
Highlights⏱️ Time — 🔴 26 slower · 🟢 33 faster
Full per-OS benchmark deltasWindows⏱️ Time (vs 🌙 nightly
macOS⏱️ Time (vs 🌙 nightly
|
08fa356 to
9dd8812
Compare
Reapply the combined Native and Package pipeline on top of the latest Arcade publishing and CI changes. Co-authored-by: Copilot App <[email protected]>
Keep the combined Package pipeline on its own Arcade-derived build number while making Package identity inheritance an explicit Tests-only behavior. Co-authored-by: Copilot App <[email protected]>
Use complete, build, and test pipeline types; remove the obsolete Native root, Package split path, and separate identity toggle. Co-authored-by: Copilot App <[email protected]>
Remove the redundant split/separate boolean and derive test-stage dependencies from the existing build pipeline type. Co-authored-by: Copilot App <[email protected]>
Adapt exact stable and prerelease BAR publishing to the combined Native and Package build while keeping Tests downstream and channel promotion manual. 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
Simplifies SkiaSharp CI to two topologies:
completepipeline containing Native, Package, and Tests.buildpipeline containing Native, Package, signing, API Scan, and BAR registration/validation, followed by a separatetestpipeline triggered from the final Package run.The combined Package pipeline owns branch triggers, schedule, current-run Native artifacts, Arcade build identity, and a single
previewLabelparameter. Labels are normalized to lowercase at runtime. Normal labels produce one uniquely versioned prerelease family;stablederivesDotNetFinalVersionKind=releaseand exact packages. Exact stable mode is fail-closed unless the run is internal, manual, real-signed, and API-scanned.The separate Tests pipeline is the only pipeline with a Package resource, so it inherits the final Package run name and identity. The obsolete Native root, split Package re-upload path, identity toggle, and feature/featurepreview behavior are removed.
Signed prerelease packages register from Arcade's
Previewview; exact stable packages register fromShipping. BAR registration uses the pipeline's explicitARCADE_OFFICIAL_BUILD_ID, and CI stops after BAR registration plus Validate. Channel promotion remains manual after the separate Tests pipeline passes.Definition 1641 and internal main branch policy 13947 must be retired/repointed to definition 1642 during cutover.
For migration diagnostics only,
auditNetworkIsolationpermits an explicitly requested manual feature-branch run to audit instead of enforce isolation. It defaults to false; automatic, PR, tag, main, and release runs remain enforced.Related issues
Related to #4775
Required skia PR
None.
Areas affected
binding/)externals/skia/src/c,include/c)Changes
None — CI-only; no public API or product behavior change.
Testing
DotNetFinalVersionKind=release, exact build labels, and rejection unless Manual +forceRealSigning=true+runApiScan=true.2cf038c2f9e7ed1bbcfb5b8393ba3ec08ced75b5:previewLabel=Stable; runtime tests prove normalization tostableand release final-kind derivation.skiasharp-packageis its only pipeline resource.Publishing.propsselectsPreviewfor prerelease andShippingfor exact release packages. Signing and manifest generation both receiveDotNetFinalVersionKind; BAR registration receives explicitofficialBuildId; post-build usespublishAssetsImmediately: truewithoutrequireDefaultChannels.global.jsonremains SDK10.0.108withtools.dotnet10.0.301; isolated Arcade CLI directories remain unchanged. Generatedeng/commonis unchanged by this branch.No native source or C API changed, so native bootstrap/build commands were intentionally not run locally.
Checklist
Changesabove lists all public API and behavioral changes (or "None.")