@@ -138,9 +138,8 @@ jobs:
138138 # ---------- Cache Cargo ----------
139139 # See builds.yml for the rationale: the Rust FFI output only changes with
140140 # the client-sdk-rust submodule commit, so key the target cache on the
141- # submodule SHA (Cargo.lock is pinned inside the submodule and froze the
142- # old cache). Restore/save split so the populated target/ is snapshotted
143- # right after the build instead of in a post-job step.
141+ # submodule SHA. The build workflow owns saving this cache; tests are
142+ # restore-only to avoid same-key save races across parallel jobs.
144143 - name : Resolve Rust submodule SHA
145144 id : rust_sha
146145 shell : bash
@@ -188,18 +187,6 @@ jobs:
188187 shell : pwsh
189188 run : ${{ matrix.build_cmd }}
190189
191- # Snapshot the populated target/ after a successful build. Placed before
192- # the test steps so the Rust FFI output is cached regardless of whether
193- # the unit/integration tests pass. Only on a miss (exact-key hit means the
194- # cache already holds this submodule's output; a restore-keys prefix hit
195- # still counts as a miss and refreshes under the new SHA).
196- - name : Save cargo target
197- if : steps.cache-cargo-target.outputs.cache-hit != 'true'
198- uses : actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
199- with :
200- path : client-sdk-rust/target/
201- key : ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
202-
203190 # ---------- Run unit tests ----------
204191 - name : Run unit tests (Unix)
205192 if : runner.os != 'Windows'
0 commit comments