Compare commits

...

4 Commits

Author SHA1 Message Date
Jason Orendorff
40fce78db6
Merge 8645982dff into 5656298164 2026-02-26 11:33:01 +00:00
Ryan Ghadimi
5656298164
Merge pull request #1722 from RyPeck/patch-1
Fix cache key in examples.md for bun.lock
2026-02-24 14:21:04 +00:00
Ryan Peck
4e380d19e1
Fix cache key in examples.md for bun.lock
Updated cache key to use 'bun.lock' instead of 'bun.lockb' for consistency.
2026-02-24 09:11:36 -05:00
Jason Orendorff
8645982dff rust-toolchain.toml and incremental build example
Changes to rust-toolchain.toml should invalidate the cache.
Also, add an example with incremental builds.
2023-06-12 11:14:05 -05:00

View File

@ -49,7 +49,7 @@
with:
path: |
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
```
### Windows
@ -59,7 +59,7 @@
with:
path: |
~\.bun
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
```
## C# - NuGet
@ -618,7 +618,26 @@ whenever possible:
~/.cargo/registry/cache/
~/.cargo/git/db/
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