Commit 864a2aa
Speed up Docker builds with BuildKit ccache mount
Enable ccache in the Docker build by:
- Adding ccache to the builder stage's apt packages
- Using a BuildKit cache mount (--mount=type=cache) for /root/.cache/ccache
so the compiler cache persists across rebuilds
- Setting CMAKE_C/CXX_COMPILER_LAUNCHER=ccache in the cmake invocation
- Adding the BuildKit syntax directive and BUILDKIT_INLINE_CACHE=1 build arg
in the CI workflow
Also modernise the Dockerfile syntax:
- Use '=' form for ENV directives (required by newer Docker versions)
- Use uppercase AS for multi-stage build aliases
Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>1 parent 5719027 commit 864a2aa
2 files changed
Lines changed: 15 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1015 | 1015 | | |
1016 | 1016 | | |
1017 | 1017 | | |
1018 | | - | |
| 1018 | + | |
1019 | 1019 | | |
1020 | 1020 | | |
1021 | 1021 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
25 | 33 | | |
26 | | - | |
| 34 | + | |
27 | 35 | | |
28 | 36 | | |
0 commit comments