Add Linux ARM64 (aarch64-unknown-linux-gnu) release target

Add aarch64-unknown-linux-gnu as a third release platform using GitHub's
native ARM64 runner. Updates the release workflow matrix, install script
architecture detection, and CLI upgrade platform detection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-03-20 10:33:46 -04:00
parent 863ecf7c22
commit bbfea71bb9
No known key found for this signature in database
3 changed files with 9 additions and 3 deletions

View file

@ -25,6 +25,8 @@ jobs:
runner: macos-15
- target: x86_64-unknown-linux-gnu
runner: ubuntu-latest
- target: aarch64-unknown-linux-gnu
runner: ubuntu-22.04-arm
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:

View file

@ -53,12 +53,13 @@ case "$OS" in
;;
Linux)
case "$ARCH" in
x86_64) TARGET="x86_64-unknown-linux-gnu" ;;
*) error "Unsupported Linux architecture: $ARCH. Supported: x86_64" ;;
x86_64) TARGET="x86_64-unknown-linux-gnu" ;;
aarch64) TARGET="aarch64-unknown-linux-gnu" ;;
*) error "Unsupported Linux architecture: $ARCH. Supported: x86_64, aarch64" ;;
esac
;;
*)
error "Unsupported OS: $OS. Supported platforms: macOS (Apple Silicon), Linux (x86_64)"
error "Unsupported OS: $OS. Supported platforms: macOS (Apple Silicon), Linux (x86_64, aarch64)"
;;
esac

View file

@ -168,6 +168,7 @@ fn detect_target() -> Result<&'static str> {
match (std::env::consts::OS, std::env::consts::ARCH) {
("macos", "aarch64") => Ok("aarch64-apple-darwin"),
("linux", "x86_64") => Ok("x86_64-unknown-linux-gnu"),
("linux", "aarch64") => Ok("aarch64-unknown-linux-gnu"),
(os, arch) => bail!("unsupported platform: {os}/{arch}"),
}
}
@ -438,6 +439,8 @@ mod tests {
assert_eq!(result.unwrap(), "x86_64-unknown-linux-gnu");
} else if cfg!(target_os = "macos") && cfg!(target_arch = "aarch64") {
assert_eq!(result.unwrap(), "aarch64-apple-darwin");
} else if cfg!(target_os = "linux") && cfg!(target_arch = "aarch64") {
assert_eq!(result.unwrap(), "aarch64-unknown-linux-gnu");
}
// On other platforms it would return an error, which is fine
}