@@ -80,14 +80,18 @@ jobs:
8080 toolchain : stable
8181 components : clippy
8282
83+ - name : Get rust_version
84+ id : rust_version
85+ run : echo "version=$(rustc -V)" >> $GITHUB_OUTPUT
86+
8387 - name : Cache cargo
8488 uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
8589 with :
8690 path : |
8791 target
8892 ~/.cargo/git
8993 ~/.cargo/registry
90- key : ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
94+ key : ${{ runner.os }}-${{ runner.arch }}-cargo-${{ steps.rust_version.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
9195
9296 - name : Install cargo-workspaces
9397 run : cargo install cargo-workspaces
@@ -124,14 +128,18 @@ jobs:
124128 with :
125129 toolchain : stable
126130
131+ - name : Get rust_version
132+ id : rust_version
133+ run : echo "version=$(rustc -V)" >> $GITHUB_OUTPUT
134+
127135 - name : Cache cargo
128136 uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
129137 with :
130138 path : |
131139 target
132140 ~/.cargo/git
133141 ~/.cargo/registry
134- key : ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
142+ key : ${{ runner.os }}-${{ runner.arch }}-cargo-${{ steps.rust_version.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
135143
136144 - name : Generate documentation
137145 run : cargo doc -v --document-private-items --all-features
@@ -190,14 +198,18 @@ jobs:
190198 - name : Install Rust toolchain
191199 uses : dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
192200
201+ - name : Get rust_version
202+ id : rust_version
203+ run : echo "version=$(rustc -V)" >> $GITHUB_OUTPUT
204+
193205 - name : Cache cargo
194206 uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
195207 with :
196208 path : |
197209 target
198210 ~/.cargo/git
199211 ~/.cargo/registry
200- key : ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
212+ key : ${{ runner.os }}-${{ runner.arch }}-cargo-${{ steps.rust_version.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
201213
202214 - name : Install cargo-tarpaulin
203215 uses : baptiste0928/cargo-install@f204293d9709061b7bc1756fec3ec4e2cd57dec0 # v3.4.0
@@ -258,14 +270,18 @@ jobs:
258270 - name : Install Cargo insta
259271 run : cargo install --locked cargo-insta
260272
273+ - name : Get rust_version
274+ id : rust_version
275+ run : echo "version=$(rustc -V)" >> $GITHUB_OUTPUT
276+
261277 - name : Cache cargo
262278 uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
263279 with :
264280 path : |
265281 target
266282 ~/.cargo/git
267283 ~/.cargo/registry
268- key : ${{ matrix.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
284+ key : ${{ matrix.os }}-${{ runner.arch }}-cargo-${{ steps.rust_version.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
269285
270286 - name : Build tests
271287 run : cargo test --no-run --profile ci
@@ -321,14 +337,18 @@ jobs:
321337 crate : cross
322338 git : https://github.com/cross-rs/cross
323339
340+ - name : Get rust_version
341+ id : rust_version
342+ run : echo "version=$(rustc -V)" >> $GITHUB_OUTPUT
343+
324344 - name : Cache cargo
325345 uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
326346 with :
327347 path : |
328348 target
329349 ~/.cargo/git
330350 ~/.cargo/registry
331- key : ${{ matrix.target }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
351+ key : ${{ matrix.target }}-${{ runner.arch }}-cargo-${{ steps.rust_version.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
332352
333353 - name : Run tests
334354 run : |
@@ -366,14 +386,18 @@ jobs:
366386 with :
367387 components : miri
368388
389+ - name : Get rust_version
390+ id : rust_version
391+ run : echo "version=$(rustc -V)" >> $GITHUB_OUTPUT
392+
369393 - name : Cache cargo
370394 uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
371395 with :
372396 path : |
373397 target
374398 ~/.cargo/git
375399 ~/.cargo/registry
376- key : ${{ runner.os }}-${{ runner.arch }}-cargo-miri-${{ hashFiles('**/Cargo.lock') }}
400+ key : ${{ runner.os }}-${{ runner.arch }}-cargo-miri-${{ steps.rust_version.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
377401
378402 - name : Setup miri
379403 run : cargo miri setup
@@ -406,14 +430,18 @@ jobs:
406430 with :
407431 toolchain : stable
408432
433+ - name : Get rust_version
434+ id : rust_version
435+ run : echo "version=$(rustc -V)" >> $GITHUB_OUTPUT
436+
409437 - name : Cache cargo
410438 uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
411439 with :
412440 path : |
413441 target
414442 ~/.cargo/git
415443 ~/.cargo/registry
416- key : ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
444+ key : ${{ runner.os }}-${{ runner.arch }}-cargo-${{ steps.rust_version.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
417445
418446 - name : Install cargo-fuzz
419447 run : cargo install cargo-fuzz
@@ -446,14 +474,18 @@ jobs:
446474 with :
447475 toolchain : stable
448476
477+ - name : Get rust_version
478+ id : rust_version
479+ run : echo "version=$(rustc -V)" >> $GITHUB_OUTPUT
480+
449481 - name : Cache cargo
450482 uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
451483 with :
452484 path : |
453485 target
454486 ~/.cargo/git
455487 ~/.cargo/registry
456- key : ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
488+ key : ${{ runner.os }}-${{ runner.arch }}-cargo-${{ steps.rust_version.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
457489
458490 - name : Install cargo-workspaces
459491 run : cargo install cargo-workspaces
@@ -490,14 +522,18 @@ jobs:
490522 with :
491523 persist-credentials : false
492524
525+ - name : Get rust_version
526+ id : rust_version
527+ run : echo "version=$(rustc -V)" >> $GITHUB_OUTPUT
528+
493529 - name : Cache cargo
494530 uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
495531 with :
496532 path : |
497533 ~/.cargo/registry
498534 ~/.cargo/git
499535 target
500- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
536+ key : ${{ runner.os }}-cargo-${{ steps.rust_version.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
501537
502538 - name : Check Semver
503539 uses : obi1kenobi/cargo-semver-checks-action@5b298c9520f7096a4683c0bd981a7ac5a7e249ae # v2
0 commit comments