mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
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 <mrpollo@gmail.com>
This commit is contained in:
@@ -27,9 +27,9 @@ jobs:
|
|||||||
- name: Git ownership workaround
|
- name: Git ownership workaround
|
||||||
run: git config --system --add safe.directory '*'
|
run: git config --system --add safe.directory '*'
|
||||||
|
|
||||||
- name: ccache cache
|
- name: ccache cache restore
|
||||||
id: cc_restore
|
id: cc_restore
|
||||||
uses: runs-on/cache@v4
|
uses: runs-on/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.ccache
|
path: ~/.ccache
|
||||||
key: ccache-clang-tidy-${{ github.ref_name }}
|
key: ccache-clang-tidy-${{ github.ref_name }}
|
||||||
@@ -56,3 +56,10 @@ jobs:
|
|||||||
- name: ccache post-build stats
|
- name: ccache post-build stats
|
||||||
if: always()
|
if: always()
|
||||||
run: ccache -s
|
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 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user