From 8a007d38e7356778288705e7cc93d98d2032af09 Mon Sep 17 00:00:00 2001 From: Ramon Roche Date: Mon, 9 Feb 2026 14:12:44 -0800 Subject: [PATCH] CI: split ccache into restore/save so cache persists on failure Use separate cache/restore and cache/save steps with if: always() on the save step, matching the build_all_targets pattern. Signed-off-by: Ramon Roche --- .github/workflows/clang-tidy.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index 0187cbcd47..8eb8cc7a35 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -27,9 +27,9 @@ jobs: - name: Git ownership workaround run: git config --system --add safe.directory '*' - - name: ccache cache + - name: ccache cache restore id: cc_restore - uses: runs-on/cache@v4 + uses: runs-on/cache/restore@v4 with: path: ~/.ccache key: ccache-clang-tidy-${{ github.ref_name }} @@ -56,3 +56,10 @@ jobs: - name: ccache post-build stats if: always() run: ccache -s + + - name: ccache cache save + if: always() + uses: runs-on/cache/save@v4 + with: + path: ~/.ccache + key: ${{ steps.cc_restore.outputs.cache-primary-key }}