Skip to content

Commit

Permalink
Cache rust dependecies (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
zephraph authored Feb 19, 2025
1 parent 640910e commit bca9de1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/rust-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ jobs:
cache_key_prefix: mise-${{ hashFiles('mise.toml') }}-${{ matrix.target }}
experimental: true

- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: "binary-${{ matrix.target }}"
workspaces: "."
cache-directories: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
- run: mise x -- rustup target add ${{ matrix.target }}
- run: mise run ci:install-deps

Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:
cache_key_prefix: mise-{{hashFiles('mise.toml')}}
experimental: true

- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: "lint"

- name: Lint
run: mise lint

Expand All @@ -38,6 +44,12 @@ jobs:
cache_key_prefix: mise-{{hashFiles('mise.toml')}}
experimental: true

- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: "codegen"

- name: Run codegen
run: mise run gen

Expand Down

0 comments on commit bca9de1

Please sign in to comment.