refactor: rename binaries to helios-remote-{client,relay,cli}
This commit is contained in:
parent
924be0540e
commit
835d20f734
5 changed files with 91 additions and 17 deletions
82
.github/workflows/ci.yml
vendored
82
.github/workflows/ci.yml
vendored
|
|
@ -47,7 +47,7 @@ jobs:
|
||||||
|
|
||||||
- name: Build Windows client (cross-compile)
|
- name: Build Windows client (cross-compile)
|
||||||
run: |
|
run: |
|
||||||
cargo build --release --package helios-client --target x86_64-pc-windows-gnu
|
cargo build --release --package helios-remote-client --target x86_64-pc-windows-gnu
|
||||||
env:
|
env:
|
||||||
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc
|
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc
|
||||||
|
|
||||||
|
|
@ -55,12 +55,12 @@ jobs:
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: helios-remote-client-windows
|
name: helios-remote-client-windows
|
||||||
path: target/x86_64-pc-windows-gnu/release/helios-client.exe
|
path: target/x86_64-pc-windows-gnu/release/helios-remote-client.exe
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Rename exe for release
|
- name: Rename exe for release
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
run: cp target/x86_64-pc-windows-gnu/release/helios-client.exe helios-remote-client-windows.exe
|
run: cp target/x86_64-pc-windows-gnu/release/helios-remote-client.exe helios-remote-client-windows.exe
|
||||||
|
|
||||||
- name: Publish rolling release (latest)
|
- name: Publish rolling release (latest)
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
|
|
@ -86,7 +86,7 @@ jobs:
|
||||||
scp -i ~/.ssh/deploy_key helios-remote-client-windows.exe \
|
scp -i ~/.ssh/deploy_key helios-remote-client-windows.exe \
|
||||||
root@46.225.185.232:/var/www/helios-remote/helios-remote-client-windows.exe
|
root@46.225.185.232:/var/www/helios-remote/helios-remote-client-windows.exe
|
||||||
|
|
||||||
deploy-server:
|
deploy-relay:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build-and-test
|
needs: build-and-test
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
|
|
@ -107,12 +107,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
key: linux-x86_64
|
key: linux-x86_64
|
||||||
|
|
||||||
- name: Build server (x86_64 Linux)
|
- name: Build relay (x86_64 Linux)
|
||||||
run: cargo build --release --package helios-server --target x86_64-unknown-linux-gnu
|
run: cargo build --release --package helios-remote-relay --target x86_64-unknown-linux-gnu
|
||||||
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: Deploy server to VPS
|
- name: Deploy relay to VPS
|
||||||
env:
|
env:
|
||||||
VPS_SSH_KEY: ${{ secrets.VPS_SSH_KEY }}
|
VPS_SSH_KEY: ${{ secrets.VPS_SSH_KEY }}
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -121,9 +121,69 @@ jobs:
|
||||||
chmod 600 ~/.ssh/deploy_key
|
chmod 600 ~/.ssh/deploy_key
|
||||||
ssh-keyscan -H 46.225.185.232 >> ~/.ssh/known_hosts
|
ssh-keyscan -H 46.225.185.232 >> ~/.ssh/known_hosts
|
||||||
scp -i ~/.ssh/deploy_key \
|
scp -i ~/.ssh/deploy_key \
|
||||||
target/x86_64-unknown-linux-gnu/release/helios-server \
|
target/x86_64-unknown-linux-gnu/release/helios-remote-relay \
|
||||||
root@46.225.185.232:/opt/helios-remote/target/release/helios-server-new
|
root@46.225.185.232:/opt/helios-remote/target/release/helios-remote-relay-new
|
||||||
ssh -i ~/.ssh/deploy_key root@46.225.185.232 \
|
ssh -i ~/.ssh/deploy_key root@46.225.185.232 \
|
||||||
"mv /opt/helios-remote/target/release/helios-server-new \
|
"mv /opt/helios-remote/target/release/helios-remote-relay-new \
|
||||||
/opt/helios-remote/target/release/helios-server && \
|
/opt/helios-remote/target/release/helios-remote-relay && \
|
||||||
systemctl restart helios-remote"
|
systemctl restart helios-remote"
|
||||||
|
|
||||||
|
build-cli:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Rust (stable) + targets
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
targets: x86_64-unknown-linux-gnu,x86_64-pc-windows-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
|
||||||
|
|
||||||
|
- name: Cache dependencies
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
key: cli
|
||||||
|
|
||||||
|
- name: Build CLI (Linux x86_64)
|
||||||
|
run: cargo build --release --package helios-remote-cli --target x86_64-unknown-linux-gnu
|
||||||
|
env:
|
||||||
|
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: x86_64-linux-gnu-gcc
|
||||||
|
|
||||||
|
- name: Build CLI (Windows x86_64)
|
||||||
|
run: cargo build --release --package helios-remote-cli --target x86_64-pc-windows-gnu
|
||||||
|
env:
|
||||||
|
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc
|
||||||
|
|
||||||
|
- name: Upload Linux CLI artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: helios-remote-cli-linux
|
||||||
|
path: target/x86_64-unknown-linux-gnu/release/helios-remote-cli
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload Windows CLI artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: helios-remote-cli-windows
|
||||||
|
path: target/x86_64-pc-windows-gnu/release/helios-remote-cli.exe
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Deploy CLI to VPS
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
env:
|
||||||
|
VPS_SSH_KEY: ${{ secrets.VPS_SSH_KEY }}
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo "$VPS_SSH_KEY" > ~/.ssh/deploy_key
|
||||||
|
chmod 600 ~/.ssh/deploy_key
|
||||||
|
ssh-keyscan -H 46.225.185.232 >> ~/.ssh/known_hosts
|
||||||
|
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/x86_64-pc-windows-gnu/release/helios-remote-cli.exe \
|
||||||
|
root@46.225.185.232:/var/www/helios-remote/helios-remote-cli-windows.exe
|
||||||
|
|
|
||||||
14
README.md
14
README.md
|
|
@ -83,6 +83,20 @@ HELIOS_API_KEY=your-secret-key HELIOS_BIND=0.0.0.0:3000 cargo run -p helios-serv
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Downloads
|
||||||
|
|
||||||
|
Pre-built binaries are available at:
|
||||||
|
|
||||||
|
| Binary | Platform | Link |
|
||||||
|
|---|---|---|
|
||||||
|
| `helios-remote-client` | Windows | [helios-remote-client-windows.exe](https://agent-helios.me/downloads/helios-remote/helios-remote-client-windows.exe) |
|
||||||
|
| `helios-remote-cli` | Linux | [helios-remote-cli-linux](https://agent-helios.me/downloads/helios-remote/helios-remote-cli-linux) |
|
||||||
|
| `helios-remote-cli` | Windows | [helios-remote-cli-windows.exe](https://agent-helios.me/downloads/helios-remote/helios-remote-cli-windows.exe) |
|
||||||
|
|
||||||
|
The relay server (`helios-remote-relay`) runs on the VPS and is not distributed.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT
|
MIT
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
[package]
|
[package]
|
||||||
name = "helios-cli"
|
name = "helios-remote-cli"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "remote"
|
name = "helios-remote-cli"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
[package]
|
[package]
|
||||||
name = "helios-client"
|
name = "helios-remote-client"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "helios-client"
|
name = "helios-remote-client"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
[package]
|
[package]
|
||||||
name = "helios-server"
|
name = "helios-remote-relay"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "helios-server"
|
name = "helios-remote-relay"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue