Skip to content

Commit

Permalink
qa: nuke caches on CI descriptor change
Browse files Browse the repository at this point in the history
Adds a nonce field to manually nuke the cache

Changing the CI workflow descriptor can invalidate dependencies
and ccache caches by introducing different compilers or base OS,
but as GH Actions does not let us update an existing cache, this
would cause every subsequent CI run to rebuild everything until
a nuke is triggered.
  • Loading branch information
patricklodder committed Nov 8, 2021
1 parent 4a5e485 commit cfe91b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
CCACHE_TEMPDIR: /tmp/.ccache-temp
CCACHE_COMPRESS: "1"
PYTHON_DEBUG: "1"
CACHE_NONCE: "1"
WINEDEBUG: fixme-all
SDK_URL: https://bitcoincore.org/depends-sources/sdks

Expand Down Expand Up @@ -182,7 +183,7 @@ jobs:
cache-name: depends
with:
path: ./depends/built
key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('depends/packages/*') }}
key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('depends/packages/*', '.github/workflows/ci.yml') }}

- name: Build depends
run: |
Expand All @@ -194,7 +195,7 @@ jobs:
cache-name: ccache
with:
path: ~/.ccache
key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('**/configure.ac') }}
key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('**/configure.ac', '.github/workflows/ci.yml') }}

- name: Build Dogecoin
run: |
Expand Down

0 comments on commit cfe91b0

Please sign in to comment.