Skip to content

Releases: Leafwing-Studios/cargo-cache

v2.5.0

31 Oct 18:12
a0709d8
Compare
Choose a tag to compare

What's Changed

  • Fixed Cargo.lock: command not found error when Cargo.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 in actions/cache has been deprecated. If you depend on this behavior, you will have to use actions/cache directly with this workaround.
  • Replaced input table with example YAML by @BD103 in #39.

Full Changelog: v2.4.0...v2.5.0

v2.4.0

10 Sep 13:28
5d5d363
Compare
Choose a tag to compare

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

  • Add CI checks by @BD103 in #29
  • Allow specifying the manifest path (Cargo.toml) by @BD103 in #33

Full Changelog: v2.3.0...v2.4.0

v2.3.0

25 Aug 15:04
d8d3ade
Compare
Choose a tag to compare

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

10 Aug 09:55
8763a8b
Compare
Choose a tag to compare

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

  • @BD103 made their first contribution in #23

Full Changelog: v2.1.0...v2.2.0

v2.1.0

20 Jul 21:04
6c2a159
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.1...v2.1.0

v2.0.1

20 Jul 21:02
80f9ec4
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.0...v2.0.1

v2.0.0

16 Jul 08:02
4deea66
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1...v2.0.0

v1.2.0

20 Feb 19:24
Compare
Choose a tag to compare

What's Changed

  • chore(deps): bump actions/cache dependency version to v4 by @LNSD in #15
  • feat: save cache on job failure by @LNSD in #16

New Contributors

  • @LNSD made their first contribution in #15

Full Changelog: v1.1.0...v1.2.0

v1.1.0

22 Jun 12:59
5edda26
Compare
Choose a tag to compare

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

19 Jan 20:14
e9e0c66
Compare
Choose a tag to compare

The first release!

cargo-cache simplifies the caching of Cargo build files for Rust projects, reducing CI times significantly!