Skip to content

Commit 2a7801f

Browse files
andygroveclaude
andcommitted
fix: include Java version in Cargo cache key for rust tests
The linux-test-rust job caches native/target which contains JNI-related build artifacts. Without Java version in the cache key, Java 11 and 17 jobs could restore incompatible cached artifacts from each other. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent ae11ac8 commit 2a7801f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/pr_build_linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ jobs:
114114
~/.cargo/registry
115115
~/.cargo/git
116116
native/target
117-
key: ${{ runner.os }}-cargo-debug-${{ hashFiles('native/**/Cargo.lock', 'native/**/Cargo.toml') }}
117+
key: ${{ runner.os }}-cargo-debug-java${{ matrix.java_version }}-${{ hashFiles('native/**/Cargo.lock', 'native/**/Cargo.toml') }}
118118
restore-keys: |
119-
${{ runner.os }}-cargo-debug-
119+
${{ runner.os }}-cargo-debug-java${{ matrix.java_version }}-
120120
121121
- name: Rust test steps
122122
uses: ./.github/actions/rust-test

0 commit comments

Comments
 (0)