Repository navigation
Refactor test jobs into execution-family templates - #5341
Conversation
Keep test-stage composition, agent selection, and coverage collection in the stage while fixed desktop, container, and device/WASM templates own their existing execution settings. Preserve job identities, ordering, GPU declarations, SDK selection, and artifact behavior. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 4373b194-465a-4d1b-bc0d-2a3b3e6e35e9
|
📖 Documentation Preview Add the 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. |
📦 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 -- 5341PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 5341"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-5341/packages --name skiasharp-pr-5341More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-5341 |
Share one bootstrapper definition per execution family rather than moving repeated job bodies. Keep only fixed runtime/image metadata and target-specific provisioning differences, retaining existing execution settings and stage composition. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 4373b194-465a-4d1b-bc0d-2a3b3e6e35e9
📊 SkiaSharp benchmarks — PR #5341⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS
Highlights⏱️ Time — 🔴 40 slower · 🟢 39 faster
Full per-OS benchmark deltasLinux⏱️ Time (vs 🌙 nightly
Windows⏱️ Time (vs 🌙 nightly
macOS⏱️ Time (vs 🌙 nightly
|
Keep reusable family templates focused on shared SDK setup, native inputs and result publication. Configure each job's names, arguments, environment, artifacts and provisioning steps explicitly at its stage call site instead of switching on runtime or platform inside the templates. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 4373b194-465a-4d1b-bc0d-2a3b3e6e35e9
Use each unique test-job display name plus Tests for its published run title. Derive coverage artifact names from the existing tests_ job prefix, so Core callers pass only publishCoverage. Test execution and coverage collection remain unchanged; only the displayed run titles are simplified. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 4373b194-465a-4d1b-bc0d-2a3b3e6e35e9
Description
Share repeated test-job setup and publishing through three reusable templates, with the differences passed explicitly by stage callers:
The templates contain no runtime/platform/image switches. Stage composition and agent selection remain explicit, including the dedicated Android agent; coverage collection and its dependencies stay in the stage. Outer pipeline gating, managed/MSBuild/Samples jobs and the bootstrapper are unchanged.
All 15 test-job display names are unique, so test-run titles are derived as
displayName + " Tests". Coverage artifact names are derived by replacing the job name'stests_prefix withcoverage_, leaving Core callers with onlypublishCoverage: true. Existing coverage artifact names remain unchanged.The complete refactor removes 208 lines overall, including explicit caller configuration and the directly affected documentation updates. This is a separate main-based refactor, not part of #5339 or #5314. No native, SDK-version, test-policy or test-execution changes.
Related issues
None. Separate from #5339 and #5314.
Required skia PR
None.
Areas affected
binding/)externals/skia/src/c,include/c)Changes
No public API or product-runtime changes.
CI result labels: test-run titles now use each job's display name followed by
Tests. Ten existing labels are simplified; for example,Windows .NET Core TestsbecomesWindows (.NET Core) Tests, andAndroid Tests (API ...)becomesAndroid Tests. Device versions remain in setup arguments and log artifact names. All 15 titles remain unique. Test execution, artifact names and coverage collection are unchanged.Testing
Passed: actual public Azure pipeline 345 (
mono-SkiaSharp)previewRun: trueexpansion with identical default template parameters at exact refs/versions:refs/heads/maind41f3583b8b43e9d4ea9b1e55257a498147bcb40refs/heads/mattleibow-test-job-templates9c5fd64d76f6564e0fc50604abf972794a8c5ec1Across 12 stages / 92 jobs, all executable settings, job identities, pools, conditions, retries, provisioning, SDK/workload selection, step order, GPU environment, artifacts and dependency graphs match main except the explicitly verified display-derived test-run titles. The comparison asserts each of the 15 published titles equals that job's
displayName + " Tests", asserts all 15 are unique, and permits only those exact title replacements; it does not ignore result-task contents generally. The three coverage artifact names and collector dependencies remain unchanged. Source checks also confirm unchanged non-test stages and test-stage dependency branches.Automatic CI: public pipeline 345 build 1632922 was automatically triggered by this PR and is in progress (not yet a passed run). Its
triggerInfo.pr.sourceShais9c5fd64d76f6564e0fc50604abf972794a8c5ec1, and its producing merge revision is0a988bfdd2ab4f8c2fadb987b152746499270362. No build was manually queued.Exact validation commands and results
Helper scripts, requests/responses, expanded YAML and comparison proof are session artifacts, not repository additions.
Each preview uses
az rest --method post --url 'https://dev.azure.com/dnceng-public/public/_apis/pipelines/345/runs?api-version=7.1' --resource 499b84ac-1321-427f-aa17-267ca6975798 --headers Content-Type=application/json --body @<saved-request.json> --output json, withpreviewRun: true,templateParameters: {}, and repository self pinned to the corresponding ref and SHA above.Not run: product/native/device/desktop/consumer execution, bootstrap or SDK/workload installation: this is YAML-only refactoring, and local runtime runs are paused. No product tests were added because no product code or test execution changes. Optional test-only
yamlOverridepreview was not retried: the companion investigation established that Azure requires unavailableEditBuildpermission for modified YAML. Existing test-only source conditions remain unchanged.Checklist
Changesabove lists all public API and behavioral changes (or "None.")///documentation and regenerated bindings when applicablemono/skiaPR linked above and bindings regenerated