[CONAN] fallback cache key with run_id

This commit is contained in:
Nicholas Dudfield
2025-03-25 19:03:55 +07:00
parent 9bd6d2244e
commit 5d41688e36
2 changed files with 19 additions and 3 deletions

View File

@@ -1,9 +1,9 @@
name: MacOS Development - Github Actions Runner
on:
push:
branches: [jshooks]
branches: [ jshooks ]
pull_request:
branches: [jshooks]
branches: [ jshooks ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -135,7 +135,7 @@ jobs:
id: ccache-restore
uses: actions/cache/restore@v4
with:
path: ~/Library/Caches/ccache
path: ~/.ccache
key: ${{ runner.os }}-ccache-${{ env.CACHE_VERSION }}-${{ steps.safe-branch.outputs.name }}
restore-keys: |
${{ runner.os }}-ccache-${{ env.CACHE_VERSION }}-
@@ -151,6 +151,7 @@ jobs:
# After your build step
- name: Save ccache directory
id: save-ccache
if: success()
uses: actions/cache/save@v4
with:
@@ -158,6 +159,13 @@ jobs:
# Reference the primary key from the restore step
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
- name: Save ccache with run_id fallback in case of lock contention
if: steps.save-ccache.outcome == 'failure'
uses: actions/cache/save@v4
with:
path: ~/.ccache
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}-${{ github.run_id }}
- name: Test
run: |
${build_dir}/rippled --unittest --unittest-jobs $(nproc)

View File

@@ -148,6 +148,7 @@ jobs:
# After your build step
- name: Save ccache directory
id: save-ccache
if: success()
uses: actions/cache/save@v4
with:
@@ -155,6 +156,13 @@ jobs:
# Reference the primary key from the restore step
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}
- name: Save ccache with run_id fallback in case of lock contention
if: steps.save-ccache.outcome == 'failure'
uses: actions/cache/save@v4
with:
path: ~/.ccache
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}-${{ github.run_id }}
- name: Set artifact name
id: set-artifact-name
run: |