Skip to content

Commit 339f97a

Browse files
domenkozarmistydemeo
authored andcommitted
use GitHub ARM-specific runners for aarch64 Linux targets by default
GitHub now provides Linux ARM64 hosted runners for free in public repositories. This change updates the default runner for aarch64-unknown-linux-gnu targets to use ubuntu-22.04-arm instead of the x86_64 runner. See: https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/
1 parent 00d5f5b commit 339f97a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

cargo-dist/src/backend/ci/github.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,14 @@ fn github_runner_for_target(
671671
// where random system dependencies can creep in and be very
672672
// recent. This helps with portability!
673673
let result = Some(match target_triple.operating_system {
674-
OperatingSystem::Linux => runner_to_config(GithubRunnerRef::from_str("ubuntu-22.04")),
674+
OperatingSystem::Linux => {
675+
// Use ARM-specific runner for aarch64 Linux targets
676+
if matches!(target_triple.architecture, Architecture::Aarch64(_)) {
677+
runner_to_config(GithubRunnerRef::from_str("ubuntu-22.04-arm"))
678+
} else {
679+
runner_to_config(GithubRunnerRef::from_str("ubuntu-22.04"))
680+
}
681+
}
675682
OperatingSystem::Darwin(_) => runner_to_config(GithubRunnerRef::from_str("macos-13")),
676683
OperatingSystem::Windows => {
677684
// Default to cargo-xwin for Windows cross-compiles

cargo-dist/tests/snapshots/axolotlsay_cross1.snap

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

0 commit comments

Comments
 (0)