Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Cache cargo-msrv tool #8

Merged
merged 2 commits into from
May 17, 2024
Merged

chore: Cache cargo-msrv tool #8

merged 2 commits into from
May 17, 2024

Conversation

leoromanovsky
Copy link
Member

@leoromanovsky leoromanovsky commented May 16, 2024

observation

  • Running the Verify MSRV version tasks takes ~5 minutes.
  • pushes to a pull request branch runs the task twice (once for the PR and once for any push)

Logs: https://github.com/Eppo-exp/rust-sdk/actions/runs/9117036192/job/25067006061?pr=5

description

  • caches dependencies of cargo-msrv and the cargo-msrv binary
  • checks if cargo-msrv is already installed and uses it
  • runs the MSRV task once for a PR and separately on push to main

testing

@leoromanovsky leoromanovsky marked this pull request as ready for review May 16, 2024 18:23
@leoromanovsky leoromanovsky requested a review from rasendubi May 16, 2024 18:23
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we don't have a Cargo.lock (because it's a library), so this does not evaluate:
image

- run: |
if ! command -v cargo-msrv &> /dev/null
then
cargo install cargo-msrv --locked
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: same here. as we don't have a lock file, --locked doesn't do anything

@rasendubi rasendubi merged commit c402ef0 into main May 17, 2024
3 checks passed
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