Skip to content

chore: add aarch64 linux runner #15077

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

Merged
merged 1 commit into from
Apr 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ jobs:
os: ubuntu-latest
rust: nightly
other: i686-unknown-linux-gnu
- name: Linux aarch64 stable
os: ubuntu-24.04-arm
rust: stable
other: TODO # cross-compile tests are disabled, this shouldn't matter.
- name: Linux aarch64 nightly
os: ubuntu-24.04-arm
rust: nightly
other: TODO # cross-compile tests are disabled, this shouldn't matter.
Comment on lines +136 to +140
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we say UNREACHABLE? ;)

- name: macOS aarch64 stable
os: macos-14
rust: stable
Expand Down Expand Up @@ -161,6 +169,7 @@ jobs:
- run: rustup update --no-self-update stable
- run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- run: rustup target add ${{ matrix.other }}
if: matrix.os != 'ubuntu-24.04-arm' # cross-compile tests are disabled on ARM machines
- run: rustup target add wasm32-unknown-unknown
- run: rustup target add aarch64-unknown-none # need this for build-std mock tests
if: startsWith(matrix.rust, 'nightly')
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/cargo-test-support/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-test-support"
version = "0.7.3"
version = "0.7.4"
edition.workspace = true
rust-version = "1.85" # MSRV:1
license.workspace = true
Expand Down
6 changes: 6 additions & 0 deletions crates/cargo-test-support/src/cross_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ pub fn disabled() -> bool {
_ => {}
}

// It requires setting `target.linker` for cross-compilation to work on aarch64,
// so not going to bother now.
if cfg!(all(target_arch = "aarch64", target_os = "linux")) {
return true;
}

// Cross tests are only tested to work on macos, linux, and MSVC windows.
if !(cfg!(target_os = "macos") || cfg!(target_os = "linux") || cfg!(target_env = "msvc")) {
return true;
Expand Down