Skip to content

Partition Samples CI by typed execution target - #5339

Merged
mattleibow merged 5 commits into
mainfrom
mattleibow-sample-run-groups
Oct 13, 2026
Merged

mattleibow merged 5 commits into
mainfrom
mattleibow-sample-run-groups

Conversation

@mattleibow

@mattleibow mattleibow commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

Extract the RunGroup foundation independently of the consumer-SDK changes in #5314.

RunGroup describes execution target, not sample family: Build, Host, Docker, Android, Ios, Mac, Windows. A Samples-only compiler analyzer requires exactly one valid effective typed group and rejects missing, multiple, invalid, or raw RunGroup traits. Fact/Theory detection is semantic, including derived attributes, inherited tests/overrides and default-interface tests. The dedicated compiler regression project is deferred at maintainer request; no discovery/reconciliation guard is included.

Samples CI runs eight jobs: Build/Host/Docker on Windows and Linux, Build/Host on macOS. Names, result paths/titles and log artifacts are unique; Samples execution retries are zero. Existing SDK/workload/Tizen pins, agents, Xcode, prerequisites, provisioning/download retries, native/NuGet acquisition and Docker image pins remain unchanged. Reserved device groups have no empty jobs. Omitted local selection remains unfiltered.

Artifact publication follows existing test jobs: unconditional shouldPublish: false, explicit TRX results and shared publishArtifacts logs with always: true. No direct artifact task or Windows-only input deletion. Successful runs do not republish downloaded inputs; the shared failed-run whole-output snapshot remains unchanged. The developer guide covers setup, commands, group coverage, test annotations and troubleshooting, not implementation discussions.

Based directly on main d41f3583b8b43e9d4ea9b1e55257a498147bcb40, using immutable RunGroup source 8f25d525d2ed42a9e73d5d5fb78c2af93f53e818. Main's Console Fact is preserved. No SDK11 rows, consumer pinning/retarget helpers, SDK descriptors, installer changes or macOS host fixes. The other test-family template extraction is reviewed separately in #5341.

Related issues

Related to #5314 (separate review scope; does not close it).

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 — no shipping public API or rendering change. Existing Samples tests receive required execution-group traits; CI partitions them by execution target. Optional --runGroup selection is case-sensitive, rejects unknown groups and remains unfiltered when omitted. Artifact publication is aligned with the other test jobs.

Testing

  • Actual Azure pipeline 345 previewRun:true POST to https://dev.azure.com/dnceng-public/public/_apis/pipelines/345/runs?api-version=7.1, with self ref/version pinned separately to main d41f3583b8b43e9d4ea9b1e55257a498147bcb40 and current head cf92d81522b2752c2d2c6faed865ffb3f6cebfdb — passed. Exactly eight unique Samples jobs, correct selectors/results, execution retry 0, shared success/failure log artifacts, no successful whole-output upload or input deletion. Toolchain/provisioning/download policy unchanged; all non-Samples expansion identical. Preview only; no manual queue.
  • Compared artifact declarations with existing .NET Framework/Core jobs and the shared bootstrapper/public 1ES adapter. Parsed-YAML assertions — passed; same shouldPublish/publishArtifacts/TRX mechanism.
  • git diff --check origin/main..HEAD — passed. Latest commit changes only developer documentation; no runtime/template behavior change.
  • dotnet build tests/SkiaSharp.Tests.Samples.Analyzers/SkiaSharp.Tests.Samples.Analyzers.csproj -p:TargetFramework=net10.0 -p:TargetFrameworks=net10.0 --no-restore --verbosity=quiet — passed, zero warnings/errors, on the same managed sources.
  • dotnet cake scripts/infra/samples/samples.cake --target=samples --dryrun --verbosity=quiet — passed; same command with --runGroup=Build --sampleRunId=macos_build — passed.
  • The now-deferred test host passed 42 compiler/trait cases and Cake forwarding probes before removal; historical evidence only, not a current-head suite. No references to that project remain.
  • dotnet build tests/SkiaSharp.Tests.Samples/SkiaSharp.Tests.Samples.csproj -p:TargetFramework=net10.0 -p:TargetFrameworks=net10.0 --no-restore --verbosity=quiet — blocked by the required output/nugets cohort check in this fresh checkout. Full Samples and mandatory unfiltered core solution gate were not run locally: no producing native/NuGet inputs and local device/desktop/heavy consumer runs are paused. No fake artifacts, device runs, shared-cache/workload cleanup or heavy restores.

Automatic producing CI run 1632894 is running for current source head cf92d81522b2752c2d2c6faed865ffb3f6cebfdb (merge 1afc8560b12778fc16fd8d7eb23c6cc1b1966118). Current-head CI and review remain required before landing. Previous-head runs are not final-head proof.

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

Extract the fixed RunGroup contract independently of consumer SDK changes. Require one valid typed group at compile time, preserve unfiltered local execution, and split existing Samples hosts into eight execution-target jobs without changing their toolchain policy.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 0ff22fb7-8e03-4207-9f85-86bfe337c491
@github-actions

Copy link
Copy Markdown
Contributor

📖 Documentation Preview

Add the automation/staging label to build and publish a documentation preview for this PR.

Removing the label removes the preview. While the label is present, each new commit updates it.


This comment is automatically updated by the documentation staging workflow.

@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 -- 5339

PowerShell / Windows:

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

Step 2 — Add the local NuGet source

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

Remove the standalone compiler regression project and its solution, Cake and documentation wiring at maintainer request. Keep the Samples-only required RunGroup analyzer and existing execution partitions.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 0ff22fb7-8e03-4207-9f85-86bfe337c491
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

📊 SkiaSharp benchmarks — PR #5339

⭐ 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 — 🔴 37 slower · 🟢 35 faster

  • 🔴 ColorMathBenchmark.ToColor(Colors: 4096) · Windows · 5.46 µs → 17.02 µs (+212%)
  • 🔴 PathBoundsBenchmark.TightBounds(Points: 1024) · Windows · 9.23 µs → 20.96 µs (+127%)
  • 🔴 PathBoundsBenchmark.TightBounds(Points: 64) · Windows · 915.0 ns → 1.97 µs (+115%)
  • 🔴 MatrixMapPointsBenchmark.MapPoints(Points: 4096) · Windows · 1.12 µs → 2.28 µs (+104%)
  • 🔴 BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) · Windows · 135.19 µs → 273.05 µs (+102%)
  • …and 67 more (see details below)
Full per-OS benchmark deltas

Linux

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

Benchmark baseline this PR Δ
MatrixMapPointsBenchmark.MapPoints(Points: 256) 218.5 ns 238.7 ns 🔴 +9%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 2.69 µs 2.93 µs 🔴 +9%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 98.53 µs 107.04 µs 🔴 +9%
ColorMathBenchmark.ToColor(Colors: 4096) 15.39 µs 14.16 µs 🟢 -8%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 229.02 µs 217.53 µs 🟢 -5%

Windows

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

Benchmark baseline this PR Δ
ColorMathBenchmark.ToColor(Colors: 4096) 5.46 µs 17.02 µs 🔴 +212%
PathBoundsBenchmark.TightBounds(Points: 1024) 9.23 µs 20.96 µs 🔴 +127%
PathBoundsBenchmark.TightBounds(Points: 64) 915.0 ns 1.97 µs 🔴 +115%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 1.12 µs 2.28 µs 🔴 +104%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 135.19 µs 273.05 µs 🔴 +102%
CanvasDrawBenchmark.Draw(Shapes: 64) 1.43 ms 2.89 ms 🔴 +102%
CanvasDrawBenchmark.Draw(Shapes: 512) 11.49 ms 23.16 ms 🔴 +102%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 90.6 ns 179.6 ns 🔴 +98%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 66.54 µs 131.74 µs 🔴 +98%
ColorParseBenchmark.Parse(Iterations: 1000) 44.03 µs 85.51 µs 🔴 +94%
RuntimeEffectShaderBenchmark.DrawFrame 615.61 µs 1.18 ms 🔴 +91%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 179.44 µs 339.42 µs 🔴 +89%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 678.39 µs 1.27 ms 🔴 +87%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 507.87 µs 938.25 µs 🔴 +85%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 162.21 µs 294.16 µs 🔴 +81%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 6.02 µs 10.80 µs 🔴 +80%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 93.04 µs 167.00 µs 🔴 +79%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 6.07 ms 10.76 ms 🔴 +77%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 7.06 µs 12.34 µs 🔴 +75%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 1.29 ms 2.24 ms 🔴 +74%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 81.83 µs 141.37 µs 🔴 +73%
MatrixMapPointsBenchmark.MapVector(Points: 256) 5.13 µs 8.71 µs 🔴 +70%
ColorMathBenchmark.PreMultiply(Colors: 4096) 7.73 µs 13.11 µs 🔴 +70%
MatrixOpsBenchmark.Concat(Count: 4096) 156.32 µs 260.87 µs 🔴 +67%
ColorMathBenchmark.ToColorF(Colors: 4096) 8.25 µs 13.32 µs 🔴 +61%
…and 9 more

macOS

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

Benchmark baseline this PR Δ
MatrixOpsBenchmark.Concat(Count: 4096) 174.04 µs 109.71 µs 🟢 -37%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 2.06 ms 1.44 ms 🟢 -30%
CanvasDrawBenchmark.Draw(Shapes: 512) 15.73 ms 11.06 ms 🟢 -30%
ColorMathBenchmark.ToColorF(Colors: 4096) 6.97 µs 4.93 µs 🟢 -29%
ColorMathBenchmark.ToColor(Colors: 4096) 27.57 µs 19.59 µs 🟢 -29%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 919.67 µs 659.62 µs 🟢 -28%
MatrixOpsBenchmark.Invert(Count: 4096) 89.06 µs 65.76 µs 🟢 -26%
ColorMathBenchmark.PreMultiply(Colors: 4096) 11.17 µs 8.28 µs 🟢 -26%
ColorParseBenchmark.Parse(Iterations: 1000) 84.34 µs 65.23 µs 🟢 -23%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 3.40 ms 2.64 ms 🟢 -22%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 9.68 µs 7.54 µs 🟢 -22%
CanvasDrawBenchmark.Draw(Shapes: 64) 1.75 ms 1.41 ms 🟢 -19%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 644.68 µs 527.20 µs 🟢 -18%
MatrixMapPointsBenchmark.MapRect(Points: 256) 3.64 µs 3.03 µs 🟢 -17%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 115.98 µs 98.91 µs 🟢 -15%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 46.59 µs 39.90 µs 🟢 -14%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 165.57 µs 143.11 µs 🟢 -14%
PathBoundsBenchmark.TightBounds(Points: 1024) 9.50 µs 8.28 µs 🟢 -13%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 1.90 µs 1.65 µs 🟢 -13%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 6.51 ms 5.73 ms 🟢 -12%
MatrixMapPointsBenchmark.MapVector(Points: 256) 2.83 µs 2.49 µs 🟢 -12%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 5.98 ms 5.28 ms 🟢 -12%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 164.47 µs 145.73 µs 🟢 -11%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 1.29 µs 1.14 µs 🟢 -11%
PathBoundsBenchmark.TightBounds(Points: 64) 933.9 ns 833.4 ns 🟢 -11%
…and 8 more

📈 Full interactive perf-dashboard & run details →

Disable successful whole-output publication on every Samples host and declare diagnostic logs through the shared publishArtifacts mechanism. Remove the direct artifact task and Windows-only package deletion; retain the existing failed-run diagnostic snapshot.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 0ff22fb7-8e03-4207-9f85-86bfe337c491
v and others added 2 commits October 13, 2026 03:45
Document actionable group selection, CI coverage and test annotations. Remove artifact-refactor commentary, future routing discussion and change-history phrasing from the developer guide.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 0ff22fb7-8e03-4207-9f85-86bfe337c491
Update the PR with the merged caller-configured test templates while preserving the independent RunGroup changes and existing execution policies.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 0ff22fb7-8e03-4207-9f85-86bfe337c491
@mattleibow
mattleibow marked this pull request as ready for review October 13, 2026 03:58
@mattleibow
mattleibow merged commit 6e010cb into main Oct 13, 2026
85 of 90 checks passed
@mattleibow
mattleibow deleted the mattleibow-sample-run-groups branch October 13, 2026 04:15
@github-actions github-actions Bot added this to the 4.156.0-rc.1 milestone Nov 9, 2026
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