Releases: Leafwing-Studios/cargo-cache
v2.5.0
What's Changed
- Fixed
Cargo.lock: command not found
error whenCargo.lock
is checked-in to Git by @LNSD in #35. - Updated the
cargo-sweep
action to v2.0.0 by @BD103 in #38.- The release notes can be found here.
- This fixes the common
Unable to locate executable file
error, with improvements in speed and size as well.
- Deprecated
save-always
by @BD103 in #40.- The underlying
save-always
input inactions/cache
has been deprecated. If you depend on this behavior, you will have to useactions/cache
directly with this workaround.
- The underlying
- Replaced input table with example YAML by @BD103 in #39.
Full Changelog: v2.4.0...v2.5.0
v2.4.0
This is a small release that lets users specify the path to Cargo.toml
, in case it is not in the root working directory. You do can this with the manifest-path
input:
- uses: Leafwing-Studios/cargo-cache@v2.4.0
with:
manifest-path: path/to/Cargo.toml
# You likely also want to specify the path to the `target` folder.
cargo-target-dir: path/to/target
What's Changed
Full Changelog: v2.3.0...v2.4.0
v2.3.0
This release adds an opt-in integration with cargo-sweep
that will automatically remove stale files in the target
folder before uploading it to the cache. This will prevent caches from slowly snowballing in size as new build artifacts are created and old ones remain.
- uses: Leafwing-Studios/cargo-cache@v2.3.0
with:
# Set this to enable `cargo-sweep`.
sweep-cache: true
# Any files within the `target` folder not accessed by this will be deleted before uploading the cache.
- run: cargo test
This uses a timestamp to track which files are not accessed between when cargo-cache
is initially run and when the cache is uploaded. If you run a cargo
command before running cargo-cache
, the artifacts it uses may be purged from the cache.
What's Changed
Full Changelog: v2.2.0...v2.3.0
v2.2.0
This release improves the generation of cache keys and their fallbacks, on one hand reducing the size of the caches and on the other hand avoiding stale caches.
What's Changed
- Do not fallback on caches from other cache groups by @BD103 in #23
- Add rustc version to cache key by @TimJentzsch in #26
New Contributors
Full Changelog: v2.1.0...v2.2.0
v2.1.0
What's Changed
- Add
save-if
option for conditional cache saving by @TimJentzsch in #21
Full Changelog: v2.0.1...v2.1.0
v2.0.1
v2.0.0
What's Changed
- Reset cache when workflow file changes by @benfrankel in #17
New Contributors
- @benfrankel made their first contribution in #17
Full Changelog: v1...v2.0.0
v1.2.0
v1.1.0
This release adds the Rust version as reported by cargo
to the cache key.
This fixes a bug where the dependencies kept being re-compiled after a new Rust version has been released.
Background
Because newer Rust versions often contain performance optimizations, updating your Rust version will re-compile the dependencies.
If the dependencies were cached with an older Rust version, this will render the cache almost useless.
Including the Rust version in the cache key will result in the cache being re-generated as you update your Rust version and afterwards you should get fast CI again.
v1.0.0
The first release!
cargo-cache
simplifies the caching of Cargo build files for Rust projects, reducing CI times significantly!