From 1734e14b0b36c9e543b432eae0fd17976456a737 Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Sat, 8 Jun 2024 12:33:50 +0200 Subject: [PATCH 1/2] Switch default of `cache-on-failure` to true --- README.md | 8 +++++--- action.yml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 223ab23..5899df0 100644 --- a/README.md +++ b/README.md @@ -53,12 +53,14 @@ Afterward, the `components` and `target` specified via inputs are installed in a | `toolchain` | Rustup toolchain specifier e.g. `stable`, `nightly`, `1.42.0`. | stable | | `target` | Additional target support to install e.g. `wasm32-unknown-unknown` | | | `components` | Comma-separated string of additional components to install e.g. `clippy, rustfmt` | | -| `cache` | Automatically configure Rust cache (using `Swatinem/rust-cache`) | true | -| `cache-workspaces` | Propagates the value to `Swatinem/rust-cache` | | -| `cache-on-failure` | Propagates the value to `Swatinem/rust-cache` | | +| `cache` | Automatically configure Rust cache (using [`Swatinem/rust-cache`]) | true | +| `cache-workspaces` | Propagates the value to [`Swatinem/rust-cache`] | | +| `cache-on-failure` | Propagates the value to [`Swatinem/rust-cache`] | true | | `matcher` | Enable problem matcher to surface build messages and formatting issues | true | | `rustflags` | Set the value of `RUSTFLAGS` (set to empty string to avoid overwriting existing flags) | "-D warnings" | +[`Swatinem/rust-cache`]: https://github.com/Swatinem/rust-cache + ### RUSTFLAGS By default, this action sets the `RUSTFLAGS` environment variable to `-D warnings`. diff --git a/action.yml b/action.yml index f0ea3d2..fa6bd89 100644 --- a/action.yml +++ b/action.yml @@ -30,7 +30,7 @@ inputs: required: false cache-on-failure: description: "Also cache on workflow failures" - default: "false" + default: "true" required: false matcher: description: "Enable the Rust problem matcher" From 46dca5d12051bf38a65278fe635ccfc2d03c66b3 Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Sat, 8 Jun 2024 12:40:20 +0200 Subject: [PATCH 2/2] Add changelog entry --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a61be21..acd52af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.9.0] - 2024-06-08 + +* Add extra argument `cache-on-failure` and forward it to `Swatinem/rust-cache`. (#39 by @samuelhnrq) + Set the default the value to true. + This will result in more caching than previously. + This helps when large dependencies are compiled only for testing to fail. + ## [1.8.0] - 2024-01-13 * Allow specifying subdirectories for cache.