Fix ccache saving on cache hit

When a cache with the key exists it is NOT saved even when changed.
Hence make the key unique to a commit (SHA) and restore the most recent
cache with a key prefixed by the part without the SHA.
This commit is contained in:
Alexander Grund
2022-06-04 10:49:49 +02:00
parent 9398571fbe
commit 699bb3b786

View File

@@ -137,7 +137,8 @@ jobs:
if: env.B2_USE_CCACHE
with:
path: ~/.ccache
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-${{github.sha}}
restore-keys: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-
- name: Fetch Boost.CI
uses: actions/checkout@v3