mirror of
https://github.com/actions/cache.git
synced 2026-06-08 16:50:28 +08:00
Compare commits
2 Commits
dependabot
...
40fce78db6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40fce78db6 | ||
|
|
8645982dff |
2
.github/workflows/workflow.yml
vendored
2
.github/workflows/workflow.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
- name: Setup Node.js 24.x
|
- name: Setup Node.js 24.x
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 24.x
|
node-version: 24.x
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|||||||
21
examples.md
21
examples.md
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user