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: Deny warnings in all CI jobs by default #1741

Open
briansmith opened this issue Oct 13, 2023 · 0 comments
Open

CI: Deny warnings in all CI jobs by default #1741

briansmith opened this issue Oct 13, 2023 · 0 comments

Comments

@briansmith
Copy link
Owner

Currently the clippy GitHub Actions job is the only thing that is run with --deny warnings. But, that only runs for the x86-64-unkown-linux-gnu target. Instead, every CI job should have --deny warnings.

The Rust toolchain doesn't make this super easy; see rust-lang/cargo#8424. Warnings that only occur in other configurations are not denied in CI.

Proposal:

  • Step 1: Change mk/clippy.sh: If $CI is NOT set, keep the default behavior. IF $CI is set as it is in GitHub Actions, ADD (don't replace) --deny warnings into $RUSTFLAGS. This will improve the situation
  • Step 2 (A separate PR, ideally): Create a mk/clippy.ps1 that is the Windows (non-MinGW) counterpart to mk/clippy.sh, change all the GitHub Actions workflows to use it, and add the same logic w.r.t. %CI% to it.

See actions/runner#374 for info on how Github Actions sets $CI. I think other environments do similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant