Repository navigation
CI: install KiCad from the cache without Launchpad or the mirrors - #9
Merged
Merged
Conversation
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>
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>
This was referenced Nov 18, 2026
Merged
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 cache from #8 didn't stop the failures on
main. The two failed attempts of run 44244214159 show why:actions/cache's save, so nothing was kept and the next run started cold again.add-apt-repositoryasks Launchpad's API for the PPA key on every run. The API returned HTTP 503, which failed the job before it downloaded anything, cached or not.ppa.launchpadcontent.netwas also returning 503 on and off today.Change
ci/kicad-ppa.asc, fingerprintFDA8 54F6 1C4D 0D95 72BB 95E5 245D 5502 FAD7 A805, which matches what Launchpad publishes). The new scriptci/install_kicad.shwrites the apt source itself..debfiles. If the lists were refreshed in the last 7 days, the install runs with--no-downloadand falls back toapt-get updateonly if a package is missing. Lists older than that are refreshed first, which picks up KiCad point releases, and are used as they are if the refresh fails.actions/cache/restoreand saved withactions/cache/saveunderif: always(), with one key per run. It's saved whenever the cache changed, including after a failed or timed-out install, so each run continues from where the last one stopped. An unchanged warm run saves nothing.Main can't restore a PR's cache, so the first run on
mainafter this lands will be a cold run.Testing (CI on this PR, 2026-11-18)
Run 3 also includes a follow-up commit: with fresh lists, the fallback now downloads just the missing packages before trying a full
apt-get update.Not exercised yet: the path for lists older than 7 days (refresh first, fall back to the cache), and a Launchpad outage with a warm cache (run 3 made no network calls, so it wouldn't have mattered).
maincan't read a PR's cache, somainwill start cold after this lands. On a slow day that can take a run that times out plus a rerun, as on this PR, but every run keeps what it downloaded.🤖 Generated with Claude Code