9797
9898 - uses : dtolnay/rust-toolchain@stable
9999
100+ - name : Use a short Cargo home on Windows
101+ if : runner.os == 'Windows'
102+ shell : pwsh
103+ run : |
104+ "CARGO_HOME=$env:RUNNER_TEMP\c" >> $env:GITHUB_ENV
105+ git config --global core.longpaths true
106+
100107 - name : Restore cache
101108 uses : actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
102109 with :
@@ -105,6 +112,9 @@ jobs:
105112 ~/.cargo/registry/index/
106113 ~/.cargo/registry/cache/
107114 ~/.cargo/git/db/
115+ ${{ runner.temp }}/c/registry/index/
116+ ${{ runner.temp }}/c/registry/cache/
117+ ${{ runner.temp }}/c/git/db/
108118 target/
109119 key : ${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-
110120 restore-keys : |
@@ -338,6 +348,13 @@ jobs:
338348
339349 - uses : dtolnay/rust-toolchain@stable
340350
351+ - name : Use a short Cargo home on Windows
352+ if : runner.os == 'Windows'
353+ shell : pwsh
354+ run : |
355+ "CARGO_HOME=$env:RUNNER_TEMP\c" >> $env:GITHUB_ENV
356+ git config --global core.longpaths true
357+
341358 - name : Restore cache
342359 uses : actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
343360 with :
@@ -346,6 +363,9 @@ jobs:
346363 ~/.cargo/registry/index/
347364 ~/.cargo/registry/cache/
348365 ~/.cargo/git/db/
366+ ${{ runner.temp }}/c/registry/index/
367+ ${{ runner.temp }}/c/registry/cache/
368+ ${{ runner.temp }}/c/git/db/
349369 target/
350370 key : ${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-
351371 restore-keys : |
@@ -499,6 +519,13 @@ jobs:
499519 with :
500520 components : clippy
501521
522+ - name : Use a short Cargo home on Windows
523+ if : runner.os == 'Windows'
524+ shell : pwsh
525+ run : |
526+ "CARGO_HOME=$env:RUNNER_TEMP\c" >> $env:GITHUB_ENV
527+ git config --global core.longpaths true
528+
502529 - name : Restore cache
503530 uses : actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
504531 with :
@@ -507,6 +534,9 @@ jobs:
507534 ~/.cargo/registry/index/
508535 ~/.cargo/registry/cache/
509536 ~/.cargo/git/db/
537+ ${{ runner.temp }}/c/registry/index/
538+ ${{ runner.temp }}/c/registry/cache/
539+ ${{ runner.temp }}/c/git/db/
510540 target/
511541 key : ${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-
512542 restore-keys : |
0 commit comments