Repository navigation
Test Samples with .NET 10 and .NET 11 consumer SDKs - #5314
mattleibow wants to merge 6 commits into
Conversation
📦 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 -- 5314PowerShell / 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-5314More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-5314 |
📊 SkiaSharp benchmarks — PR #5314⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS
Highlights⏱️ Time — 🔴 49 slower · 🟢 15 faster
Full per-OS benchmark deltasLinux⏱️ Time (vs 🌙 nightly
Windows⏱️ Time (vs 🌙 nightly
macOS⏱️ Time (vs 🌙 nightly
|
959c2c5 to
8f25d52
Compare
8f25d52 to
4339864
Compare
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
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
4339864 to
004d39a
Compare
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 main085a3a619c1af059a022a41f0718c195bdac753d(which includes the coordinator's6e010cb9293c600e91897011067635a8da3638bfplus 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 exact4339864db3eforce-with-lease.Required skia PR
None.
Areas affected
binding/)externals/skia/src/c,include/c)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, merge885ff4b3e4258cf5309860c9031812a5c667a0b2. 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.Both passed 5/5, zero skips/failures. These are bounded contracts, not real SDK11 sample/device/full-runtime proof.
Azure server preview-only compilation:
Passed: request uses
previewRun:trueand 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. Targetedgit 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 --checkpassed; 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 at959c2c5d642cbe49cfba02858a3f590800e34620with 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
Changesabove lists all public API and behavioral changes (or "None.")///documentation and regenerated bindings when applicablemono/skiaPR linked above and bindings regeneratedThe last two items are not applicable: no shipping public API or native changes.