From ded4aba53691c1707beb73e5db9ea4f7622fc288 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Tue, 10 Feb 2026 08:55:25 -0600 Subject: [PATCH] Add stickydisk caching for cargo git deps and Rust toolchain - Cache ~/.cargo/git for git-sourced dependencies - Cache ~/.rustup to avoid re-downloading toolchain each run - Move format check before cargo check (fail fast on formatting) --- .github/workflows/ci.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29e3d55..22afbe7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,18 @@ jobs: key: ${{ github.repository }}-cargo-registry path: ~/.cargo/registry + - name: Mount Cargo git + uses: useblacksmith/stickydisk@v1 + with: + key: ${{ github.repository }}-cargo-git + path: ~/.cargo/git + + - name: Mount Rust toolchain + uses: useblacksmith/stickydisk@v1 + with: + key: ${{ github.repository }}-rustup + path: ~/.rustup + - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable with: @@ -56,12 +68,12 @@ jobs: packages: protobuf-compiler lld libsnmp-dev version: 1.0 - - name: Check - run: cargo check --release - - name: Format check run: cargo fmt -- --check + - name: Check + run: cargo check --release + - name: Test run: cargo test