Repository navigation
CI: cache the KiCad .debs between runs - #8
Merged
Merged
Conversation
The Install KiCad 10 step downloads the same packages on every run, and both the Ubuntu mirrors (us-east-2.ec2.archive.ubuntu.com lately) and the KiCad PPA are slow at times. Keep the .debs in actions/cache, keyed on the runner image and this workflow, so a run only fetches the package indexes plus anything newer. A new key restores the previous cache; apt autoclean drops superseded packages before it is saved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thePunderWoman
added a commit
that referenced
this pull request
Nov 18, 2026
* CI: install KiCad from the cache without Launchpad or the mirrors The cache from #8 didn't stop failures on main: - A cold run timed out downloading the 163 MB of packages; a failed step skips actions/cache's save, so nothing was kept and the next run started cold. - add-apt-repository asks Launchpad's API for the PPA key every run, and that API returned 503, failing the job with every package already cached. Now ci/install_kicad.sh: - writes the PPA source with its signing key committed in ci/kicad-ppa.asc (fingerprint FDA854F61C4D0D9572BB95E5245D5502FAD7A805, checked against Launchpad), so Launchpad's API is never called; - caches apt's package lists as well as the .debs, and with lists refreshed in the last 7 days installs with --no-download (no network), falling back to apt-get update only if something is missing; older lists are refreshed first and used as-is if the refresh fails. The workflow restores with actions/cache/restore and saves with actions/cache/save under if: always(), with a key per run, whenever the cache changed, including after a failed or timed-out install, so partial downloads carry over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * CI: fetch only the missing packages when the cached lists are fresh The rerun after a timeout refreshed the package lists before downloading the 36 MB the cache was missing. With lists under a week old, download against them first and refresh only if that fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
The Install KiCad 10 step downloads the same packages on every run. The Ubuntu mirror (lately
us-east-2.ec2.archive.ubuntu.com) and the KiCad PPA are both slow at times; PR #7's runs sat in this step for 10+ minutes.Change
.debfiles inactions/cache@v6(~/apt-cache, passed to apt asDir::Cache::archives). A cached run fetches only the package indexes, plus any package newer than the cache.ci.yml. The image updates roughly weekly, which picks up KiCad point releases. A new key restores the previous cache, andapt-get autocleandrops superseded.debfiles before the cache is saved, so it doesn't grow.apt-get updateruns once, with retries and no translation indexes (add-apt-repository --no-update).The first run on this PR fills the cache, so it's still slow. A rerun should show the cache hit and a much shorter install step.
🤖 Generated with Claude Code