ci: warm the cargo cache from main, drop duplicated CI work - #32
Merged
Merged
Conversation
The lint job stood up a second Linux environment - apt dependencies, Node, pnpm, a frontend build for generate_context!() and its own cargo cache - purely to run the Linux clippy pass. build-test already builds all of that for ubuntu, so clippy now runs there for every OS and lint is formatting only. The Playwright harness typecheck was fanned out by the ui-tests matrix into four identical runs. frontend-test already runs it once per pull request. Comments, step names and CI log strings in both workflows are now English.
Covers the four workflows not touched by the previous commit, the dictionary development plan, one comment in MicrophoneSection, and the developer-facing output of check-i18n, find-eager-t, check-build-paths and build-installer. Russian is kept where it is data rather than prose: the ru_RU dictionaries, i18n strings, formatter test fixtures, README.ru.md, and the English comments that quote Russian words or UI strings to explain what the code does with them. Translating those would remove the thing being described.
An Actions cache is restorable only by the ref that wrote it or by the default branch. With pull_request as the only trigger, every cache landed on refs/pull/N/merge, which no other pull request can reach, and nothing ever wrote one on main. Across 48 runs every first run on a branch logged "No cache found": 12m48-14m19 on Windows cold against 4m49-5m39 warm. Running on push to main leaves a cache later pull requests can restore, and save-if stops them writing their own. That keeps the repo under the 10 GB cache ceiling it was already over, and takes the ~2m20 cache upload off the critical path. Runs on main are not cancelled by a following merge: the cache they leave is the whole point, and a cancelled upload sends the next pull request back to a cold build.
…nglish-comments # Conflicts: # .github/workflows/rust-ci.yml # .github/workflows/sbom.yml # .github/workflows/site.yml # docs/dictionary-sets-plan.md
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.
Summary
Three CI changes and a language sweep.
Cold cache on every new pull request. An Actions cache is restorable only by the ref that wrote it or by the default branch. Rust CI ran on
pull_requestonly, so every cache landed onrefs/pull/N/merge, which no other pull request can reach, and nothing ever wrote one on main. Across 48 runs, every first run on a branch loggedNo cache found: Windows took 12m48–14m19 cold against 4m49–5m39 warm. Rust CI now also runs on a push to main for the cache it leaves,save-ifstops pull requests writing their own, and main runs are no longer cancelled by a following merge.Duplicated setup in
lint. It stood up a second Linux environment — apt dependencies, Node, pnpm, a frontend build forgenerate_context!()and its own cargo cache — only to run the Linux clippy pass.build-testalready builds that for ubuntu, so clippy runs there for every OS andlintis formatting only. That also removes a 563 MB cache per pull request, which matters: the repository was at 10.42 GB against a 10 GB ceiling.Harness typecheck fanned out 4× by the ui-tests matrix.
frontend-testalready runs it once.Comments, step names, CI log strings and script output are now English, along with the dictionary plan. Russian is kept where it is data rather than prose: the ru_RU dictionaries, i18n strings, formatter fixtures, README.ru.md, and English comments that quote Russian words to explain what the code does with them.
Verification
Run locally:
cargo fmt --all -- --check,tsc --noEmit(app and Playwright harness), Vitest (32 files, 249 tests),pnpm i18n:check,ruff check scripts/, the pinned-actions gate, and a YAML parse of every workflow. All pass.save-ifwas confirmed to exist in the pinnedSwatinem/rust-cache@6323deb1by readingaction.ymlat that SHA — an unknown input would be ignored silently.Unverified: the speedup itself cannot be shown before this merges. The first evidence is the next new pull request after the merge logging
Cache hitinstead ofNo cache foundinBuild + test (windows-latest). This pull request's own run will still be cold, because no cache exists on main yet.Note for the reviewer: the required check
Cargo fmt + clippy (Linux)is renamed toCargo fmt (Linux). Branch protection needs updating if it lists the old name.