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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove the rust-toolchain.toml file before building the release
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'.
  • Loading branch information
the-mikedavis committed Mar 31, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit c7e296b2c913f74b1f7077d8b1d899a5507812f9
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -114,6 +114,12 @@ jobs:
mkdir -p runtime/grammars/sources
tar xJf grammars/grammars.tar.xz -C runtime/grammars/sources

# 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:
Comment on lines +117 to 125
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.