Skip to content

Commit 25e8d0e

Browse files
chore: add Swatinem/rust-cache to remaining workflows (#281)
- Add caching to publish-crates workflow to speed up publishing - Add caching to cargo-deny workflow to speed up security checks - Both workflows now use the same intelligent Rust caching as CI
1 parent 66e293e commit 25e8d0e

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

.github/workflows/cargo-deny.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ name: Cargo Deny
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
paths:
7-
- '**/Cargo.toml'
8-
- '**/Cargo.lock'
9-
- 'deny.toml'
10-
- '.github/workflows/cargo-deny.yml'
7+
- "**/Cargo.toml"
8+
- "**/Cargo.lock"
9+
- "deny.toml"
10+
- ".github/workflows/cargo-deny.yml"
1111
pull_request:
1212
paths:
13-
- '**/Cargo.toml'
14-
- '**/Cargo.lock'
15-
- 'deny.toml'
16-
- '.github/workflows/cargo-deny.yml'
13+
- "**/Cargo.toml"
14+
- "**/Cargo.lock"
15+
- "deny.toml"
16+
- ".github/workflows/cargo-deny.yml"
1717
schedule:
18-
- cron: '0 0 * * MON' # Weekly on Monday
18+
- cron: "0 0 * * MON" # Weekly on Monday
1919

2020
jobs:
2121
cargo-deny:
@@ -34,17 +34,20 @@ jobs:
3434

3535
steps:
3636
- name: Checkout
37-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3838

3939
- name: Install Rust
40-
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
40+
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
4141
with:
4242
toolchain: stable
4343

44+
- name: Cache cargo
45+
uses: Swatinem/rust-cache@v2
46+
4447
- name: Install cargo-deny
4548
uses: taiki-e/install-action@v2
4649
with:
4750
tool: cargo-deny@0.16.2
4851

4952
- name: Run cargo-deny
50-
run: cargo deny --all-features check ${{ matrix.checks }}
53+
run: cargo deny --all-features check ${{ matrix.checks }}

.github/workflows/publish-crates.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
4343
- name: Install Rust
4444
uses: dtolnay/rust-toolchain@stable
4545

46+
- name: Cache cargo
47+
uses: Swatinem/rust-cache@v2
48+
4649
- name: Install cargo-workspaces
4750
run: cargo install cargo-workspaces
4851

0 commit comments

Comments
 (0)