Skip to content

Sync CI workflows with embedded-rust-template#15

Open
jerrysxie wants to merge 1 commit intoOpenDevicePartnership:mainfrom
jerrysxie:update-ci-workflows-from-template
Open

Sync CI workflows with embedded-rust-template#15
jerrysxie wants to merge 1 commit intoOpenDevicePartnership:mainfrom
jerrysxie:update-ci-workflows-from-template

Conversation

@jerrysxie
Copy link
Copy Markdown
Contributor

Summary

Syncs CI workflows with the latest embedded-rust-template.

Changes

check.yml

  • Merged separate \clippy\ and \hack\ jobs into unified \hack-clippy\ job with target matrix (\x86_64-unknown-linux-gnu, \ humbv8m.main-none-eabihf)
  • Added stricter clippy lint groups: -D clippy::suspicious -D clippy::correctness -D clippy::perf -D clippy::style\
  • Added --locked\ flag to \deny, \ est, and \msrv\ jobs
  • Added \cargo clippy --tests\ step to \ est\ job
  • Added new \machete\ job to detect unused dependencies in Cargo.toml files

nostd.yml

  • Added --locked\ flag to \cargo check\

Unchanged

  • \cargo-vet.yml\ — already up to date
  • \cargo-vet-pr-comment.yml\ — already up to date
  • MSRV kept at \1.90\ (repo-specific, higher than template's \1.85)

- Merge separate clippy and hack jobs into unified hack-clippy job with
  target matrix (x86_64-unknown-linux-gnu, thumbv8m.main-none-eabihf)
- Add stricter clippy lint groups: suspicious, correctness, perf, style
- Add --locked flag to cargo check, test, deny, and msrv jobs
- Add cargo clippy --tests step to test job
- Add new machete job to detect unused dependencies
- Add --locked to nostd workflow cargo check

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 27, 2026 16:04
@jerrysxie jerrysxie requested a review from a team as a code owner March 27, 2026 16:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Synchronizes this repository’s GitHub Actions CI workflows with the latest embedded-rust-template, tightening linting and improving dependency/toolchain determinism.

Changes:

  • Consolidates clippy + feature-powerset checks into a single hack-clippy matrix job (toolchain + target).
  • Adds --locked to multiple Cargo invocations for more reproducible CI.
  • Introduces a machete job to detect unused Cargo dependencies.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/check.yml Unifies hack+clippy, tightens clippy lint groups, adds --locked in more jobs, and adds cargo-machete job.
.github/workflows/nostd.yml Adds --locked to the no-std cargo check invocation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

components: clippy
- name: cargo install cargo-hack
uses: taiki-e/install-action@cargo-hack
# intentionally no target specifier; see https://github.com/jonhoo/rust-ci-conf/pull/4
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The comment about having “intentionally no target specifier” is now inaccurate since the command includes --target ${{ matrix.target }}. Please update or remove the comment/link so it matches the current invocation.

Suggested change
# intentionally no target specifier; see https://github.com/jonhoo/rust-ci-conf/pull/4
# Run clippy over all feature combinations for each target in the matrix.

Copilot uses AI. Check for mistakes.
Comment on lines +88 to +93
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
components: clippy
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

In hack-clippy, the action ref is dtolnay/rust-toolchain@stable while the job installs a matrix toolchain (stable/beta). For consistency with the msrv job (which uses @master when toolchain: is variable) and to avoid any ambiguity about what ref is expected to support, consider using the same ref pattern here.

Copilot uses AI. Check for mistakes.
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