From 18db5efac2058187ad51e64f234d8c9f9ab45631 Mon Sep 17 00:00:00 2001 From: Firelight Flagboy <firelight.flagboy@gmail.com> Date: Wed, 27 Nov 2024 16:17:54 +0100 Subject: [PATCH] Fix cache concurrency issue Using the same cache key across multiple jobs can cause issues if we make assumption about it's content (like installing tools if not hit on the cache). --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc1c38ee..0bd8647f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,8 +26,9 @@ jobs: ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ + ~/.rustup/toolchains/ target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }} + key: ${{ runner.os }}-cargo-compile-v1-${{ matrix.libfuse }}-${{ matrix.features }}-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }} - name: Install packages run: | @@ -60,8 +61,9 @@ jobs: ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ + ~/.rustup/toolchains/ target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }} + key: ${{ runner.os }}-cargo-ci-v1-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }} - name: Install packages run: |