Repository navigation
ci: skip the heavy jobs for documentation-only changes - #173
Merged
Merged
Conversation
… side by side The CI of a pull request took 17 minutes, all of it the XCFramework job, whose library builds in 48 seconds from the cache and whose three checks (the examples, the iPhone app, the Mac measurements) took the rest one after the other; the Linux job spent 250 of its 390 seconds installing the Vulkan driver's packages. - A "what changed" job says whether a pull request changes more than Markdown files and the pictures of docs/. If not, the jobs that build and run the code are skipped (a push to main runs everything, and lint always runs, since it checks the documents' figures and the copies of LICENSE and the notices). - The XCFramework checks are a matrix of three jobs, each building the XCFramework from the shared cache and running one check, so the job takes as long as the longest check. No check is removed or changed. - The Vulkan driver's packages are cached between runs. Claude-Session: https://claude.ai/code/session_019fJGoCTvP5e7n599q3ZQ42
Measured on this pull request, with cold and warm caches: - Splitting the XCFramework checks into three jobs did not shorten the pull request's CI: 17.1 minutes before, 15.1 cold and 16.7 warm after. Alone, each check takes longer than it did in the shared job (the iPhone app 912 s against 465 s, the examples 657 s against 398 s), since the later checks reuse the builds of the earlier ones there, so the three jobs cost almost twice the Mac minutes for the same wall time. - Caching the Vulkan driver's packages saved nothing visible: the Linux job took 1.8 minutes cold and 2.2 minutes warm; the 250 seconds of the first measurement were the mirror's, not the packages'. Both are taken out again. What stays is the "what changed" job, which skips the jobs that build and run the code for a pull request that changes only Markdown files and the pictures of docs/, which is a gain of about 17 minutes for such a pull request, as the next documentation change will show. Claude-Session: https://claude.ai/code/session_019fJGoCTvP5e7n599q3ZQ42
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.
What changes for a contributor, and how to revert
A pull request that changes only Markdown files and the pictures under
docs/images/skips the jobs that build and run the code (oldest Rust,browser build,build + teston three systems,XCFramework); the lint job still runs, as it checks the documents' figures and the copies ofLICENSEand the notices. A push tomainruns everything. To revert, revert this commit.Purpose
The CI of a pull request took about 17 minutes, which is the XCFramework job. Most of the pull requests of the last two weeks changed only documents and benchmark tables.
Changes
A
what changedjob compares the pull request's files with its base and says whether anything is not a Markdown file or a picture ofdocs/images/; the four jobs above need it and are skipped when it says no.What was tried and taken out
Measured on this pull request, cold and warm:
Testing
This pull request changes a workflow, so every job ran and passed. The skip itself is tested by the next documentation-only pull request, which should show
what changedpassing and the heavy jobs skipped; if it does not, that pull request is the place to fix it.