feat: build aarch64 CLI + CLI self-update on all platforms
This commit is contained in:
parent
e15834c179
commit
6224c9a1e0
2 changed files with 13 additions and 8 deletions
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue