Skip to content

Conversation

MarijnS95
Copy link
Contributor

The actions-rs containers haven't been maintained and updated for years and don't need to: GitHub's actions environment already comes fully loaded with a complete stable Rust installation with the standard tools (clippy, rustfmt, rustdoc). Simple run: commands relate directly to what a developer can type in locally to "reproduce" the CI environment while they might be following up on CI failures, and no longer spam ancient Node 12 deprecation warnings. Whenever a different toolchain or additional targets are needed, https://github.com/dtolnay/rust-toolchain is used to install it instead.

The only downside is that actions-rs/clippy-check properly embeds build failures as code annotations in the diff; but as shown in e.g. https://github.com/Smithay/drm-rs/actions/runs/11632990715/job/32397210203 this doesn't even work for PRs from forks.

@MarijnS95 MarijnS95 force-pushed the rm-actions-rs branch 2 times, most recently from 46403e1 to 5d31218 Compare November 5, 2024 09:19
Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

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

Thanks, sorry for taking so long with this.

…eps`

The `actions-rs` containers haven't been maintained and updated for
years and don't need to: GitHub's actions environment already comes
fully loaded with a complete `stable` Rust installation with the
standard tools (clippy, rustfmt, rustdoc).  Simple `run:` commands
relate directly to what a developer can type in locally to "reproduce"
the CI environment while they might be following up on CI failures, and
no longer spam ancient Node 12 deprecation warnings.
Whenever a different toolchain or additional targets are needed,
https://github.com/dtolnay/rust-toolchain is used to install it instead.

The only downside is that `actions-rs/clippy-check` properly embeds
build failures as code annotations in the diff; but as shown in e.g.
https://github.com/Smithay/drm-rs/actions/runs/11632990715/job/32397210203
this doesn't even work for PRs from forks.
- name: Documentation
uses: actions-rs/cargo@v1
env:
DOCS_RS: 1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't seem to rely on https://docs.rs/about/builds#detecting-docsrs, maybe one of our dependencies does?

Comment on lines 72 to 75
- name: Update deps
uses: actions-rs/cargo@v1
with:
command: update
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what this was intended for: no Cargo.lock is checked in so a fresh checkout will inevitably regenerate a fresh lockfile on the latest version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I see. I remember from long ago that -Zminimal-versions on at least cargo check does nothing when a Cargo.lock is already available. Hence, by running this cargo update first we never perform a minimum-versions check. You can see this on the latest CI build of the develop branch where only latest versions (i.e. proc-macro2 v1.0.95) are used:

https://github.com/Smithay/drm-rs/actions/runs/16524679480/job/46734820812

On the CI in this PR, you can see it actually downgraded to proc-macro2 v1.0.55:

https://github.com/Smithay/drm-rs/actions/runs/16524859270/job/46735448393?pr=211

And then things fail, because the minimum versions are set "too loosely" 😁

Comment on lines -98 to +70
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all --all-features --all-targets -- -D warnings -A clippy::redundant_static_lifetimes
run: cargo clippy --all --all-features --all-targets -- -D warnings -A clippy::redundant_static_lifetimes
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We'll loose annotations here in favour of plain text-based cargo clippy output, but that wasn't/isn't working for PRs from forks anyway.

@Drakulix
Copy link
Member

Merged via #227

@Drakulix Drakulix closed this Jul 25, 2025
@MarijnS95 MarijnS95 deleted the rm-actions-rs branch July 25, 2025 17:07
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