Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ci): use cache-version instead of 'v0-' in rust cache key prefix #2323

Merged
merged 2 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/actions/toolchain-and-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ runs:
with:
# only save the cache on the main branch to limit github actions total cache size
save-if: ${{ github.ref == 'refs/heads/main' }}
key: ${{ runner.os }}-cache-v${{ inputs.cache-version }}
prefix-key: v${{ inputs.cache-version }}-rust-${{ runner.os }}

- name: Install cargo tools installer
uses: taiki-e/install-action@v2
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install stable toolchain, tools, and restore cache
uses: ./.github/workflows/actions/toolchain-and-cache
with:
cache-version: 22.04-${{ secrets.CACHE_VERSION }}
cache-version: 22.04-${{ vars.CACHE_VERSION }}
cargo-tools: cargo-deb
github-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
- name: Install stable toolchain and restore cache
uses: ./.github/workflows/actions/toolchain-and-cache
with:
cache-version: ${{ secrets.CACHE_VERSION }}
cache-version: ${{ vars.CACHE_VERSION }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build Mithril workspace & publish artifacts
Expand All @@ -121,7 +121,7 @@ jobs:
- name: Install stable toolchain, tools, and restore cache
uses: ./.github/workflows/actions/toolchain-and-cache
with:
cache-version: ${{ secrets.CACHE_VERSION }}-wasm
cache-version: ${{ vars.CACHE_VERSION }}-wasm
cargo-tools: wasm-pack
github-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:
- name: Install stable toolchain, tools, and restore cache
uses: ./.github/workflows/actions/toolchain-and-cache
with:
cache-version: ${{ secrets.CACHE_VERSION }}
cache-version: ${{ vars.CACHE_VERSION }}
cargo-tools: cargo-nextest
github-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
- name: Install stable toolchain, tools, and restore cache
uses: ./.github/workflows/actions/toolchain-and-cache
with:
cache-version: ${{ secrets.CACHE_VERSION }}
cache-version: ${{ vars.CACHE_VERSION }}
cargo-tools: cargo-machete cargo-sort clippy-sarif sarif-fmt
github-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -532,7 +532,7 @@ jobs:
- name: Install stable toolchain, tools, and restore cache
uses: ./.github/workflows/actions/toolchain-and-cache
with:
cache-version: ${{ secrets.CACHE_VERSION }}-wasm
cache-version: ${{ vars.CACHE_VERSION }}-wasm
cargo-tools: wasm-pack
github-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -739,7 +739,7 @@ jobs:
- name: Install stable toolchain and restore cache
uses: ./.github/workflows/actions/toolchain-and-cache
with:
cache-version: ${{ secrets.CACHE_VERSION }}
cache-version: ${{ vars.CACHE_VERSION }}
cargo-tools: clippy-sarif sarif-fmt
github-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
if: inputs.package == matrix.package || inputs.package == 'all'
uses: ./.github/workflows/actions/toolchain-and-cache
with:
cache-version: ${{ secrets.CACHE_VERSION }}-wasm
cache-version: ${{ vars.CACHE_VERSION }}-wasm
cargo-tools: wasm-pack
github-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ jobs:
- name: Install stable toolchain, tools, and restore cache
uses: ./.github/workflows/actions/toolchain-and-cache
with:
cache-version: ${{ secrets.CACHE_VERSION }}-wasm
cache-version: ${{ vars.CACHE_VERSION }}-wasm
cargo-tools: wasm-pack
github-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ jobs:
- name: Install stable toolchain, tools, and restore cache
uses: ./.github/workflows/actions/toolchain-and-cache
with:
cache-version: ${{ secrets.CACHE_VERSION }}-wasm
cache-version: ${{ vars.CACHE_VERSION }}-wasm
cargo-tools: wasm-pack
github-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
Loading