8484 ~/.cargo/registry
8585 ~/.cargo/git
8686 native/target
87- key : ${{ runner.os }}-cargo-ci-${{ hashFiles('native/**/Cargo.lock', 'native/**/Cargo.toml') }}
87+ key : ${{ runner.os }}-cargo-ci-${{ hashFiles('native/**/Cargo.lock', 'native/**/Cargo.toml') }}-${{ hashFiles('native/**/*.rs') }}
8888 restore-keys : |
89- ${{ runner.os }}-cargo-ci-
89+ ${{ runner.os }}-cargo-ci-${{ hashFiles('native/**/Cargo.lock', 'native/**/Cargo.toml') }}-
9090
9191 - name : Build native library (CI profile)
9292 run : |
@@ -112,7 +112,7 @@ jobs:
112112 ~/.cargo/registry
113113 ~/.cargo/git
114114 native/target
115- key : ${{ runner.os }}-cargo-ci-${{ hashFiles('native/**/Cargo.lock', 'native/**/Cargo.toml') }}
115+ key : ${{ runner.os }}-cargo-ci-${{ hashFiles('native/**/Cargo.lock', 'native/**/Cargo.toml') }}-${{ hashFiles('native/**/*.rs') }}
116116
117117 # Run Rust tests (runs in parallel with build-native, uses debug builds)
118118 linux-test-rust :
@@ -138,9 +138,9 @@ jobs:
138138 ~/.cargo/git
139139 native/target
140140 # Note: Java version intentionally excluded - Rust target is JDK-independent
141- key : ${{ runner.os }}-cargo-debug-${{ hashFiles('native/**/Cargo.lock', 'native/**/Cargo.toml') }}
141+ key : ${{ runner.os }}-cargo-debug-${{ hashFiles('native/**/Cargo.lock', 'native/**/Cargo.toml') }}-${{ hashFiles('native/**/*.rs') }}
142142 restore-keys : |
143- ${{ runner.os }}-cargo-debug-
143+ ${{ runner.os }}-cargo-debug-${{ hashFiles('native/**/Cargo.lock', 'native/**/Cargo.toml') }}-
144144
145145 - name : Rust test steps
146146 uses : ./.github/actions/rust-test
@@ -153,7 +153,7 @@ jobs:
153153 ~/.cargo/registry
154154 ~/.cargo/git
155155 native/target
156- key : ${{ runner.os }}-cargo-debug-${{ hashFiles('native/**/Cargo.lock', 'native/**/Cargo.toml') }}
156+ key : ${{ runner.os }}-cargo-debug-${{ hashFiles('native/**/Cargo.lock', 'native/**/Cargo.toml') }}-${{ hashFiles('native/**/*.rs') }}
157157
158158 linux-test :
159159 needs : build-native
0 commit comments