Skip to content

Conversation

@graelo
Copy link
Contributor

@graelo graelo commented Nov 24, 2025

Hi, thanks a lot for this project!

I use it in my own CI I like the fact you release pre-built binaries, however I was missing some platforms. So here's a PR to modernize the workflows and add 2 platforms. I hope you'll like it!

Note: I think this PR is worth looking at commit by commit, at least at first.

Changes

Release artifacts

  • Added aarch64-apple-darwin (macOS ARM64) and aarch64-unknown-linux-musl (Linux ARM64) release binaries
  • Updated runners: macos-15-intel for Intel Macs, macos-latest for ARM64, ubuntu-24.04-arm for Linux ARM64

CI improvements

  • Refactored test matrix from {cartesian product + excludes} to explicit include list, making it easier to add new platforms
  • Added ARM64 testing for macOS (aarch64-apple-darwin) and Linux (aarch64-unknown-linux-gnu)
  • Fixed Windows MinGW setup by replacing deprecated egor-tensin/setup-mingw@v2 with msys2/setup-msys2@v2

Workflow modernization

  • Replaced deprecated set-output commands with $GITHUB_OUTPUT
  • Bumped actions/checkout to v4 and Swatinem/rust-cache to v2
  • Migrated from actions-rs/toolchain (unmaintained) to dtolnay/rust-toolchain across all workflows
  • Related: added rust-toolchain.toml removal in CI workflows to ensure matrix toolchain selection is respected
    • was implemented with override in actions-rs/toolchain, needs this removal with the standard dtolnay/rust-toolchain
    • a simple trick was needed in the lint.yml workflow around just because it requires nightly even when testing stable targets in the matrix

Testing

Release workflow

Tested the release workflow with the additional targets: check the Release v0.18.0-test created for demo purposes in my fork, on the branch ci/macos-arm64. It contains the targets I mentioned above.

image

CI workflows

Tested the CI workflows on my fork with one additional commit branch on branch ci/macos-arm64-exercise - all builds and tests succeeded.

image image image

@graelo
Copy link
Contributor Author

graelo commented Nov 25, 2025

In retrospect, I should have used actions/checkout@v5 instead of v4, but I think bumping this would require me retrigger all the CI jobs to prove it works. If you don't mind, I'd rather keep it as is unless you ask for it.

Cheers

Copy link
Collaborator

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! A few further ideas:

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, ubuntu-24.04-arm, macos-15-intel, macos-latest]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we're now building both arm & intel for unix binaries, let's add the same for windows binaries too please. (i.e. windows-11-arm image)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! 👍

Comment on lines 55 to 60
- name: Clippy
if: ${{ matrix.rust == 'stable' }}
run: just lint
# Need to re-add rustfmt clippy in the nightly toolchain for "just"
run: |
rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt clippy
just lint
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks like it's not working as intended; the clippy job has a matrix.rust == 'stable' guard, nightly toolchain should not be relevant here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, the nightly toolchain addition was a workaround because just lint calls fmt-check first, which requires cargo +nightly fmt. 🤷‍♂️

Fixed by running clippy commands directly instead of just lint, since formatting is already checked in the nightly matrix job. This removes the confusing nightly dependency from the stable clippy job. Does it make sense?

- os: windows-latest
target: x86_64-unknown-linux-gnu
- os: macos-latest
rust: beta
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's simplify by removing all beta builds except for beta on ubuntu.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done - removed beta builds from Windows and macOS, keeping beta only on Linux (both x86_64 and arm64). This reduces the CI matrix from 12 to 8 jobs.

Platform Jobs
Windows (msvc + gnu) 2 (stable only)
macOS (x86_64 + arm64) 2 (stable only)
Linux (x86_64 + arm64) 4 (stable + beta)

@graelo
Copy link
Contributor Author

graelo commented Nov 26, 2025

Hi David, thanks for the comments!

Agree on everything, and replied above. Here are the workflow runs after the updates:

From branch ci/macos-arm64 (the one for this PR):

From branch ci/macos-arm64-exercise (the additional commit to trigger ci, ci-pr and lint):

  • the ci workflow: link
  • the ci-pr workflow: link
  • the lint workflow: link

Btw, I also went ahead and updated actions/cache to v5.

Copy link
Collaborator

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks, let's give this a whirl and assuming CI passes, will merge 👍

@davidhewitt davidhewitt merged commit c9977da into kbknapp:master Nov 26, 2025
13 checks passed
@graelo graelo deleted the ci/macos-arm64 branch November 30, 2025 21:33
@graelo
Copy link
Contributor Author

graelo commented Dec 6, 2025

Hello @davidhewitt,I hope you're doing good. Is there any chance that you use the new CI to release a new set of artifacts? I'd love to update my CI and fetch the new artifacts.

In other words, is there a patch release around the corner? ;) It would be just convenience for me, so no pressure.

Again, thanks!

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