Skip to content
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

Fix aarch64 macos release builds #6504

Merged
merged 3 commits into from
Apr 3, 2023
Merged

Conversation

the-mikedavis
Copy link
Member

Fixes #6495

See the dry-run https://github.com/helix-editor/helix/actions/runs/4576449372

This could be solved instead by using rustup target add ${{ matrix.target }} but that would be papering over the problem: we do install stable-aarch64-apple-darwin but that's for the wrong Rust version. cargo looks to use 1.65 because of the rust-toolchain.toml file but dtolnay/rust-toolchain installs it for stable which is 1.68.2 currently.

The 'dtolnay/rust-toolchain' action ignores the rust-toolchain.toml
file, but the installed 'cargo' respects it. This can create a version
mismatch if the MSRV is different from the stable rust version. Any
additional targets installed by rustup like aarch64-darwin might not
be installed for the correct version. To fix this, we remove the
rust-toolchain.toml file before calling 'cargo'.
@the-mikedavis the-mikedavis added C-bug Category: This is a bug A-packaging Area: Packaging and bundling S-waiting-on-review Status: Awaiting review from a maintainer. labels Mar 31, 2023
This step without the '-p' works fine for regular releases but it can
fail if the CI is running when this file changes or on a branch
matching 'patch/ci-release-*'.
Comment on lines +117 to 125
# The rust-toolchain action ignores rust-toolchain.toml files.
# Removing this before building with cargo ensures that the rust-toolchain
# is considered the same between installation and usage.
- name: Remove the rust-toolchain.toml file
run: rm rust-toolchain.toml

- name: Install ${{ matrix.rust }} toolchain
uses: dtolnay/rust-toolchain@master
with:
Copy link
Member

Choose a reason for hiding this comment

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

we might want to force this to MSRV (1.65) instead of stable?

Copy link
Member Author

Choose a reason for hiding this comment

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

Since we control the runners doing the building here I think it's ok to use a newer Rust. We could definitely pin this at the MSRV though to reduce the chances that a future Rust would give compilation errors for code that is valid when compiled by the MSRV. What do you think @archseer?

Copy link
Member

Choose a reason for hiding this comment

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

Similar to ripgrep we want to build with the latest nightly to get as many optimizations as we can. The MSRV is just there for backwards compatibility

Copy link
Member

Choose a reason for hiding this comment

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

@archseer archseer added this to the 23.03.1 milestone Apr 1, 2023
@archseer archseer merged commit 38b9bdf into master Apr 3, 2023
@archseer archseer deleted the md-fix-release-aarch64-darwin branch April 3, 2023 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-packaging Area: Packaging and bundling C-bug Category: This is a bug S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing build (aarch64-macos) for 22.03 release
3 participants