Skip to content

Commit 2eda741

Browse files
authored
Fix ccache saving on cache hit (#33)
See boostorg/boost-ci#166
1 parent 252c6fd commit 2eda741

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,20 +130,23 @@ jobs:
130130
fi
131131
git config --global pack.threads 0
132132
133-
- uses: actions/checkout@v2
133+
- uses: actions/checkout@v3
134134
with:
135135
# For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary'
136136
fetch-depth: ${{ matrix.coverage && '0' || '1' }}
137137

138138
- name: Cache ccache
139-
uses: actions/cache@v2
139+
uses: actions/cache@v3
140140
if: env.B2_USE_CCACHE
141141
with:
142142
path: ~/.ccache
143-
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}
143+
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-${{github.sha}}
144+
restore-keys: |
145+
${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-
146+
${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}
144147
145148
- name: Fetch Boost.CI
146-
uses: actions/checkout@v2
149+
uses: actions/checkout@v3
147150
with:
148151
repository: boostorg/boost-ci
149152
ref: master

0 commit comments

Comments
 (0)