Skip to content

Commit 18db5ef

Browse files
Fix cache concurrency issue
Using the same cache key across multiple jobs can cause issues if we make assumption about it's content (like installing tools if not hit on the cache).
1 parent d675c07 commit 18db5ef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ jobs:
2626
~/.cargo/registry/index/
2727
~/.cargo/registry/cache/
2828
~/.cargo/git/db/
29+
~/.rustup/toolchains/
2930
target/
30-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }}
31+
key: ${{ runner.os }}-cargo-compile-v1-${{ matrix.libfuse }}-${{ matrix.features }}-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }}
3132

3233
- name: Install packages
3334
run: |
@@ -60,8 +61,9 @@ jobs:
6061
~/.cargo/registry/index/
6162
~/.cargo/registry/cache/
6263
~/.cargo/git/db/
64+
~/.rustup/toolchains/
6365
target/
64-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }}
66+
key: ${{ runner.os }}-cargo-ci-v1-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }}
6567

6668
- name: Install packages
6769
run: |

0 commit comments

Comments
 (0)