Skip to content

Test Samples with .NET 10 and .NET 11 consumer SDKs - #5314

Closed
mattleibow wants to merge 6 commits into
mainfrom
mattleibow-samples-sdk-matrix
Closed

mattleibow wants to merge 6 commits into
mainfrom
mattleibow-samples-sdk-matrix

Conversation

@mattleibow

@mattleibow mattleibow commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Run the same current Samples groups with exact .NET 10 and .NET 11 consumer SDKs. A single SDK-descriptor loop wraps the canonical Samples group-job template: each SDK has Windows/Linux Build, Host and Docker plus macOS Build and Host, sixteen jobs total. Keep the net10 runner and ordinary sample TFMs unchanged; owned consumer workspaces pin the exact SDK. SDK11 additionally retargets only an owned Console copy to net11.0 and verifies execution/runtime/output/PNG, distinguishing SDK10/net10, SDK11/net10 and SDK11/net11.

Preview jobs install wasm-tools-net10 alongside wasm-tools. Only macOS SDK11 uses hosted macos-26/Xcode26.6; SDK10 retains its canonical pool/toolchain. Refresh the installed Mac host inode without changing bytes/signature to avoid signed-host overwrite SIGKILL (dotnet/install-scripts#232). Exact SDK verification remains mandatory and preserves native exit/stderr. Pins, native/package cohort, feeds, source TFMs, private workspaces/caches and golden policy remain unchanged.

The user-directed canonical sync preserves merged #5339 RunGroup annotations/analyzer, optional single trait selector, unfiltered local behavior and runnerArguments helper signature. SDK contract tests inherit Build; both Console rows are Host. Canonical publication uses the bootstrapper's shared success/failed log artifacts, with SDK/OS/group identities; Samples execution retry stays zero. There is no restored standalone analyzer-test host, runtime discovery gate, custom publication or package deletion logic. Merged #5341 caller-driven core/container/device templates and all non-Samples stages are unchanged. The human-facing maintainer guide is unchanged.

Docker retains original SDK10/runtime10 images independently of host SDK; duplication across the host SDKs is intentional. Windows images execute on Windows. No Mac Docker CI job or daemon setup is introduced; local unfiltered availability behavior remains canonical. Browser/device/Fiddle work remains separate. After this necessary canonical integration, the draft SDK branch is back on hold for the user's separate version review.

Related issues

Related to #5308. Canonical merged foundations: #5339 and #5341.

Published head 004d39abbd5a3f70f2eaa1a22ca9d25f6aa03f34, rebased onto fetched latest main 085a3a619c1af059a022a41f0718c195bdac753d (which includes the coordinator's 6e010cb9293c600e91897011067635a8da3638bf plus subsequent merged fixes). The five owned SDK deltas remain, followed by the canonical group-template adaptation. Existing PR stays OPEN/draft/main; the owned rebase used an exact 4339864db3e force-with-lease.

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 (libpng, HarfBuzz, FreeType, zlib, milestone bump, …)
  • Views & integrations (MAUI, Uno, WPF, WinUI, Blazor, …)
  • Rendering output / visual behavior
  • Performance
  • Tests
  • Build, packaging, or CI
  • Documentation or samples

Changes

None — test/CI coverage only, no shipping public API or application behavior change.

Testing

Current exact-head bounded checks and Azure preview passed. Automatic 1633041 is registered/queued at source 004d39abbd5a3f70f2eaa1a22ca9d25f6aa03f34, merge 885ff4b3e4258cf5309860c9031812a5c667a0b2. No current-head producing-green claim and no manual queue.

Local macOS ARM64, runner SDK10:

  • dotnet build tests/SkiaSharp.Tests.Samples.slnx -p:TargetFramework=net10.0 -p:TargetFrameworks=net10.0 --verbosity quiet — passed, zero errors/one existing obsolete DrawImage warning. Compiles the current canonical analyzer and enforces the rebased test annotations.
  • Run the bounded consumer-pin/owned-retargeting contracts under both exact consumer selections:
SAMPLE_TEST_SDK_VERSION=10.0.401 dotnet test tests/SkiaSharp.Tests.Samples/SkiaSharp.Tests.Samples.csproj -p:TargetFramework=net10.0 -p:TargetFrameworks=net10.0 --no-build -- --filter-method '*ConsumerSdkPinCannotRollForwardOrFallBack*' --filter-method '*RetargetingChangesOnlyTheOwnedConsumerProject*' --filter-method '*RetargetingRejectsUnexpectedFrameworkDeclarations*' --no-ansi
SAMPLE_TEST_SDK_VERSION=11.0.100-rc.1.26425.128 dotnet test tests/SkiaSharp.Tests.Samples/SkiaSharp.Tests.Samples.csproj -p:TargetFramework=net10.0 -p:TargetFrameworks=net10.0 --no-build -- --filter-method '*ConsumerSdkPinCannotRollForwardOrFallBack*' --filter-method '*RetargetingChangesOnlyTheOwnedConsumerProject*' --filter-method '*RetargetingRejectsUnexpectedFrameworkDeclarations*' --no-ansi

Both passed 5/5, zero skips/failures. These are bounded contracts, not real SDK11 sample/device/full-runtime proof.

Azure server preview-only compilation:

az devops invoke --organization https://dev.azure.com/dnceng-public --area pipelines --resource runs --route-parameters project=public pipelineId=345 --api-version 7.1 --http-method POST --in-file /Users/matthew/.copilot/session-state/27469c75-32c0-486c-8de0-ebbff1e5cdc5/files/sdk-run-groups-preview-request.json --query finalYaml -o tsv
python3 /Users/matthew/.copilot/session-state/27469c75-32c0-486c-8de0-ebbff1e5cdc5/files/assert-run-group-preview.py

Passed: request uses previewRun:true and exact current source. Server-expanded YAML has exactly 2×8 unique jobs, correct SDK installers/consumer selection, preview net10 WASM tools, one group argument, retry zero, unique TRX/log identities, canonical shared success/failed log publication, no package deletion, preserved Mac pools/Xcode and no Mac Docker setup/job.

Structural YAML comparison passed for every non-Samples stage/job against exact main 085a3a6. Targeted git diff --quiet origin/main HEAD -- ... checks passed for shared core/container/device templates, selector/helper, canonical analyzer/wiring/typed attributes and maintainer guide. git diff --check passed; local/remote/live PR heads match and worktree is clean. No standalone analyzer test host or discovery gate was restored.

Under the existing pause, no devices, heavy consumer restores, local runtime suites, native builds or full core tests were started. Current automatic producing CI remains the full-run validation surface; the compiler analyzer is not a runtime routing/completeness proof.

Historical evidence, not current-source proof: producing 1632889 succeeded at pre-sync SDK-only 4339864db3e. Earlier 1630906 succeeded at 959c2c5d642cbe49cfba02858a3f590800e34620 with 681 passed / 8 declared Mac Docker CLI availability skips / 0 failures (Windows117/118, Linux110/111, Mac112/113 plus4 skips each). Mac11 log3213 confirmed macos-26 image20260824.0517.1 and Xcode26.6 selection. Those runs do not prove the new canonical sixteen-job head or separate browser work. Earlier1630618 prerequisite and1630851/1630877 signed-host exit137 failures were corrected before1630906. No new full local/core-green claim is made.

Checklist

  • Tests added or updated (if omitted, explain why above)
  • Changes above lists all public API and behavioral changes (or "None.")
  • New/changed public API? Added or updated accurate source /// documentation and regenerated bindings when applicable
  • Native change? Companion mono/skia PR linked above and bindings regenerated

The last two items are not applicable: no shipping public API or native changes.

@github-actions

github-actions Bot commented Oct 9, 2026

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 -- 5314

PowerShell / Windows:

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

Step 2 — Add the local NuGet source

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

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

📊 SkiaSharp benchmarks — PR #5314

⭐ 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 — 🔴 49 slower · 🟢 15 faster

  • 🔴 ColorMathBenchmark.ToColor(Colors: 4096) · Windows · 5.25 µs → 12.56 µs (+139%)
  • 🔴 PathBoundsBenchmark.TightBounds(Points: 1024) · Windows · 9.46 µs → 16.28 µs (+72%)
  • 🔴 BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) · Windows · 173.56 µs → 291.92 µs (+68%)
  • 🔴 BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) · Windows · 659.39 µs → 1.10 ms (+67%)
  • 🔴 PathBoundsBenchmark.TightBounds(Points: 64) · Windows · 935.6 ns → 1.53 µs (+64%)
  • …and 59 more (see details below)
Full per-OS benchmark deltas

Linux

⏱️ Time (vs 🌙 nightly 4.156.0-nightly.26512.11)

Benchmark baseline this PR Δ
ColorMathBenchmark.ToColor(Colors: 4096) 15.61 µs 14.11 µs 🟢 -10%
PathBoundsBenchmark.TightBounds(Points: 1024) 11.43 µs 10.42 µs 🟢 -9%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 2.76 µs 2.54 µs 🟢 -8%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 102.04 µs 108.89 µs 🔴 +7%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 11.45 µs 12.08 µs 🔴 +6%

Windows

⏱️ Time (vs 🌙 nightly 4.156.0-nightly.26512.11)

Benchmark baseline this PR Δ
ColorMathBenchmark.ToColor(Colors: 4096) 5.25 µs 12.56 µs 🔴 +139%
PathBoundsBenchmark.TightBounds(Points: 1024) 9.46 µs 16.28 µs 🔴 +72%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 173.56 µs 291.92 µs 🔴 +68%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 659.39 µs 1.10 ms 🔴 +67%
PathBoundsBenchmark.TightBounds(Points: 64) 935.6 ns 1.53 µs 🔴 +64%
ColorMathBenchmark.PreMultiply(Colors: 4096) 7.51 µs 12.25 µs 🔴 +63%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 131.91 µs 214.60 µs 🔴 +63%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 500.09 µs 798.41 µs 🔴 +60%
CanvasDrawBenchmark.Draw(Shapes: 64) 1.41 ms 2.25 ms 🔴 +60%
CanvasDrawBenchmark.Draw(Shapes: 512) 11.31 ms 17.98 ms 🔴 +59%
RuntimeEffectShaderBenchmark.DrawFrame 631.76 µs 969.90 µs 🔴 +54%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 1.07 µs 1.64 µs 🔴 +53%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 92.81 µs 139.39 µs 🔴 +50%
ColorParseBenchmark.Parse(Iterations: 1000) 44.62 µs 66.90 µs 🔴 +50%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 91.0 ns 135.9 ns 🔴 +49%
MatrixOpsBenchmark.Concat(Count: 4096) 147.03 µs 218.22 µs 🔴 +48%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 6.86 µs 10.04 µs 🔴 +46%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 5.78 µs 8.39 µs 🔴 +45%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 80.01 µs 114.95 µs 🔴 +44%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 71.49 µs 102.51 µs 🔴 +43%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 172.43 µs 245.45 µs 🔴 +42%
MatrixMapPointsBenchmark.MapVector(Points: 256) 5.09 µs 7.15 µs 🔴 +40%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 6.33 ms 8.83 ms 🔴 +40%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 1.62 ms 2.24 ms 🔴 +38%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 50.12 µs 68.66 µs 🔴 +37%
…and 9 more

macOS

⏱️ Time (vs 🌙 nightly 4.156.0-nightly.26512.11)

Benchmark baseline this PR Δ
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 1.75 µs 2.70 µs 🔴 +54%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 1.23 ms 655.59 µs 🟢 -46%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 641.27 µs 865.58 µs 🔴 +35%
MatrixMapPointsBenchmark.MapVector(Points: 256) 3.64 µs 2.41 µs 🟢 -34%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 1.26 ms 1.65 ms 🔴 +31%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 70.26 µs 90.24 µs 🔴 +28%
RuntimeEffectShaderBenchmark.DrawFrame 562.43 µs 679.56 µs 🔴 +21%
CanvasDrawBenchmark.Draw(Shapes: 64) 1.37 ms 1.63 ms 🔴 +19%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 5.90 ms 6.98 ms 🔴 +18%
MatrixMapPointsBenchmark.MapRect(Points: 256) 4.01 µs 3.28 µs 🟢 -18%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 146.79 µs 171.15 µs 🔴 +17%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 1.79 ms 1.54 ms 🟢 -14%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 46.06 µs 39.78 µs 🟢 -14%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 9.17 µs 7.96 µs 🟢 -13%
ColorMathBenchmark.ToColor(Colors: 4096) 24.46 µs 21.30 µs 🟢 -13%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 19.75 µs 22.22 µs 🔴 +13%
PathBoundsBenchmark.TightBounds(Points: 64) 937.6 ns 1.05 µs 🔴 +13%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 159.43 µs 179.34 µs 🔴 +12%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 178.03 µs 199.48 µs 🔴 +12%
ColorParseBenchmark.Parse(Iterations: 1000) 77.43 µs 68.74 µs 🟢 -11%
ColorMathBenchmark.ToColorF(Colors: 4096) 5.80 µs 5.29 µs 🟢 -9%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 6.69 ms 6.14 ms 🟢 -8%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 778.21 µs 714.39 µs 🟢 -8%
MatrixMapPointsBenchmark.MapRect(Points: 4096) 53.48 µs 57.56 µs 🔴 +8%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 7.92 µs 7.38 µs 🟢 -7%

📈 Full interactive perf-dashboard & run details →

@mattleibow
mattleibow changed the base branch from mattleibow-samples-foundation-extraction to main October 10, 2026 00:42
@mattleibow
mattleibow force-pushed the mattleibow-samples-sdk-matrix branch from 959c2c5 to 8f25d52 Compare October 13, 2026 00:42
@mattleibow
mattleibow force-pushed the mattleibow-samples-sdk-matrix branch from 8f25d52 to 4339864 Compare October 13, 2026 01:42
mattleibow added a commit that referenced this pull request Oct 13, 2026
Partition Samples CI by typed execution target (#5339)

Context: #5314
Context: 8f25d52
Context: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1632894

Separate sample compilation, host application execution and container
execution through a fixed execution-target contract. Keep grouping independent
of consumer SDK selection, preserve full local runs, and report CI partitions
without changing the existing toolchains or producing package cohorts.

~~ Require one typed execution group for Samples tests ~~

Add SampleRunGroup and RunGroupAttribute, emitting the standard xUnit
RunGroup trait. Build covers generated Basic/Gallery compilation and
infrastructure checks; Host covers Console/Web execution; Docker covers the
container fixture. Android, Ios, Mac and Windows reserve native execution
targets rather than naming sample families.

Use class annotations for homogeneous fixtures and method annotations for
the mixed Basic tests. A Samples-only Roslyn analyzer reports missing,
multiple or undefined effective groups and rejects raw Xunit.TraitAttribute
RunGroup declarations as errors SKS001 through SKS004.

Detect Fact/Theory and derived attributes semantically. Include inherited,
overridden and default-interface test methods, respecting AttributeUsage
separately along the method and class inheritance chains. Otherwise a
discovered test could bypass the annotation requirement and disappear from
filtered CI. This validates group annotations, not CI routing or dynamically
generated case completeness.

Keep the analyzer on netstandard2.0 when solution-wide net10.0 framework
properties are supplied, and reference it as an analyzer rather than a
runtime dependency. Preserve the runner's source-backed project references.

~~ Keep filtering opt-in at the shared runner boundary ~~

Add case-sensitive --runGroup selection through the standard
--filter-trait RunGroup=<group> argument. An omitted selector passes no filter
and keeps the full local suite; unknown groups fail with ArgumentException
instead of silently selecting no tests.

Extend RunDotNetTest with optional runnerArguments, quoting and appending them
after its existing report and hang-dump arguments. The .NET Core, container
and MSBuild callers do not acquire Samples filters or changed defaults.
Retain Samples' existing no-build selection and disabled activity hang monitor.

Accept sampleRunId only with ASCII letters, digits, hyphens and underscores.
Place results below that run ID and the timestamp so CI partitions have
separate TRX locations without changing the default local results layout.

~~ Split CI only across supported execution targets ~~

Replace the three monolithic Samples host jobs with a shared Samples job
template: Windows and Linux run Build, Host and Docker; macOS runs Build and
Host, producing eight jobs. macOS CI does not provision Docker; unfiltered
local runs retain the existing Docker availability behavior. Reserved native
groups do not create empty device jobs.

Retain the repository SDK, workload/Tizen settings, agents, platform setup,
native/NuGet acquisition and Docker image SDK pins. Give each OS/group a
distinct job name, result directory, TRX title and log artifact. Set Samples
execution retries to zero without changing provisioning or download retries.

Current-head Azure expansion at aaa3a4f against main 888e7b3 verifies
the eight-job matrix and unchanged non-Samples stages. Build 1632894 passed
the eight Samples partitions and the remaining stages at cf92d81,
through merge 1afc856. That full run predates the base update; it is not
exact-head CI proof for aaa3a4f.

~~ Retain diagnostics without republishing successful inputs ~~

The Windows job inherited successful whole-output publication and deleted
only downloaded NuGet packages before upload, leaving native inputs behind.
Set shouldPublish to false for every Samples job and remove the Windows-only
NuGet deletion step, which no longer serves a successful whole-output upload.

Declare output/logs through the shared publishArtifacts mechanism with
always: true for success/failure retention, replacing direct artifact tasks.
Keep PublishTestResults under always() and retain build/runner diagnostics
alongside test evidence. The shared failed-run whole-output snapshot remains
enabled; this change does not promise that failed uploads omit input cohorts.

Co-authored-by: Matthew Leibowitz <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 0ff22fb7-8e03-4207-9f85-86bfe337c491
v and others added 6 commits October 13, 2026 06:58
Keep the net10 test runner independent of exact per-workspace consumer SDK pins. Run the shared Samples suite in six platform/SDK jobs and add an owned Console retargeting case that proves net11 execution without changing source TFMs or Docker images.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 27469c75-32c0-486c-8de0-ebbff1e5cdc5
SDK11 wasm-tools supplies net11 packs; unchanged Uno net10 browser consumers require the separate wasm-tools-net10 workload. Preserve all platform workload defaults, SDK/workload-set pins, and six job coverage. Apple preview pack/Xcode compatibility remains separately blocked.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 27469c75-32c0-486c-8de0-ebbff1e5cdc5
Only the macOS SDK11 Samples lane uses the proven macos-26 hosted pool and job-scoped Xcode26.6 selection. SDK10 retains its existing pool/toolchain; SDK pins, baseline TFMs, net11 Console, and availability policy remain unchanged.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 27469c75-32c0-486c-8de0-ebbff1e5cdc5
Hosted macOS preview SDK verification returned empty stdout on all retries in 1630851. Record the resolved executable, native exit code and stderr while retaining the exact-version gate and preventing workload installation after verification failure. Diagnostic probe covers success, empty output/native139, stderr/native1, and wrong SDK with no real workload installation.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 27469c75-32c0-486c-8de0-ebbff1e5cdc5
1630877 confirms native host exit137 after UseDotNet overwrites the executed SDK10 host with SDK11. Reuse the byte-preserving cp/new-inode/mv remedy documented in dotnet/install-scripts#232; do not resign executables or relax exact SDK verification. Actual template script probe twice preserves hash/mode/code signature and successful execution while changing inode and cleaning temporary files.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 27469c75-32c0-486c-8de0-ebbff1e5cdc5
Reuse the merged group template and shared artifact publication. Preserve current caller-driven non-Samples jobs, typed group/analyzer enforcement, and independent SDK/runtime selection.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 27469c75-32c0-486c-8de0-ebbff1e5cdc5
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.

1 participant