Skip to content

fix rust-cache with proper key and global RUSTFLAG#764

Merged
swanandx merged 14 commits intomainfrom
workflow-cache-fix
Dec 8, 2023
Merged

fix rust-cache with proper key and global RUSTFLAG#764
swanandx merged 14 commits intomainfrom
workflow-cache-fix

Conversation

@swanandx
Copy link
Contributor

@swanandx swanandx commented Dec 7, 2023

CI isn't caching properly. let's say a PR is opened, job runs and saves cache with key "-c4efedb3", now if I push a commit ( editing changelog ), it has restore key of "-fda4c98d.." so it never finds the cache which it should have!

Basically, we are never seeing an cache hit.

This solves two things:

  • use keys with runner.os ( for cache hits )
  • set `RUSTFLAG: -D warnings" globally instead of just clippy ( otherwise the cache is invalidated and project is rebuilt every time! )

Type of change

  • Miscellaneous (related to maintenance)

Checklist:

  • Formatted with cargo fmt
  • Make an entry to CHANGELOG.md if it's relevant to the users of the library. If it's not relevant mention why.

@swanandx swanandx changed the title use github actions cache instead of rust-cache with proper key fix rust-cache with proper key and global RUSTFLAG Dec 7, 2023
@swanandx swanandx merged commit 99b2142 into main Dec 8, 2023
@swanandx swanandx deleted the workflow-cache-fix branch December 8, 2023 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants