Skip to content

Commit 20b2631

Browse files
committed
try to cache mdbook and cargo audit
1 parent 891bea3 commit 20b2631

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/checks.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,28 @@ jobs:
144144
- name: Set Rust toolchain
145145
run: rustup default ${{ env.RUST_VERSION }}
146146

147+
- name: Cache cargo-audit
148+
id: cache-cargo-audit
149+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
150+
with:
151+
path: ~/.cargo/bin/cargo-audit
152+
key: ${{ runner.os }}-cargo-audit-${{ hashFiles('.github/workflows/checks.yml') }}
153+
147154
- name: Install cargo-audit
155+
if: steps.cache-cargo-audit.outputs.cache-hit != 'true'
148156
run: cargo install --locked cargo-audit
149157

158+
- name: Cache mdbook
159+
id: cache-mdbook
160+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
161+
with:
162+
path: |
163+
~/.cargo/bin/mdbook
164+
~/.cargo/bin/mdbook-mermaid
165+
key: ${{ runner.os }}-mdbook-${{ hashFiles('Makefile') }}
166+
150167
- name: Setup documentation checks
168+
if: steps.cache-mdbook.outputs.cache-hit != 'true'
151169
run: make doc-install-deps
152170

153171
- name: Rust Format Check

0 commit comments

Comments
 (0)