Repository navigation
ci: drop apt and sccache from the setup action, and key the native cache on the image - #82
Merged
Merged
Conversation
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.
Before. PR #81 changes only
Cargo.lock, and its jobElixir + Rust verificationhit the 20 minute timeout twice. Most of the time went toapt-get updateandapt-get installin the setup action:When attempt 1 was cancelled,
task checkhad run for only 2 min 20 s.Problem.
ubuntu-latestmoved to ubuntu-26.04 on 2026-10-19, and its apt mirror took 17 to 20 minutes. The apt step was not necessary, because the runner image already has cmake, gcc, make, pkg-config, and libclang. The move to the new image also showed two more faults:whisper-rs-syswhen a system header changes, and the old target names headers such as/usr/lib/llvm-18/...that do not exist on 26.04. So each run built whisper.cpp three times (release, clippy, test). The key matched exactly, soactions/cachenever saved a new target.503 Egress is over the account limit, and sccache stoppedmix compileat once. sccache gave 0 hits on main and 3 hits from 90 requests on this PR.After. The setup action has no apt step and no sccache, and the native target cache key starts with the runner image (
ubuntu26-native-...).task checkA change to
Cargo.locknow costs at most the cold run, about 4 1/2 minutes, so the 20 minute timeout stays as it is. The first run on main after the merge is cold and saves the ubuntu26 target for the next runs.Cause, design, and tests
The cause is in
.github/actions/setup/action.yml, in the stepInstall system packages. The packages that it installed were already on the image: cmake 4.4.4 in/usr/local/bincomes before the apt cmake in/usr/bin, so the build never used the apt cmake.libclang1-21was already on the image too, because the apt log selected onlylibclang-21-devandlibclang-dev.The native cache key had
runner.os(Linux), which is the same for every Ubuntu release. The whisper-rs-sys build script callsbindgen::CargoCallbacks, which writesrerun-if-changedfor every header that bindgen reads, also for the system headers. A new step reads$ImageOS(set by the GitHub-hosted runner, for exampleubuntu26) and puts it first in the key and in the restore key. A target from another release is thus never restored. The mix and cargo registry caches do not depend on the image, so they keeprunner.os.I removed sccache instead of making it optional. The cargo target cache already gives the warm build, and sccache only added a second dependency on the cache service.
whisper_cpp is public, so GitHub-hosted minutes cost nothing. Our self-hosted
incusrunners have no scale set for whisper_cpp, and on a public repo a fork PR could run its code on them. So the job stays onubuntu-latest.Tests: the cold and the warm run above, both on ubuntu-26.04. Both ran the full
task check: format, compile with--warnings-as-errors, credo, clippy,mix test,cargo test, and zizmor.