From 94aff73f0183ccdf71826b7e2475547266693bed Mon Sep 17 00:00:00 2001 From: Martin Yeo Date: Wed, 5 Jan 2022 11:34:29 +0000 Subject: [PATCH] ALWAYS cache benchmark generated data. --- .github/workflows/benchmark.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index bcfceb1646..9be3c11548 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -17,7 +17,6 @@ jobs: IRIS_TEST_DATA_VERSION: "2.5" # Lets us manually bump the cache to rebuild TEST_DATA_CACHE_BUILD: "2" - GEN_DATA_CACHE_BUILD: "1" PY_VER: 3.8 steps: @@ -54,8 +53,13 @@ jobs: with: path: | ${{ env.IRIS_TEST_DATA_PATH }} - key: - test-data-${{ env.IRIS_TEST_DATA_VERSION }}-${{ env.TEST_DATA_CACHE_BUILD }} + # Make sure GHA never gets an exact cache match by using the unique + # github.sha. This means it will always store this run as a new + # cache (any changes happen DURING the run, and I don't _think_ GHA + # caching has anything native to support this). Cache restoration + # still succeeds via the partial restore-key match. + key: ${{ runner.os }}-${{ github.sha }} + restore-keys: ${{ runner.os }} - name: Cache generated data directory id: cache-generated-data