Fix CI: use Cargo.toml hash for cache key instead of missing Cargo.lock

The previous cache key used hashFiles('**/Cargo.lock') but Cargo.lock is
gitignored in this library repo. This caused the cache to have an empty
hash suffix, restoring stale dependencies that didn't include tantivy,
wide, and other optional deps that were added recently.

Using Cargo.toml hash ensures the cache invalidates when dependencies change.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Olow304
2026-01-27 10:33:37 -05:00
parent a4fc2b4e72
commit 9b7f5a62a1
+1 -1
View File
@@ -36,7 +36,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Build
run: cargo build --verbose