Skip to content

ci: reuse compiled objects between builds with ccache - #31

Merged
JBailes merged 1 commit into
mainfrom
feat/ccache
Oct 29, 2026
Merged

JBailes merged 1 commit into
mainfrom
feat/ccache

Conversation

@JBailes

@JBailes JBailes commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Every build compiled the whole kernel from scratch on a 4-core hosted
runner (amd64 ~80 min), even for a packaging-only change. ccache now
carries objects between runs in the repository's own Actions cache, per
architecture and kernel version, and each job prints its hit rate. main
restores only caches saved by main, so a pull request cannot feed a
release build.

For the cache to hit, nothing per-build may reach the kernel config,
which every file includes:

  • The build number moves from CONFIG_LOCALVERSION to a
    localversion-00-build file in the source tree. The kernel puts it ahead
    of CONFIG_LOCALVERSION, so the release stays 7.2.10--smoothkernel,
    which the existing exact .deb-name check confirms.
  • Signing material goes to a fixed path instead of a mktemp one, since
    the key path is part of the config.

.github/workflows/release.yml | 50 ++++++++++++++++++++++++++++++++++++++++---
docs/CI_RELEASES.md | 37 ++++++++++++++++++++++++--------
recipes/build-kernel.sh | 22 +++++++++++--------
3 files changed, 88 insertions(+), 21 deletions(-)

Every build compiled the whole kernel from scratch on a 4-core hosted
runner (amd64 ~80 min), even for a packaging-only change. ccache now
carries objects between runs in the repository's own Actions cache, per
architecture and kernel version, and each job prints its hit rate. main
restores only caches saved by main, so a pull request cannot feed a
release build.

For the cache to hit, nothing per-build may reach the kernel config,
which every file includes:
- The build number moves from CONFIG_LOCALVERSION to a
  localversion-00-build file in the source tree. The kernel puts it ahead
  of CONFIG_LOCALVERSION, so the release stays 7.2.10-<build>-smoothkernel,
  which the existing exact .deb-name check confirms.
- Signing material goes to a fixed path instead of a mktemp one, since
  the key path is part of the config.
@JBailes
JBailes merged commit b0787b2 into main Oct 29, 2026
4 checks passed
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