Skip to content

Conversation

@cz4rs
Copy link
Contributor

@cz4rs cz4rs commented Jun 24, 2025

fixes #2448

This is pretty simple and straightforward approach, with the main downside being that local output means exporting entire container (while we are only interested in /build/ccache). Using docker cp would probably achieve the same result with an additional step in build-docker-images.yml.

Other possibilities:

@github-actions
Copy link

clang-format output for this changeset:

no modified files to format

@cz4rs cz4rs changed the title #2438: ci: bake: enable local output and use it for caching #2448: ci: bake: enable local output and use it for caching Jun 24, 2025
@cz4rs cz4rs force-pushed the 2448-enable-caching-with-docker-bake branch 3 times, most recently from d53e24d to 6fe9cdf Compare June 25, 2025 12:16
@cz4rs cz4rs marked this pull request as ready for review June 26, 2025 09:15
@cz4rs cz4rs force-pushed the 2448-enable-caching-with-docker-bake branch from 6fe9cdf to 0ec78f8 Compare June 26, 2025 09:15
@cz4rs
Copy link
Contributor Author

cz4rs commented Jun 26, 2025

ccache does not work correctly in Alpine build (even though the output from previous build is correctly stored / restored with actions/cache@v4):

#8 [build 2/3] RUN --mount=target=/vt <<EOF (if [ -d vt/docker-output/build/ccache ]; then...)
#8 0.159 Summary:
#8 0.159   Hits:               0 /    0
#8 0.159     Direct:           0 /    0
#8 0.159     Preprocessed:     0 /    0
#8 0.159   Misses:             0
#8 0.159     Direct:           0
#8 0.159     Preprocessed:     0
#8 0.159 Primary storage:
#8 0.159   Hits:               0 /    0
#8 0.159   Misses:             0
#8 0.159   Cache size (GB): 0.00 / 0.70 (0.00 %)
#8 0.159 
#8 0.159 Use the -v/--verbose option for more details.
#8 DONE 2.0s

Can be fixed in a separate issue.

@cz4rs cz4rs requested review from cwschilly and lifflander June 26, 2025 09:46
Copy link
Collaborator

@lifflander lifflander left a comment

Choose a reason for hiding this comment

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

This looks great for CI. Good job finding a solution for that!

@lifflander lifflander merged commit 7abb0ce into develop Jun 26, 2025
54 checks passed
Logan590 pushed a commit that referenced this pull request Jul 17, 2025
…docker-bake

#2448: ci: bake: enable local output and use it for caching
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.

[CI] enable caching for docker bake builds

3 participants