agnos-builder icon indicating copy to clipboard operation
agnos-builder copied to clipboard

ci: speed up build with BuildKit cache + apt cache + GHA tarball cache

Open Bennethxyz opened this issue 2 months ago • 0 comments

Speed up CI builds (addresses #259):

  • Persist BuildKit caches between runs for both agnos and meta-builder images using type=gha cache-from/cache-to in build_system.sh.
  • Add apt cache mounts in Dockerfile.agnos to avoid repeated package index downloads and speed up apt installs in multiple stages.
  • Cache the Ubuntu base tarball in the workflow via actions/cache to avoid re-downloading on each run.

This should materially reduce build times on subsequent runs while keeping the build reproducible and safe. No behavior changes to the produced images.

Notes:

  • Pre-commit shows flake8 error in scripts/diff_dmesg.py unrelated to these changes; not touched here.
  • Buildx "--check" steps remain, now reusing cache.

Bennethxyz avatar Oct 22 '25 16:10 Bennethxyz