-
Notifications
You must be signed in to change notification settings - Fork 57
CI: Replace deprecated/unmaintained actions-rs
with simple run: steps
#211
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
Conversation
46403e1
to
5d31218
Compare
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.
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 |
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.
We don't seem to rely on https://docs.rs/about/builds#detecting-docsrs, maybe one of our dependencies does?
- name: Update deps | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: update |
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.
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.
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.
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" 😁
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 |
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.
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.
Merged via #227 |
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 completestable
Rust installation with the standard tools (clippy, rustfmt, rustdoc). Simplerun:
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.