Skip to content

Commit

Permalink
Properly set CARGO_CACHE_KEY (#2558)
Browse files Browse the repository at this point in the history
Otherwise, CARGO_CACHE_KEY cannot pick CARGO_KEY which is set in
the global env.
  • Loading branch information
vrabaud authored Jan 7, 2025
1 parent 502f67a commit 4b16452
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/actions/cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ runs:
if: ${{ inputs.use-rust == 'true' }}
run: |
echo "CARGO_KEY=cargo-`cargo --version|cut -d' ' -f2`-${{ hashFiles('.github/action/**', steps.workflow-info.outputs.path, 'CMakeLists.txt', 'cmake/Modules/Findrav1e.cmake', 'cmake/Modules/LocalRav1e.cmake', 'ext/rav1e.cmd') }}" >> $GITHUB_ENV
echo "CARGO_CACHE_KEY=${{ env.CARGO_KEY }}-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ inputs.extra-key }}" >> $GITHUB_ENV
shell: bash
- name: Generate empty cargo cache key
if: ${{ inputs.use-rust != 'true' }}
Expand All @@ -57,6 +56,8 @@ runs:
path: ~/.cargo
key: ${{ env.CARGO_CACHE_KEY }}-${{ github.run_id }}
restore-keys: ${{ env.CARGO_CACHE_KEY }}
env:
CARGO_CACHE_KEY: ${{ env.CARGO_KEY }}-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ inputs.extra-key }}
- name: Cache external dependencies in ext
id: cache-ext
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
Expand Down

0 comments on commit 4b16452

Please sign in to comment.