From 29a5b55d7c0f0726b8956fa71bc6a721d46fa12b Mon Sep 17 00:00:00 2001 From: msschwartz21 Date: Wed, 18 Sep 2024 11:00:13 -0700 Subject: [PATCH] Use unique ids for cache steps in workflow --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c08b61f..1abe14ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,13 +61,13 @@ jobs: fetch-depth: 50 # this is to make sure we obtain the target base commit - uses: actions/cache@v3 - id: cache + id: cache_data with: path: downloads key: ${{ hashFiles('scripts/download_samples.py') }} - name: Download Samples - if: steps.cache.outputs.cache-hit != 'true' + if: steps.cache_data.outputs.cache-hit != 'true' run: | pip install requests python scripts/download_test_data.py @@ -87,20 +87,20 @@ jobs: - name: Retrieve cached baseline if available uses: actions/cache/restore@v4 - id: cache + id: cache_baseline with: path: baseline.json key: ${{ github.event.pull_request.base.sha }} - name: Run baseline benchmark if not in cache - if: steps.cache.outputs.cache-hit != 'true' + if: steps.cache_baseline.outputs.cache-hit != 'true' run: | git checkout ${{ github.event.pull_request.base.sha }} pytest tests/bench.py --benchmark-json baseline.json - name: Cache baseline results uses: actions/cache/save@v4 - if: steps.cache.outputs.cache-hit != 'true' + if: steps.cache_baseline.outputs.cache-hit != 'true' with: path: baseline.json key: ${{ github.event.pull_request.base.sha }}