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

[WIP] chore: add aarch64 linux runner #15077

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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.
- 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'
- 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
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
Loading