forge
Explore
Log in

Don't you dare go Hollow

Bump the rust-cache prefix for the gnu target

Browse files at this commit

280f563e049fa9e773a216c7ca9b889827bcb19fAhmet Kaan GümüşParent: 150069e
  • fix
    • bump the rust-cache prefix for the gnu target
Show full message
🩹 fix(ci): bump the rust-cache prefix for the gnu target

The cache key does not include the target or the rustflags, and on a
key hit the save step reports up-to-date and stores nothing — so the
deps recompiled under the musl→gnu transition were thrown away and
would have been recompiled on every future run (both flag-change runs
measured 421s and 381s against a ~300s warm floor for exactly this
reason). A new prefix makes the next run save a fresh snapshot.
.github/workflows/main.ymlmodified+6 -0
@@ -44,6 +44,12 @@ jobs:
44 uses: Swatinem/rust-cache@v244 uses: Swatinem/rust-cache@v2
45 with:45 with:
46 cache-all-crates: true46 cache-all-crates: true
47+ # Bump when the target, the profile or any rustflags change: the
48+ # key does not otherwise see those, and a run that restores the
49+ # old key reports it up-to-date at save time — discarding the
50+ # recompiled dependencies and silently recompiling them on every
51+ # later run (observed when the musl→gnu move landed on this key).
52+ prefix-key: v1-rust-gnu
47 53
48 # Compiling the CLI from source costs minutes and it changes only when54 # Compiling the CLI from source costs minutes and it changes only when
49 # the pinned version does, so it is cached on that version alone.55 # the pinned version does, so it is cached on that version alone.