[skia-sync] Restore exact-base native prebuild cache - #4659
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 -- 4659PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4659"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-4659/packages --name skiasharp-pr-4659More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4659 |
|
📖 Documentation Preview The documentation for this PR has been deployed and is available at: 🔗 View Staging Site This preview will be updated automatically when you push new commits to this PR. This comment is automatically updated by the documentation staging workflow. |
📊 SkiaSharp benchmarks — PR #4659⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS
Highlights⏱️ Time — 🔴 49 slower · 🟢 21 faster
Full per-OS benchmark deltasLinux⏱️ Time (vs 🌙 nightly
Windows⏱️ Time (vs 🌙 nightly
macOS⏱️ Time (vs 🌙 nightly
|
📦 Artifact size reportPackages from this PR (build Total Packages
+38 package(s) unchanged (< 50.0 KB). Per-file changes
|
| File | Size |
|---|---|
runtimes/win-arm64/native/libGLESv2.pdb |
64.5 MB → 64.4 MB (🟢 −128.0 KB) |
runtimes/win-x86/native/libGLESv2.pdb |
67.3 MB → 67.2 MB (🟢 −128.0 KB) |
runtimes/win-x64/native/libGLESv2.pdb |
66.6 MB → 66.5 MB (🟢 −96.0 KB) |
Informational only — this never blocks the PR. Native binaries are labelled by os/arch.
Build and cache the native base in an isolated checkout pinned to the resolved parent commit and its recursive submodule gitlinks. Keep the workflow checkout untouched while the agent and delivery steps reuse the same path-safe Ninja state. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e546dddf-af7c-4a5f-b04f-2709446cc556
2c58146 to
28c7802
Compare
Keep the gh-aw checkout immutable while directing every product phase, native build, test, and delivery step to the isolated exact-base workspace. Persist the resolved parent SHA for cache-key and branch preparation consumers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e546dddf-af7c-4a5f-b04f-2709446cc556
|
Closing for now so we can revisit the exact-base native prebuild/cache optimization later. The implementation remains pushed on the PR branch. |
Description
Restore the host-side native prebuild/cache optimization removed by #4657, without reintroducing the mixed-tree failure from run 30932472778.
The workflow materializes the exact resolved parent commit in isolated
/tmp/skia-sync-worktree, recursively checks out every submodule gitlink from that tree, and uses that same fixed path for cache restore, the cold base build, the agent's merged-target build, and post-step delivery.GITHUB_WORKSPACEremains the untouched gh-aw checkout, while currentmain's immutable staged update-skia skill drives product work in the isolated checkout.The cache has no broad restore prefix. Its key includes the exact parent SHA, exact Skia SHA, runner/image/toolchain fingerprint, platform, and architecture. Phase 04's deterministic helper creates both feature branches at those already-checked-out SHAs, so hydrated dependencies, Ninja objects, and native outputs remain in place. No artifacts are copied across paths and no mutate-then-restore sequence is used.
Related issues
N/A — follow-up to #4573, #4657, and #4660.
Required skia PR
None.
Areas affected
binding/)externals/skia/src/c,include/c)Changes
None — CI-only; no public API or product behavior changes.
Testing
bash .github/scripts/skia-sync-checkout-base.test.shproves an m150 release selection uses release/4.150.x parent metadata, build scripts, exact Skia gitlink, and exact nested submodule gitlink while leaving the gh-aw checkout unchanged. It then runs the actual Phase 04prepare_branches.pyhelper and proves cached dependency, Ninja, and native-output markers survive branch creation.python .agents/skills/update-skia/scripts/prepare_branches_test.pypasses.bash -npasses for the checkout, prepare, push, and regression scripts.gh aw compile auto-skia-sync --validatecompletes with 0 errors and 0 warnings.The write-capable Skia sync workflow was not manually dispatched.
Checklist
Changesabove lists all public API and behavioral changes (None)