From cfe91b00b48ea725a1f125b6e2837dfa99d1e62a Mon Sep 17 00:00:00 2001 From: Patrick Lodder Date: Mon, 8 Nov 2021 09:54:43 -0500 Subject: [PATCH] qa: nuke caches on CI descriptor change 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. --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a81bf262..5aa3011bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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: | @@ -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: |