From ded575bcf4abb0cc0896ec84b2d744b5f345d30b Mon Sep 17 00:00:00 2001 From: Edward Amsden Date: Fri, 8 Dec 2023 16:09:54 -0600 Subject: [PATCH] ci: cache rust dependencies --- .github/workflows/ares-shared.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ares-shared.yml b/.github/workflows/ares-shared.yml index 212857ce0..4398d607a 100644 --- a/.github/workflows/ares-shared.yml +++ b/.github/workflows/ares-shared.yml @@ -21,6 +21,20 @@ jobs: with: extra_nix_config: "extra-experimental-features = nix-command flakes" + - name: Set cache key for dev env + run: export ARES_NIX_DEVSHELL_PATH=$(nix eval --raw ".#devShells.x86_64-linux.default.outPath") + + - name: Cache rust build artifacts + id: cache_rust + uses: Swatinem/rust-cache@v2 + with: + env-vars: "CARGO CC CFLAGX CXX CMAKE RUST ARES" + workspaces: "rust/ares -> target" + + - name: Rust cache hit? + run: | + echo "Rust cache hit: ${{steps.cache_rust.cache-hit}}" + # Check formatting - name: Format run: |