Skip to content

ci: Use ccache in CI and manual workflows#464

Merged
detsch merged 1 commit into
masterfrom
detsch-ci-ccache
May 25, 2026
Merged

ci: Use ccache in CI and manual workflows#464
detsch merged 1 commit into
masterfrom
detsch-ci-ccache

Conversation

@detsch
Copy link
Copy Markdown
Member

@detsch detsch commented May 22, 2026

Ccache is now active for both aklite-dev and aklite-dev-e2e images, so we can use it in CI and manual workflows to speed up builds.

Each image has a different cache key. The key also contains the git commit hash, to allow updates to the cache when the code changes. If the specific hash is not found, the cache will be restored using the latest cache.

Two new jobs where added to refresh the cache for both images, and are set as dependencies for the other jobs. This avoids multiple jobs having to perform the same compilation in parallel.

When using ccache effectively, the current CI workflow time is reduced from about 22.5 minutes to about 19.5 minutes. Additional reduction is expected once we split the jobs further, which makes more sense now that each job does not need to perform the same compilation.

Ccache is now active for both aklite-dev and aklite-dev-e2e images, so
we can use it in CI and manual workflows to speed up builds.

Each image has a different cache key. The key also contains the git
commit hash, to allow updates to the cache when the code changes.
If the specific hash is not found, the cache will be restored using the
latest cache.

Two new jobs where added to refresh the cache for both images, and are
set as dependencies for the other jobs. This avoids multiple jobs having
to perform the same compilation in parallel.

When using ccache effectively, the current CI workflow time is reduced
from about 22.5 minutes to about 19.5 minutes. Additional reduction is
expected once we split the jobs further, which makes more sense now that
each job does not need to perform the same compilation.

Signed-off-by: Andre Detsch <andre.detsch@foundries.io>
@detsch detsch marked this pull request as ready for review May 22, 2026 17:48
@detsch detsch requested a review from mike-sul May 22, 2026 21:11
Copy link
Copy Markdown
Contributor

@mike-sul mike-sul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is really nice. What the test running time improvement?

@detsch
Copy link
Copy Markdown
Member Author

detsch commented May 25, 2026

It is really nice. What the test running time improvement?

This change alone, from about 22.5 minutes to about 19.5 minutes. But with the change of #465, we got down to 12 minutes.

@detsch detsch merged commit 8611b76 into master May 25, 2026
29 of 31 checks passed
@detsch detsch deleted the detsch-ci-ccache branch May 25, 2026 13:45
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.

2 participants