mirror of
https://github.com/moonrepo/setup-rust.git
synced 2025-04-29 21:40:01 +00:00
new: Add cache-target input.
This commit is contained in:
parent
cef1bc3f53
commit
28b46eda6c
5 changed files with 26 additions and 9 deletions
|
@ -79,12 +79,14 @@ names.
|
|||
## Caching in CI
|
||||
|
||||
By default this action will cache the `~/.cargo/registry` and `/target/debug` directories to improve
|
||||
CI times. To disable caching, set the `cache` input to `false`.
|
||||
CI times. To disable caching, set the `cache` input to `false`. Furthermore, the target profile can
|
||||
be changed with the `cache-target` input, which defaults to `debug`.
|
||||
|
||||
```yaml
|
||||
- uses: moonrepo/setup-rust@v0
|
||||
with:
|
||||
cache: false
|
||||
cache-target: release
|
||||
```
|
||||
|
||||
The following optimizations and considerations are taken into account when caching:
|
||||
|
@ -98,7 +100,7 @@ The following optimizations and considerations are taken into account when cachi
|
|||
`.cache`, and any other unnecessary files.
|
||||
- `/target`
|
||||
- Only the `/debug` profile is cached, as this profile is typically used for formatting, linting,
|
||||
and testing.
|
||||
and testing. This can be changed with the `cache-target` input.
|
||||
- The `/examples` and `/incremental` sub-directories are not cached as they are not necessary for
|
||||
CI.
|
||||
- All dep-info (`*.d`) files are removed, as they're meant for build systems and signaling
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue