mirror of
https://github.com/actions/cache.git
synced 2026-03-01 08:11:03 +08:00
Compare commits
4 Commits
ba6a6e6cf9
...
40fce78db6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40fce78db6 | ||
|
|
5656298164 | ||
|
|
4e380d19e1 | ||
|
|
8645982dff |
25
examples.md
25
examples.md
@ -49,7 +49,7 @@
|
|||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.bun/install/cache
|
~/.bun/install/cache
|
||||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
@ -59,7 +59,7 @@
|
|||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~\.bun
|
~\.bun
|
||||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||||
```
|
```
|
||||||
|
|
||||||
## C# - NuGet
|
## C# - NuGet
|
||||||
@ -618,7 +618,26 @@ whenever possible:
|
|||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}
|
||||||
|
```
|
||||||
|
|
||||||
|
Since Rust compile times are so long, you might want to take advantage of incremental builds. To do this, use the configuration below.
|
||||||
|
- Include the `run_id` in the key to force `actions/cache` to upload a new snapshot after every build.
|
||||||
|
- Use `restore-keys:` to load the previous build (when there are multiple partial matches, it selects the most recent).
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/bin/
|
||||||
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
|
~/.rustup/
|
||||||
|
target/
|
||||||
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}-${{ github.run_id }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-cargo-${{ hashFiles(**/'Cargo.lock', 'rust-toolchain.toml') }}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Scala - SBT
|
## Scala - SBT
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user