-
Notifications
You must be signed in to change notification settings - Fork 11
Add cargo check on CI #349
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
base: main
Are you sure you want to change the base?
Add cargo check on CI #349
Conversation
seems like we don't have a easy substitution, so i will just mark as allow and will fix it in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks like a good change as a whole.
.github/workflows/build-and-test.yml
Outdated
@@ -18,6 +18,8 @@ jobs: | |||
uses: actions/checkout@v4 | |||
- name: Install Rust formatter | |||
run: rustup component add rustfmt | |||
- name: Run cargo check | |||
run: cargo check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be --workspace
, and eventually fail (and not just show, nobody reads CI logs) if something is spotted.
Currently, wouldn't go through due to lakers-c apparently being embedded-only, but that should be fixable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
… and maybe with a second --all-features pass, but that too currently fails :-/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @chrysn , thanks for the feedback!
I’ve added RUSTFLAGS=-Dwarnings
to the CI so that any warnings will now cause the build to fail.
I also added the --all-features
flag to the check. The main change is in how the Crypto
type is selected. Previously, the features "psa", "rustcrypto", and "cryptocell310" were mutually exclusive. I’ve switched to using cfg_if!
to make them additive instead — though this introduces an implicit priority order. Let me know if the project prefers to keep them mutually exclusive instead.
I plan to add --workspace
in the future, but for now I’m holding off as I’m not yet confident making changes to that part.
Thanks for this PR, improving warnings and cleaning the codebase is very welcome. I just saw emails that some of my github tokens expired. I just updated them. I hope the CI will be ok! (I am in the middle of some weeks of mission abroad / PTO, doing some catch up now!) |
This PR introduces
cargo check
.My plan is to gradually increase the coverage over multiple PRs and eventually add Clippy. Through these changes, I'm also familiarizing myself with the codebase.
_
on unused vars and remove unnecessarymut
s