Skip to content

Migrate CI to dnceng with API Scan, signing, and BAR publishing - #4775

Closed
mattleibow wants to merge 58 commits into
mainfrom
mattleibow-arcade-signing-spike
Closed

mattleibow wants to merge 58 commits into
mainfrom
mattleibow-arcade-signing-spike

Conversation

@mattleibow

@mattleibow mattleibow commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Description

Migrate SkiaSharp CI from the legacy DevDiv chain to repository-owned dnceng/internal pipelines:

  • Native (1641) -> Package (1642) -> Tests (1630) through declarative pipeline resources.
  • Current 1ES Official templates, internal pools, hosted macOS agents, and the required network-isolation policy.
  • Security parity or stronger coverage: CodeQL, AntiMalware, CredScan, PoliCheck, ARMory, ESLint, PSScriptAnalyzer, secret scanning, BinSkim, Component Governance, TSA, and PostAnalysis.
  • Repository-owned API Scan in release mode over NuGet, symbols, and MSVC assets, with ARM64 surrogates, Note-level all-tool reporting/TSA/enforcement, and retained evidence.
  • Arcade NuGet signing for internal non-PR builds. main/release/* use ESRP real signing; trusted feature branches test-sign. Signing consumes only current-run packages, rejects unmapped payloads, verifies recursive payload fidelity/signatures, and runs Arcade SigningValidation for real signing.
  • Arcade V3 registration of real-signed packages in BAR, required default-channel promotion, and a fail-closed Darc downloader that pins repository, commit, branch, channel, exact package versions, locations, hashes, and signatures.
  • Public CI remains structurally unsigned and compatible with dnceng-public.

The migration-only feature trigger and REST Tests handoff are removed. After merge, default-branch YAML owns the Native -> Package -> Tests chain. BAR publishing is being validated temporarily through the existing public General Testing channel; the permanent plan is one public SkiaSharp channel/feed for all versions.

Related issues

N/A.

Required skia PR

None.

Areas affected

  • Managed API (binding/)
  • Native / C API (externals/skia/src/c, include/c)
  • Generated P/Invoke bindings
  • Native dependency or Skia update
  • Views & integrations
  • Rendering output / visual behavior
  • Performance
  • Tests
  • Build, packaging, or CI
  • Documentation or samples

Changes

None - CI-only; no public API or product behavior change.

Testing

  • Unified tip: 762ffc2f0bc689c3fa893669e450f25633a8386b.
  • All pipeline/template YAML parses; Native, Package, and Tests definitions server-expand.
  • Internal run 3047142 succeeded with API Scan, real ESRP signing, payload fidelity, trusted-signature validation, and retained signed artifacts.
  • API Scan run 3046424 succeeded over 519 binaries with zero findings/errors, HTML/SARIF/raw logs, and TSA upload.
  • Tests run 3046677 succeeded; public full pipeline 1552225 succeeded with zero final failed tests.
  • Nine Darc downloader/provenance tests pass; signing policy, recursive payload, tamper-detection, and cache-dependency tests pass.
  • Arcade V3 publish target generated and staged the signed asset manifest successfully.
  • Public exact-tip run 1556230 is active.
  • Live BAR/default-channel promotion awaits the temporary General Testing mapping and pipeline resource authorization; this is documented as an explicit remaining infrastructure gate.

Checklist

  • Tests added or updated
  • Changes above lists all public API and behavioral changes (none - CI-only)
  • New/changed public API? N/A
  • Native change? N/A

mattleibow and others added 12 commits June 26, 2026 15:43
…Core1ESPool-Internal pools, networkIsolationPolicy Permissive (submodules), drop DevDiv yaml-templates, chain skiasharp-native->skiasharp-package->skiasharp-tests, drop develop trigger; signing/APIScan deferred
…ull anonymously from MCR); restore full native stage (all platforms)
…pen googlesource; only hosted macOS agents reach it, isolated pool needs netiso DL exception)
Use the standard Permissive, CFSClean, CFSClean2 network isolation policy for the internal native and package pipelines, and enable native CI pushes from the working branch.

Co-authored-by: Copilot App <[email protected]>
Do not require the devdiv-only native_msvc artifact in dnceng/internal, where signing and API Scan remain deferred. Remove the redundant package schedule so packages and tests run only from their upstream completion triggers.

Co-authored-by: Copilot App <[email protected]>
Run the MSVC native matrix, merged native_msvc artifact, and split-package consumer in dnceng/internal as well as devdiv. Restore the package midnight schedule so nightly package and test coverage remains available.

Co-authored-by: Copilot App <[email protected]>
Artifact merger and managed package jobs do not build native externals, so avoid recursively cloning depot_tools and other submodules on network-isolated internal agents. Native jobs retain recursive checkout.

Co-authored-by: Copilot App <[email protected]>
Keep recursive native submodules disabled in managed package jobs, but initialize the docs submodule explicitly so normal NuGet packages continue to include XML API documentation.

Co-authored-by: Copilot App <[email protected]>
Disk-space probes are diagnostics, but a transient PowerShell startup failure currently aborts the job before tests run. Retry these probes while preserving failure after repeated attempts.

Co-authored-by: Copilot App <[email protected]>
@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 -- 4775

PowerShell / Windows:

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

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-4775/packages --name skiasharp-pr-4775
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-4775

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Some pipeline(s) encountered errors during trigger evaluation.

@github-actions

github-actions Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

📊 SkiaSharp benchmarks — PR #4775

⭐ 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 — 🔴 44 slower · 🟢 36 faster

  • 🔴 BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) · Windows · 1.34 ms → 2.94 ms (+120%)
  • 🔴 RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) · Windows · 96.45 µs → 184.16 µs (+91%)
  • 🔴 PathBoundsBenchmark.TightBounds(Points: 1024) · Windows · 16.70 µs → 27.14 µs (+62%)
  • 🔴 BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) · macOS · 148.63 µs → 240.30 µs (+62%)
  • 🟢 ColorMathBenchmark.ToColor(Colors: 4096) · Linux · 14.99 µs → 5.82 µs (-61%)
  • …and 75 more (see details below)
Full per-OS benchmark deltas

Linux

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

Benchmark baseline this PR Δ
ColorMathBenchmark.ToColor(Colors: 4096) 14.99 µs 5.82 µs 🟢 -61%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 2.62 µs 1.45 µs 🟢 -45%
ColorParseBenchmark.Parse(Iterations: 1000) 74.14 µs 43.65 µs 🟢 -41%
ColorMathBenchmark.PreMultiply(Colors: 4096) 12.87 µs 7.65 µs 🟢 -41%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 960.46 µs 573.80 µs 🟢 -40%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 254.11 µs 152.58 µs 🟢 -40%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 257.65 µs 159.23 µs 🟢 -38%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 209.2 ns 131.0 ns 🟢 -37%
ColorMathBenchmark.ToColorF(Colors: 4096) 13.13 µs 8.23 µs 🟢 -37%
PathBoundsBenchmark.TightBounds(Points: 64) 977.7 ns 613.6 ns 🟢 -37%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 11.44 µs 7.30 µs 🟢 -36%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 100.53 µs 64.71 µs 🟢 -36%
PathBoundsBenchmark.TightBounds(Points: 1024) 10.15 µs 6.62 µs 🟢 -35%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 351.94 µs 234.83 µs 🟢 -33%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 2.06 ms 1.39 ms 🟢 -33%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 71.97 µs 48.56 µs 🟢 -33%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 7.96 ms 5.39 ms 🟢 -32%
MatrixOpsBenchmark.Concat(Count: 4096) 218.29 µs 147.76 µs 🟢 -32%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 1.33 ms 905.96 µs 🟢 -32%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 4.51 µs 3.07 µs 🟢 -32%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 174.32 µs 120.19 µs 🟢 -31%
MatrixMapPointsBenchmark.MapVector(Points: 256) 10.84 µs 7.57 µs 🟢 -30%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 2.92 ms 2.05 ms 🟢 -30%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 757.90 µs 536.12 µs 🟢 -29%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 216.94 µs 155.56 µs 🟢 -28%
…and 9 more

Windows

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

Benchmark baseline this PR Δ
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 1.34 ms 2.94 ms 🔴 +120%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 96.45 µs 184.16 µs 🔴 +91%
PathBoundsBenchmark.TightBounds(Points: 1024) 16.70 µs 27.14 µs 🔴 +62%
PathBoundsBenchmark.TightBounds(Points: 64) 1.61 µs 2.35 µs 🔴 +46%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 238.66 µs 323.92 µs 🔴 +36%
ColorMathBenchmark.ToColor(Colors: 4096) 11.93 µs 16.16 µs 🔴 +35%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 153.16 µs 180.01 µs 🔴 +18%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 9.81 µs 11.28 µs 🔴 +15%
ColorParseBenchmark.Parse(Iterations: 1000) 77.81 µs 87.18 µs 🔴 +12%
CanvasDrawBenchmark.Draw(Shapes: 512) 20.57 ms 22.91 ms 🔴 +11%
MatrixMapPointsBenchmark.MapRect(Points: 4096) 128.91 µs 142.52 µs 🔴 +11%
MatrixOpsBenchmark.Concat(Count: 4096) 256.01 µs 278.01 µs 🔴 +9%
CanvasDrawBenchmark.Draw(Shapes: 64) 2.65 ms 2.87 ms 🔴 +8%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 137.55 µs 148.71 µs 🔴 +8%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 361.89 µs 388.42 µs 🔴 +7%
MatrixMapPointsBenchmark.MapVector(Points: 256) 8.88 µs 9.36 µs 🔴 +5%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 2.10 µs 2.21 µs 🔴 +5%

macOS

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

Benchmark baseline this PR Δ
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 148.63 µs 240.30 µs 🔴 +62%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 664.73 µs 999.56 µs 🔴 +50%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 543.43 µs 778.98 µs 🔴 +43%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 141.56 µs 202.84 µs 🔴 +43%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 66.42 µs 89.83 µs 🔴 +35%
ColorMathBenchmark.ToColorF(Colors: 4096) 4.92 µs 6.64 µs 🔴 +35%
CanvasDrawBenchmark.Draw(Shapes: 512) 11.08 ms 13.85 ms 🔴 +25%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 1.52 µs 1.86 µs 🔴 +23%
CanvasDrawBenchmark.Draw(Shapes: 64) 1.39 ms 1.70 ms 🔴 +23%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 135.9 ns 164.8 ns 🔴 +21%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 671.67 µs 548.22 µs 🟢 -18%
MatrixMapPointsBenchmark.MapVector(Points: 256) 2.43 µs 2.81 µs 🔴 +16%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 6.17 µs 7.08 µs 🔴 +15%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 195.71 µs 223.54 µs 🔴 +14%
PathBoundsBenchmark.TightBounds(Points: 64) 850.3 ns 951.7 ns 🔴 +12%
ColorParseBenchmark.Parse(Iterations: 1000) 63.10 µs 70.55 µs 🔴 +12%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 1.45 ms 1.62 ms 🔴 +12%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 2.69 ms 2.41 ms 🟢 -11%
PathBoundsBenchmark.TightBounds(Points: 1024) 8.07 µs 8.87 µs 🔴 +10%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 18.14 µs 19.87 µs 🔴 +10%
MatrixOpsBenchmark.Invert(Count: 4096) 65.06 µs 58.89 µs 🟢 -9%
RuntimeEffectShaderBenchmark.DrawFrame 507.38 µs 550.91 µs 🔴 +9%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 1.14 µs 1.24 µs 🔴 +8%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 97.96 µs 105.54 µs 🔴 +8%
ColorMathBenchmark.PreMultiply(Colors: 4096) 8.48 µs 9.12 µs 🔴 +7%
…and 4 more

📈 Full interactive perf-dashboard & run details →

@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 13, 2026 •

Copy link
Copy Markdown
Contributor

📦 Artifact size report

Packages from this PR (build 1552225) vs the latest nightly baseline 4.152.0-nightly.17 (observed 2026-08-13).

Total .nupkg size: 569.8 MB → 569.1 MB (−723.6 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 🟢 −823.1 KB -0.7%
SkiaSharp.NativeAssets.WebAssembly 69.7 MB 69.7 MB 🔴 +66.0 KB +0.1%

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

Per-file changes

SkiaSharp.NativeAssets.WinUI

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

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

@mattleibow mattleibow changed the title Migrate CI to dnceng with Arcade signing Migrate CI to dnceng with API Scan and Arcade signing Aug 13, 2026
@mattleibow mattleibow changed the title Migrate CI to dnceng with API Scan and Arcade signing Migrate CI to dnceng with API Scan, signing, and BAR publishing Aug 17, 2026
@mattleibow mattleibow mentioned this pull request Aug 17, 2026
2 of 14 tasks
mattleibow added a commit that referenced this pull request Aug 18, 2026
[infra] Onboard Arcade infrastructure (#4802)

Context: #4775
Context: dotnet/arcade@09a0bcf
Context: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1556384

Establish the generated Arcade foundation needed by the later dnceng migration
without changing SkiaSharp's product build, signing, publishing, BAR, or pipeline
behavior.

~~ Isolate Arcade from product builds ~~

Track Microsoft.DotNet.Arcade.Sdk 11.0.0-beta.26414.2 and its source commit in
the dependency-flow metadata. Darc 1.1.0-beta.26413.1 supplies the complete
eng/common snapshot: all 154 paths and blob IDs match upstream, including the
modes of all 23 executable files.

Restore Arcade through a repository-owned eng/Build.props and restore-only
eng/NoBuild.proj graph. Do not add broad root Directory.Build.props or
Directory.Build.targets imports, which would inject Arcade into the existing
Cake/MSBuild product architecture. Signing, publishing, BAR integration, and
Maestro subscriptions remain deliberately unwired.

~~ Rebuild when engineering inputs change ~~

The first public validation run rejected the newly tracked engineering files as
uncovered cache inputs. Add eng/** to the top-level global dependency set
inherited by each cache job rather than excluding it. Any Arcade or repository
engineering change therefore invalidates the native and managed caches and
forces the corresponding product work to rebuild.

Cache coverage now reports zero uncovered files, and the native and managed
cache diagnostics include the engineering tree in their keys.

~~ Retain the supported SDK across CI ~~

Darc initially changed both global.json SDK selectors to
11.0.100-preview.6.26359.118. Public run 1556360 showed that the preview was
absent from existing agents and containers, causing `dotnet tool restore` to
report that the required SDK was not found. The site build also could not find
the preview WASM workload pack in the configured feeds.

Keep both sdk.version and tools.dotnet at SkiaSharp's supported 10.0.108 baseline
while retaining Arcade 11. Uncached local-tool restore, Darc verification, cache
coverage, and the isolated Arcade restore graph pass. Public build 1556384 then
completed the full matrix successfully with no reported failures.

Co-authored-by: Matthew Leibowitz <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Copilot AI added 7 commits August 18, 2026 14:17
Update the Arcade SDK and generated shared infrastructure from .NET Eng - Latest using Darc. Adopt Arcade 11.0.0-beta.26414.2 from build 20260814.2 and its required .NET SDK while preserving the isolated bootstrap graph.

Copilot-Session: ebd516d2-00c0-49bf-9943-6b7ae61acbb7

Co-authored-by: Copilot App <[email protected]>
Keep Arcade and Darc on their latest versions while preserving SkiaSharp's 10.0.108 SDK baseline. The .NET 11 preview selected by Darc is unavailable in existing CI agents, containers, and WASM workload feeds.

Copilot-Session: ebd516d2-00c0-49bf-9943-6b7ae61acbb7

Co-authored-by: Copilot App <[email protected]>
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
Copilot AI added 24 commits August 18, 2026 14:19
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
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]>
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]>
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]>
Validate BAR publishing from the unified dev/dnceng-pipelines branch through the existing public General Testing channel, and document the future single SkiaSharp channel/feed without retaining the abandoned internal-channel plan.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
Let the templates-official wrappers supply is1ESPipeline instead of forwarding a duplicate parameter into their core templates, and cover the contract in the Darc pipeline test.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
The Darc downloader and its tests consume already-built assets and do not affect native or managed outputs, so exclude them from product cache dependency coverage.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
Update Microsoft.DotNet.Arcade.Sdk from .NET Eng - Latest to 11.0.0-beta.26414.2 (Arcade 09a0bcffb828), including the generated eng/common snapshot, .NET 11 preview toolset, Darc bootstrap, and feed metadata.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
Use the independently validated latest Arcade bootstrap as the foundation for signing, BAR publishing, and Darc integration.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
Keep Arcade 11 and its generated toolset while resolving direct dotnet invocations with the hosted, supported .NET 10.0.108 SDK.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
Use hosted agents for the separate Tests pipeline, restore public-safe 1ES defaults with explicit internal opt-in, flatten single-job signing and API Scan templates, remove unused complete/Darc wrappers and redundant pre-sign evidence, and document the final BAR-based release flow.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
Restore the azure-template-fake-1es.yml name so the public Azure Pipelines compatibility adapter cannot be mistaken for a real 1ES template.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
Run the separate Tests definition through the standard Azure Pipelines compatibility adapter and Microsoft-hosted agents, with Docker@2 for container tests and no 1ES template/task switch.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
Make the package root own signing, API Scan, and BAR publication directly; exclude all PR forms from signing/publishing and remove signing-specific parameters from the shared stage aggregator.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
Arcade 11's shared bootstrap uses the .NET 11-only 'dotnet package download' command, but SkiaSharp intentionally retains SDK 10.0.108. Restore an exact PackageDownload through a temporary project instead so signing, BAR registration, and Arcade validation can bootstrap on the supported SDK while preserving the dotnet-eng fallback.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
Adopt Arcade's NoSignJS policy for browser and Emscripten source files. Keep every JavaScript basename and package path explicit, fail if a skipped file changes or becomes signed, and retain author-signed NuGets as the supported distribution boundary without adding detached catalog artifacts.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
Keep both Arcade bootstrap selection and WASM containers on the validated .NET 10.0.108 SDK after rebasing onto the squashed Arcade onboarding commit from main.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 0719f2c0-b8f5-4d8c-8a35-37b2057c418a
@mattleibow
mattleibow force-pushed the mattleibow-arcade-signing-spike branch from 14e290a to 08fa356 Compare August 18, 2026 12:22
@mattleibow

Copy link
Copy Markdown
Contributor Author

Superseded by #4803, which now tracks the canonical dev/dnceng-pipelines branch shared with Azure PR 63954.

@mattleibow mattleibow closed this Aug 18, 2026
@mattleibow
mattleibow deleted the mattleibow-arcade-signing-spike branch August 18, 2026 12:36
mattleibow added a commit that referenced this pull request Aug 26, 2026
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]>
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