agnos-builder
agnos-builder copied to clipboard
ci: speed up build with BuildKit cache + apt cache + GHA tarball cache
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.