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

ci: always run cargo with --locked #3547

Closed
mxinden opened this issue Mar 3, 2023 · 3 comments · Fixed by #3587
Closed

ci: always run cargo with --locked #3547

mxinden opened this issue Mar 3, 2023 · 3 comments · Fixed by #3587

Comments

@mxinden
Copy link
Member

mxinden commented Mar 3, 2023

Summary

Since #3399 we are tracking the Cargo.lock file via version control. Currently CI does not fail when the checked in Cargo.lock is not up-to-date.

Possible Solution

Replace all cargo XXX with cargo --locked XXX.

Can you think of a simpler solution @thomaseizinger?

Would you like to work on fixing this bug?

Yes

@thomaseizinger
Copy link
Contributor

Good idea!

Maybe there is an env variable we can set?

mxinden added a commit to mxinden/rust-libp2p that referenced this issue Mar 7, 2023
> Since libp2p#3399 we are tracking the `Cargo.lock` file via
version control. Currently CI does not fail when the checked in `Cargo.lock` is not up-to-date.

libp2p#3547
@mxinden
Copy link
Member Author

mxinden commented Mar 7, 2023

#3562 does the change as a flag. I could not figure out how to do the same with an environment variable. @thomaseizinger let me know if this works for you.

@mxinden
Copy link
Member Author

mxinden commented Mar 10, 2023

Closing here in favor of #3587

@mxinden mxinden closed this as completed Mar 10, 2023
mergify bot pushed a commit that referenced this issue Mar 10, 2023
Instead of running with `--locked` which would require us to pick a CI job that does this, we can add a dedicated job that only has as its responsibility to ensure that `Cargo.lock` is up-to-date.

Fixes #3547.

Pull-Request: #3587.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants