Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docker,ci): mount .ccache by bind mount instead of cache mount #4829

Closed
wants to merge 7 commits into from

Conversation

youtalk
Copy link
Member

@youtalk youtalk commented Jun 6, 2024

Description

Up until now, I had been using --mount=type=cache to mount the ccache directory in the Dockerfile, but I found that when the layer cache of the Docker build cache is invalidated, ccache also ends up being empty.
Therefore, by mounting the host's ccache directory using --mount=type=bind, this PR can avoid the impact of the Docker build cache. This ccache directory is saved as a cache in GitHub Actions, allowing it to be reused in subsequent builds.

https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/reference.md#run---mount

Tests performed

https://github.com/autowarefoundation/autoware/actions/runs/9396442321

Effects on system behavior

Not applicable.

Interface changes

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
@youtalk youtalk self-assigned this Jun 6, 2024
@youtalk youtalk closed this Jun 10, 2024
@youtalk youtalk deleted the bind-mount-ccache branch June 10, 2024 02:35
@youtalk youtalk removed their assignment Jun 11, 2024
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.

None yet

1 participant