diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd8f473..5661813 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,10 +135,10 @@ jobs: - name: Install Rust (stable) + targets uses: dtolnay/rust-toolchain@stable 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 - 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 uses: Swatinem/rust-cache@v2 @@ -150,6 +150,11 @@ jobs: env: 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) run: cargo build --release --package helios-remote-cli --target x86_64-pc-windows-gnu env: @@ -181,6 +186,9 @@ jobs: scp -i ~/.ssh/deploy_key \ target/x86_64-unknown-linux-gnu/release/helios-remote-cli \ 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 \ 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 diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index 51f6361..5da1872 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -782,16 +782,13 @@ fn main() { // Self-update CLI if needed // (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 - #[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 { println!(" → Updating CLI..."); #[cfg(target_os = "windows")] 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 bytes = match reqwest::blocking::get(url) {