ci: build the patched engine, not just check that the series applies - #11
Merged
Merged
Conversation
ci.yml builds against stock libservo, and its "patch series applies" job proves servo-patches/ still applies. Nothing compiles the result, so the README's "Using a patched Servo" recipe is verified as far as `git am` and no further. This adds a Linux job that follows the recipe end to end and builds it. The override block is lifted out of README step 3 rather than restated. The paths there are relative to the workspace root, which is where the block gets appended, so cloning the engine crates as siblings of the checkout makes the documented paths work verbatim: CI builds the block the README hands a consumer, and a recipe that stops working stops working here. Which repositories get checked out is read out of that block too. Every `path = "../<dir>/..."` is a checkout to build; anything overridden by git rev is cargo's to fetch. That distinction is live — the csp override has been both — so following the block keeps this working across the move instead of silently building the wrong thing. An override by path with no recipe fails, and so does one whose patch glob matches nothing: patching a pristine checkout would build something indistinguishable from stock while reporting success. Revisions still come from Cargo.lock via .cargo_vcs_info.json, so nothing new is pinned here either. The job earns its keep on one thing nothing else covers: `patched-servo` exists to set layout_svg_native_enabled, a pref only patch 0009 provides, so a series that still applies but has lost the pref passes every other job. Linux only, uncached, and triggered on the series, the manifests, the README and the toolchain pin, plus weekly and on demand. A cold run is about a quarter of an hour, so the filter is cheap to widen later; a rust-cache entry would not be, since it would evict the per-platform caches every pull request depends on.
jonathanKingston
force-pushed
the
claude/servo-ci-patches-636601
branch
from
August 25, 2026 01:49
682ca91 to
e977579
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ci.ymlbuilds against stock libservo, and its patch series applies jobproves
servo-patches/still applies. Nothing compiles the result — so theREADME's "Using a patched Servo" recipe is verified as far as
git amand nofurther. This adds a Linux job that follows the recipe end to end and builds
what it produces.
How it stays honest
The override block is lifted out of README step 3, not restated here. The
paths in it are relative to the workspace root, which is exactly where the
block gets appended, so cloning the engine crates as siblings of the checkout
makes the documented paths work verbatim. CI builds the block the README
hands a consumer; edit the recipe and CI follows it.
Which repositories get checked out is read out of that block too. Every
path = "../<dir>/..."is a checkout to build; anything overridden by git revis cargo's to fetch. That distinction is live rather than hypothetical:
content-security-policyhas been both — patch files here until #2 moved itsfixes to a fork branch — and
check-patch-series.shnow handles eitherarrangement for the same reason. Hardcoding today's two checkouts would mean
this quietly building the wrong thing the next time one moves. An override by
path with no recipe fails, and so does one whose patch glob matches nothing:
patching a pristine checkout would build something indistinguishable from
stock while reporting success.
Nothing new is pinned. Revisions come from
Cargo.lockvia.cargo_vcs_info.json, the same routecheck-patch-series.shtakes. The twoscripts duplicate those ~20 lines rather than sharing them, to stay out of
#9's way; worth factoring out once that lands.
What it catches that nothing else does
patched-servoexists to setlayout_svg_native_enabled, a pref only patch0009 provides. A series that still applies but has lost that pref passes every
other job in this repository and fails here.
Cost, and the knobs
Linux only, uncached, 13m54s cold on the first run — comparable to
ci.yml's own Linux build. NoSwatinem/rust-cache: a fourth multi-gigabyteentry would evict the per-platform caches every pull request depends on, to
warm a job that runs a few times a month. Disk was never close: 84 GB free on
the runner, servo's checkout 1.6 GB.
Triggers are the series, the manifests,
README.md(the block is read out ofit), and the toolchain pin — plus weekly and
workflow_dispatch.src/**isdeliberately not a trigger, so a change to the feature-gated block in
src/servo/embedder.rsis only caught by the weekly run. Easy to tighten ifthat trade looks wrong.
Verification
Run locally against a scratch copy of the tree:
csp-*.patch)05528760, servo 24/24, stylo 5/5cargo generate-lockfilewith the block appliedAnd the job itself has now run on this pull request — all ten steps green in
13m54s. The log confirms it built the patched engine rather than the
registry one: every component resolved to the local checkout, e.g.
Adding servo v0.5.0 (/home/runner/work/tauri-runtime-servo/servo/components/servo)and
selectors v0.40.0 (…/stylo/selectors). Both the--libbuild and theexample link succeeded.
🤖 Generated with Claude Code