Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,11 @@ When dependencies are installed later in the workflow, we must specify the same
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
Comment on lines +457 to +459

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The content of these three directories is actually OS-independent, so it's possible to cache it under a separate key that does not depend on runner.os.

There are some caveats, though, with the current cache implementation; see also #325 for more elaborate examples.

target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
```

Expand Down