Skip to content

Commit 62d6ed6

Browse files
committed
Always provide cache key
1 parent 95caea0 commit 62d6ed6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/reusable.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ jobs:
517517
# For jobs not compatible with ccache, use "ccache: no" in the matrix
518518
if [[ "${{ matrix.ccache }}" == "no" ]]; then
519519
echo "B2_USE_CCACHE=0" >> "$GITHUB_ENV"
520-
else
520+
elif [[ "${B2_USE_CACHE:-1}" != "0" ]]; then
521521
# Common prefix w/o C++ std (old key)
522522
prefix='${{matrix.os}}-${{matrix.container}}-${{matrix.xcode_app}}${{matrix.compiler}}'
523523
echo "legacy-restore-key=${prefix}-" >> "$GITHUB_OUTPUT"
@@ -559,7 +559,7 @@ jobs:
559559
if: env.B2_USE_CCACHE
560560
with:
561561
path: ~/.ccache
562-
key: ${{steps.setup.outputs.key}}
562+
key: ${{steps.setup.outputs.key || 'cache-disabled'}}
563563
restore-keys: |
564564
${{steps.setup.outputs.restore-key}}
565565
${{steps.setup.outputs.legacy-restore-key}}

0 commit comments

Comments
 (0)