Skip to content

CI: install KiCad from the cache without Launchpad or the mirrors - #19

Merged
thePunderWoman merged 2 commits into
mainfrom
ci-kicad-offline-cache
Nov 19, 2026
Merged

thePunderWoman merged 2 commits into
mainfrom
ci-kicad-offline-cache

Conversation

@thePunderWoman

Copy link
Copy Markdown
Member

Same change as PunderWorks/DroidCANBridge#9, which is tested there and merged.

The Install KiCad 10 step depends on Launchpad (the KiCad PPA and its API) and on the Ubuntu mirrors on every run. Both are slow or down at times. On 2026-11-18 a cold 163 MB download timed out with the mirror at 58-384 kB/s, and add-apt-repository failed with Launchpad's API returning HTTP 503.

Change

  • No Launchpad API call. ci/kicad-ppa.asc is the PPA's signing key (fingerprint FDA8 54F6 1C4D 0D95 72BB 95E5 245D 5502 FAD7 A805, which matches Launchpad). ci/install_kicad.sh writes the apt source itself, instead of calling add-apt-repository.
  • Lists and packages are cached together in ~/apt-cache. If the lists are less than 7 days old, the install runs with no network. If packages are missing, it downloads just those, and refreshes the lists only if that fails. Older lists are refreshed first, and the cache is used as it is if the refresh fails.
  • Every run's downloads are kept. The cache is restored with actions/cache/restore and saved with actions/cache/save under if: always(), with one key per run. It's saved whenever the cache changed, including after a failed or timed-out install. The install timeout goes from 15 to 20 minutes.

In DroidCANBridge's tests, a cold run that timed out still saved 169 MB. The rerun downloaded only the missing 36 MB, and a run with a full cache installed in 36 s with no downloads.

The first run here starts cold. On a slow day it may time out, and a rerun then continues from what it saved.

🤖 Generated with Claude Code

thePunderWoman and others added 2 commits November 18, 2026 13:35
Same change as DroidCANBridge #9. Launchpad (the KiCad PPA and its API) and
the Ubuntu mirrors are each slow or down at times: a cold 163 MB download
can exceed the step timeout, and add-apt-repository fails outright when
Launchpad's API returns 503.

ci/install_kicad.sh writes the PPA source with its signing key committed in
ci/kicad-ppa.asc (fingerprint FDA854F61C4D0D9572BB95E5245D5502FAD7A805), and
keeps apt's lists and .debs in ~/apt-cache. With lists under a week old it
installs with no network, then downloads only missing packages, then
refreshes. The workflow saves the cache after every run that changed it,
including one that failed or timed out, so partial downloads carry over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When Install KiCad 10 times out, the runner kills the step but apt's download
processes keep running. Saving the cache then failed on DroidCANBridge main
(run 44402841035): "tar: .../archives/partial/mesa-libgallium_...deb: file
changed as we read it", and nothing was kept. Stop apt-get and its download
methods before saving; half-downloaded files stay in partial/ for apt to
resume.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thePunderWoman
thePunderWoman merged commit 58cc744 into main Nov 19, 2026
3 checks passed
@thePunderWoman
thePunderWoman deleted the ci-kicad-offline-cache branch November 19, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant