From ba71e5d4e10ffc90d9efad490dc086fe046c5599 Mon Sep 17 00:00:00 2001 From: Michal R Date: Sun, 7 Dec 2025 19:54:41 +0100 Subject: [PATCH] ci: Use nightly version as a cache prefix in jobs using both nightly and stable This way we make sure that the cache is invalidated once we are on a new nightly version. --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d724ca5..ae9ffd8d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,6 +153,10 @@ jobs: - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 + env: + # Use the nightly toolchain as part of the cache key so that any + # change in the nightly version automatically invalidates the cache. + RUSTUP_TOOLCHAIN: nightly - run: cargo install --git https://github.com/aya-rs/bpf-linker.git bpf-linker --features llvm-21 @@ -295,6 +299,10 @@ jobs: targets: aarch64-unknown-linux-musl,x86_64-unknown-linux-musl - uses: Swatinem/rust-cache@v2 + env: + # Use the nightly toolchain as part of the cache key so that any + # change in the nightly version automatically invalidates the cache. + RUSTUP_TOOLCHAIN: nightly - name: Install libLLVM # Download libLLVM from Rust CI to ensure that the libLLVM version