feat: build aarch64 CLI + CLI self-update on all platforms

This commit is contained in:
Helios Agent 2026-03-06 15:06:20 +01:00
parent e15834c179
commit 6224c9a1e0
No known key found for this signature in database
GPG key ID: C8259547CD8309B5
2 changed files with 13 additions and 8 deletions

View file

@ -135,10 +135,10 @@ jobs:
- name: Install Rust (stable) + targets - name: Install Rust (stable) + targets
uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
with: with:
targets: x86_64-unknown-linux-gnu,x86_64-pc-windows-gnu targets: x86_64-unknown-linux-gnu,x86_64-pc-windows-gnu,aarch64-unknown-linux-gnu
- name: Install cross-compilers - name: Install cross-compilers
run: sudo apt-get update && sudo apt-get install -y gcc-x86-64-linux-gnu gcc-mingw-w64-x86-64 mingw-w64-tools run: sudo apt-get update && sudo apt-get install -y gcc-x86-64-linux-gnu gcc-mingw-w64-x86-64 mingw-w64-tools gcc-aarch64-linux-gnu
- name: Cache dependencies - name: Cache dependencies
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
@ -150,6 +150,11 @@ jobs:
env: env:
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: x86_64-linux-gnu-gcc CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: x86_64-linux-gnu-gcc
- name: Build CLI (Linux aarch64)
run: cargo build --release --package helios-remote-cli --target aarch64-unknown-linux-gnu
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
- name: Build CLI (Windows x86_64) - name: Build CLI (Windows x86_64)
run: cargo build --release --package helios-remote-cli --target x86_64-pc-windows-gnu run: cargo build --release --package helios-remote-cli --target x86_64-pc-windows-gnu
env: env:
@ -181,6 +186,9 @@ jobs:
scp -i ~/.ssh/deploy_key \ scp -i ~/.ssh/deploy_key \
target/x86_64-unknown-linux-gnu/release/helios-remote-cli \ target/x86_64-unknown-linux-gnu/release/helios-remote-cli \
root@46.225.185.232:/var/www/helios-remote/helios-remote-cli-linux root@46.225.185.232:/var/www/helios-remote/helios-remote-cli-linux
scp -i ~/.ssh/deploy_key \
target/aarch64-unknown-linux-gnu/release/helios-remote-cli \
root@46.225.185.232:/var/www/helios-remote/helios-remote-cli-linux-aarch64
scp -i ~/.ssh/deploy_key \ scp -i ~/.ssh/deploy_key \
target/x86_64-pc-windows-gnu/release/helios-remote-cli.exe \ target/x86_64-pc-windows-gnu/release/helios-remote-cli.exe \
root@46.225.185.232:/var/www/helios-remote/helios-remote-cli-windows.exe root@46.225.185.232:/var/www/helios-remote/helios-remote-cli-windows.exe

View file

@ -782,16 +782,13 @@ fn main() {
// Self-update CLI if needed // Self-update CLI if needed
// (relay_commit is the "canonical" latest — if we differ from it, we're outdated) // (relay_commit is the "canonical" latest — if we differ from it, we're outdated)
// Skip on non-x86_64 Linux (e.g. ARM/Pi) — CI only builds x86_64 Linux binaries // Skip on non-x86_64 Linux (e.g. ARM/Pi) — CI only builds x86_64 Linux binaries
#[cfg(all(not(target_os = "windows"), not(target_arch = "x86_64")))]
if cli_commit != relay_commit {
println!(" → Skipping CLI update (non-x86_64, update manually)");
}
#[cfg(any(target_os = "windows", target_arch = "x86_64"))]
if cli_commit != relay_commit { if cli_commit != relay_commit {
println!(" → Updating CLI..."); println!(" → Updating CLI...");
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
let url = "https://agent-helios.me/downloads/helios-remote/helios-remote-cli-windows.exe"; let url = "https://agent-helios.me/downloads/helios-remote/helios-remote-cli-windows.exe";
#[cfg(not(target_os = "windows"))] #[cfg(all(not(target_os = "windows"), target_arch = "aarch64"))]
let url = "https://agent-helios.me/downloads/helios-remote/helios-remote-cli-linux-aarch64";
#[cfg(all(not(target_os = "windows"), not(target_arch = "aarch64")))]
let url = "https://agent-helios.me/downloads/helios-remote/helios-remote-cli-linux"; let url = "https://agent-helios.me/downloads/helios-remote/helios-remote-cli-linux";
let bytes = match reqwest::blocking::get(url) { let bytes = match reqwest::blocking::get(url) {