Skip to content

CI updates #83

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

Merged
merged 10 commits into from
Jun 9, 2023
Merged

CI updates #83

merged 10 commits into from
Jun 9, 2023

Conversation

str4d
Copy link
Contributor

@str4d str4d commented Jun 8, 2023

No description provided.

@str4d str4d force-pushed the ci-updates branch 2 times, most recently from ce57891 to 0acc77c Compare June 8, 2023 21:05
@str4d str4d marked this pull request as draft June 8, 2023 21:08
@str4d str4d force-pushed the ci-updates branch 2 times, most recently from 6a79fa4 to 6361e1b Compare June 8, 2023 21:16
Comment on lines +34 to +35
name: Clippy (beta)
runs-on: ubuntu-latest
continue-on-error: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm adding this like I do in other repos I maintain, because it's useful for checking whether there are Clippy lint changes coming down the pipeline that a future MSRV bump may encounter, without the noise of checking lints against nightly.

However, until #58 is closed, this step will silently fail, and the Clippy (MSRV) step will be checking lints against nightly. So this step won't be useful until then, but it also won't get in the way, so we can add it now in preparation.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like the auguwu/clippy-action action will add source-code annotations when run. Does this mean we'll get duplicate annotations?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For actions-rs/clippy-check this wasn't the case with continue-on-error: true AFAIR, but IDK about this action. At least from what I've seen in this PR itself, we weren't getting duplicates.

@str4d str4d force-pushed the ci-updates branch 2 times, most recently from 558bf73 to 09ef00f Compare June 8, 2023 21:53
@str4d
Copy link
Contributor Author

str4d commented Jun 9, 2023

The two remaining CI failures are:

  • Clippy lints about missing documentation, that will be resolved by docs: enhance documentation support and resolve clippy warnings #81.
  • Intra-doc link checking failure for tools due to it using stable and my having just added --cfg docsrs to CI (so that I can enable alloc for automated link resolving).
    • I will probably just change this lint to always use nightly, since that's what docs.rs does. EDIT: Done.

with:
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: ${{ inputs.target }}
args: --all-features --all-targets -- -D warnings
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm a little wary of "make all warnings errors" in CI tests. This means that any new warnings introduced in newer versions of Rust/Clippy will cause the CI pipeline to fail. While Rust/Clippy are pretty good about not having false positives in warnings, it still can be particularly annoying if your PR fails CI checks because of some existing code triggered the new lints.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This check is specifically against MSRV as pinned in rust-toolchain.toml. So the only time new warnings would appear is if your PR is changing that pinned toolchain, and then it's not unrelated to your PR. Once we get onto stable Rust, this will only occur in PRs that bump MSRV.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And per above, this isn't actually working yet due to upstream bugs. We can revisit this once they are actually enabled, and see if they are overly noisy or not.

Comment on lines +34 to +35
name: Clippy (beta)
runs-on: ubuntu-latest
continue-on-error: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like the auguwu/clippy-action action will add source-code annotations when run. Does this mean we'll get duplicate annotations?

str4d added 5 commits June 9, 2023 09:09
We now ensure that the `clippy` and `rustfmt` components are installed
for the `crates` MSRV via the `rust-toolchain.toml` file.
Includes an update to the `rustix` crate which works around this ICE:
rust-lang/rust#111462
str4d added 2 commits June 9, 2023 09:31
We instead can rely on `crates/rust-toolchain.toml` to pin the nightly
version we are using. This has two benefits:
- We are not exposed to random nightly breakage in CI.
- Once we move to stable Rust (#58), this will
  ensure we build and test against MSRV.
Also pins `actions/checkout` to a specific revision, so that all of
our CI action dependencies are pinned.
@str4d str4d marked this pull request as ready for review June 9, 2023 13:48
@str4d
Copy link
Contributor Author

str4d commented Jun 9, 2023

Okay, I've addressed all comments, and the only failing lint is missing documentation that will be added by #81.

@JarvisCraft
Copy link
Contributor

Could this PR be merged at its current state so that I can actualize #81 with the required fixes?

@str4d
Copy link
Contributor Author

str4d commented Jun 9, 2023

Yes, I think so.

@str4d str4d merged commit 8ab86f9 into main Jun 9, 2023
@str4d str4d deleted the ci-updates branch June 9, 2023 16:30
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.

3 participants