smoke-test, os-check: pin CCACHE_DIR to the cached path

The two jobs that manage their ccache cache manually rely on ccache's
XDG default (~/.cache/ccache) matching the actions/cache path. That
holds today, but nothing enforces it: a later change that sets
CCACHE_DIR (e.g. adopting the ccache-setup composite, which uses
~/.ccache) would silently decouple the build's cache from the
saved/restored directory. Pin CCACHE_DIR explicitly to the cached
path so the pairing is visible and cannot drift.
This commit is contained in:
Juliusz Sosinowicz
2026-06-11 23:06:59 +00:00
parent 1f6abed28e
commit 12597308de
2 changed files with 13 additions and 0 deletions
+6
View File
@@ -75,6 +75,12 @@ jobs:
- name: Allow unprivileged user namespaces (for bwrap)
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 || true
# ccache's default cache dir (XDG ~/.cache/ccache) is what the
# actions/cache step below saves; pin it explicitly so the two
# cannot drift apart (e.g. if a later change sets CCACHE_DIR).
- name: Pin ccache directory
run: echo "CCACHE_DIR=$HOME/.cache/ccache" >> "$GITHUB_ENV"
- name: Restore ccache
uses: actions/cache@v4
with:
+7
View File
@@ -98,6 +98,13 @@ jobs:
if: steps.merge_check.outputs.skip != 'true'
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 || true
# ccache's default cache dir (XDG ~/.cache/ccache) is what the
# actions/cache step below saves; pin it explicitly so the two
# cannot drift apart (e.g. if a later change sets CCACHE_DIR).
- name: Pin ccache directory
if: steps.merge_check.outputs.skip != 'true'
run: echo "CCACHE_DIR=$HOME/.cache/ccache" >> "$GITHUB_ENV"
- name: Restore ccache
if: steps.merge_check.outputs.skip != 'true'
uses: actions/cache@v4