From 4f545ba6de087d08c89fe19d7e539b7f903093af Mon Sep 17 00:00:00 2001 From: cy Date: Sat, 18 Jan 2025 16:48:57 -0500 Subject: [PATCH] cache rust stuff --- .github/workflows/build-and-cache.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build-and-cache.yml b/.github/workflows/build-and-cache.yml index da9e42a..32b0739 100644 --- a/.github/workflows/build-and-cache.yml +++ b/.github/workflows/build-and-cache.yml @@ -17,6 +17,19 @@ jobs: - uses: DeterminateSystems/nix-installer-action@main with: logger: pretty + + # use sccache for Rust + - name: Run sccache-cache + if: (env.SCCACHE_GHA_ENABLED == 'true') + uses: mozilla-actions/sccache-action@main + + # use rust-cache + - uses: Swatinem/rust-cache@v2 + with: + cache-all-crates: "true" + cache-on-failure: "true" + cache-targets: "true" + - uses: DeterminateSystems/magic-nix-cache-action@main - name: Setup Attic cache uses: ryanccn/attic-action@v0