Skip to content

Commit 2080ac3

Browse files
committed
chore(ci): add aarch64 linux runner
Linux arm64 hosted runners is in public preview. Enable and see if is is something we can have now. setting `target.linker` is required for cross-compilation on ARM64, so disable cross compilation tests for it. https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/
1 parent 2a5f670 commit 2080ac3

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,14 @@ jobs:
130130
os: ubuntu-latest
131131
rust: nightly
132132
other: i686-unknown-linux-gnu
133+
- name: Linux aarch64 stable
134+
os: ubuntu-24.04-arm
135+
rust: stable
136+
other: TODO # cross-compile tests are disabled, this shouldn't matter.
137+
- name: Linux aarch64 nightly
138+
os: ubuntu-24.04-arm
139+
rust: nightly
140+
other: TODO # cross-compile tests are disabled, this shouldn't matter.
133141
- name: macOS aarch64 stable
134142
os: macos-14
135143
rust: stable
@@ -161,6 +169,7 @@ jobs:
161169
- run: rustup update --no-self-update stable
162170
- run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
163171
- run: rustup target add ${{ matrix.other }}
172+
if: matrix.os != 'ubuntu-24.04-arm' # cross-compile tests are disabled on ARM machines
164173
- run: rustup target add wasm32-unknown-unknown
165174
- run: rustup target add aarch64-unknown-none # need this for build-std mock tests
166175
if: startsWith(matrix.rust, 'nightly')

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/cargo-test-support/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cargo-test-support"
3-
version = "0.7.3"
3+
version = "0.7.4"
44
edition.workspace = true
55
rust-version = "1.85" # MSRV:1
66
license.workspace = true

crates/cargo-test-support/src/cross_compile.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ pub fn disabled() -> bool {
2727
_ => {}
2828
}
2929

30+
// It requires setting `target.linker` for cross-compilation to work on aarch64,
31+
// so not going to bother now.
32+
if cfg!(all(target_arch = "aarch64", target_os = "linux")) {
33+
return true;
34+
}
35+
3036
// Cross tests are only tested to work on macos, linux, and MSVC windows.
3137
if !(cfg!(target_os = "macos") || cfg!(target_os = "linux") || cfg!(target_env = "msvc")) {
3238
return true;

0 commit comments

Comments
 (0)