mirror of
https://github.com/moonrepo/setup-rust.git
synced 2025-04-29 21:40:01 +00:00
Update docs.
This commit is contained in:
parent
c8e2a54937
commit
b46ed9f588
3 changed files with 19 additions and 13 deletions
24
README.md
24
README.md
|
@ -86,16 +86,22 @@ CI times. To disable caching, set the `cache` input to `false`.
|
||||||
|
|
||||||
The following optimizations and considerations are taken into account when caching:
|
The following optimizations and considerations are taken into account when caching:
|
||||||
|
|
||||||
- The `~/.cargo/bin` directory is not cached as we manage binary installation in this action via the
|
- `~/.cargo`
|
||||||
|
- The `/bin` directory is not cached as we manage binary installation in this action via the
|
||||||
`bins` input.
|
`bins` input.
|
||||||
- The `~/.cargo/git` directory is not cached as it's not necessary for CI. When required by Cargo or
|
- The `/git` directory is not cached as it's not necessary for CI. When required by Cargo or a
|
||||||
a crate, a checkout will be performed on-demand.
|
crate, a checkout will be performed on-demand.
|
||||||
- The `~/.cargo/registry` directory is _cleaned_ before saving the cache. This includes removing
|
- The `/registry` directory is _cleaned_ before saving the cache. This includes removing `src`,
|
||||||
`src`, `.cache`, and any other unnecessary files.
|
`.cache`, and any other unnecessary files.
|
||||||
- Only the `/target/debug` profile is cached, as this profile is typically used for formatting,
|
- `/target/debug`
|
||||||
linting, and testing.
|
- Only the `debug` profile is cached, as this profile is typically used for formatting, linting,
|
||||||
- The following sources are hashed for the generated cache key: `$GITHUB_JOB`, `Cargo.lock`, Rust
|
and testing.
|
||||||
version, Rust commit hash, and operating system.
|
- The `/examples` and `/incremental` 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
|
||||||
|
re-executions.
|
||||||
|
|
||||||
|
The following sources are hashed for the generated cache key: `$GITHUB_JOB`, `Cargo.lock`, Rust
|
||||||
|
version, Rust commit hash, and OS.
|
||||||
|
|
||||||
## Compared to
|
## Compared to
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@moonrepo/setup-rust",
|
"name": "@moonrepo/setup-rust",
|
||||||
"version": "0.3.6",
|
"version": "0.4.0",
|
||||||
"description": "A GitHub action for setting up Rust and Cargo.",
|
"description": "A GitHub action for setting up Rust and Cargo.",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -166,8 +166,8 @@ export async function cleanTargetProfile() {
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
// target/debug/**/*.d - Dep info files for build systems, not required in CI
|
// target/debug/**/*.d - Not required in CI?
|
||||||
core.info('Removing depinfo files (*.d)');
|
core.info('Removing dep-info files (*.d)');
|
||||||
|
|
||||||
const globber = await glob.create(path.join(targetDir, '**/*.d'));
|
const globber = await glob.create(path.join(targetDir, '**/*.d'));
|
||||||
const files = await globber.glob();
|
const files = await globber.glob();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue