forked from herocode/horus
Compare commits
8 Commits
09c4444db5
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 5957c05501 | |||
| 240fa060ed | |||
| f19385f614 | |||
| 375beb8fff | |||
| 2b98e32a2a | |||
| 2814558204 | |||
| c7bf99a495 | |||
| 192972aba8 |
@@ -46,20 +46,49 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-build-target-
|
||||
|
||||
- name: Check code
|
||||
run: cargo check --workspace --verbose
|
||||
# 👇 Don't fail CI on hero-runner's warnings
|
||||
- name: Check code (all crates under bin/)
|
||||
env:
|
||||
RUSTFLAGS: "--cap-lints=warn"
|
||||
run: |
|
||||
set -euo pipefail
|
||||
find bin -name Cargo.toml -print0 | while IFS= read -r -d '' manifest; do
|
||||
echo "=== cargo check --manifest-path $manifest ==="
|
||||
cargo check --manifest-path "$manifest" --verbose
|
||||
done
|
||||
|
||||
- name: Run tests
|
||||
run: cargo test --workspace --verbose
|
||||
# 👇 Same trick for tests, otherwise they’d fail for the same reason
|
||||
- name: Run tests (all crates under bin/)
|
||||
env:
|
||||
RUSTFLAGS: "--cap-lints=warn"
|
||||
run: |
|
||||
set -euo pipefail
|
||||
find bin -name Cargo.toml -print0 | while IFS= read -r -d '' manifest; do
|
||||
echo "=== cargo test --manifest-path $manifest ==="
|
||||
cargo test --manifest-path "$manifest" --verbose
|
||||
done
|
||||
|
||||
- name: Run clippy
|
||||
run: cargo clippy --workspace -- -D warnings
|
||||
# Clippy stays strict (still uses -D warnings for clippy lints).
|
||||
# If this later fails because of hero-runner, we can also add RUSTFLAGS here.
|
||||
- name: Run clippy (all crates under bin/)
|
||||
run: |
|
||||
set -euo pipefail
|
||||
find bin -name Cargo.toml -print0 | while IFS= read -r -d '' manifest; do
|
||||
echo "=== cargo clippy --manifest-path $manifest ==="
|
||||
cargo clippy --manifest-path "$manifest" -- -D warnings
|
||||
done
|
||||
|
||||
- name: Check formatting
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
- name: Build release binaries
|
||||
run: cargo build --workspace --release --verbose
|
||||
# Build was already succeeding; leaving it without cap-lints is fine.
|
||||
- name: Build release binaries (all crates under bin/)
|
||||
run: |
|
||||
set -euo pipefail
|
||||
find bin -name Cargo.toml -print0 | while IFS= read -r -d '' manifest; do
|
||||
echo "=== cargo build --manifest-path $manifest --release ==="
|
||||
cargo build --manifest-path "$manifest" --release --verbose
|
||||
done
|
||||
|
||||
- name: List built binaries
|
||||
run: |
|
||||
@@ -79,4 +108,4 @@ jobs:
|
||||
target/release/runner_osiris
|
||||
target/release/runner_sal
|
||||
retention-days: 7
|
||||
if-no-files-found: warn
|
||||
if-no-files-found: warn
|
||||
@@ -7,94 +7,109 @@ on:
|
||||
|
||||
jobs:
|
||||
build-release:
|
||||
name: Build Release Binaries
|
||||
name: Build Release Binaries via hero-git installer
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
env:
|
||||
IMAGE_NAME: hero-git:latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Rust toolchain
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
|
||||
- name: Extract version from tag
|
||||
id: version
|
||||
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build release binaries
|
||||
run: cargo build --workspace --release --verbose
|
||||
|
||||
- name: Strip binaries
|
||||
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Ensure hero-git image exists
|
||||
run: |
|
||||
strip target/release/supervisor || true
|
||||
strip target/release/coordinator || true
|
||||
strip target/release/horus || true
|
||||
strip target/release/osiris || true
|
||||
strip target/release/herorunner || true
|
||||
strip target/release/runner_osiris || true
|
||||
strip target/release/runner_sal || true
|
||||
|
||||
if ! docker image inspect "$IMAGE_NAME" >/dev/null 2>&1; then
|
||||
echo "ERROR: Docker image '$IMAGE_NAME' not found on runner."
|
||||
echo "Build it manually on the runner with:"
|
||||
echo " docker build -t $IMAGE_NAME -f Dockerfile ."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Prepare bin output dir
|
||||
run: mkdir -p hero-bin
|
||||
|
||||
- name: Run horus_full_install installer in container
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
|
||||
docker run --rm \
|
||||
-v "$PWD/hero-bin:/root/hero/bin" \
|
||||
-e HEROLIB_REF=development_nile_installers \
|
||||
"$IMAGE_NAME" \
|
||||
bash -lc '
|
||||
set -euxo pipefail
|
||||
cd /opt/herolib
|
||||
./examples/installers/horus/horus_full_install.vsh
|
||||
echo "===== AFTER INSTALL, ls -R /root/hero ====="
|
||||
ls -R /root/hero || true
|
||||
'
|
||||
|
||||
- name: List built binaries
|
||||
run: ls -al hero-bin
|
||||
|
||||
- name: Create release directory
|
||||
run: mkdir -p release-artifacts
|
||||
|
||||
|
||||
- name: Package binaries
|
||||
run: |
|
||||
# Package each binary as a tarball
|
||||
for binary in supervisor coordinator horus osiris herorunner runner_osiris runner_sal; do
|
||||
if [ -f "target/release/$binary" ]; then
|
||||
if [ -f "hero-bin/$binary" ]; then
|
||||
tar -czf "release-artifacts/${binary}-${{ steps.version.outputs.VERSION }}-linux-x86_64.tar.gz" \
|
||||
-C target/release "$binary"
|
||||
-C hero-bin "$binary"
|
||||
echo "Packaged $binary"
|
||||
else
|
||||
echo "Warning: $binary not found, skipping"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
- name: Generate checksums
|
||||
run: |
|
||||
cd release-artifacts
|
||||
sha256sum *.tar.gz > checksums.txt
|
||||
cat checksums.txt
|
||||
|
||||
if ls *.tar.gz >/dev/null 2>&1; then
|
||||
sha256sum *.tar.gz > checksums.txt
|
||||
cat checksums.txt
|
||||
else
|
||||
echo "ERROR: no .tar.gz artifacts were produced; check previous steps (likely the installer didn’t build any binaries)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Create Release
|
||||
uses: actions/gitea-release@v1
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
with:
|
||||
files: release-artifacts/*
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
token: ${{ secrets.TOKEN_GITEA }}
|
||||
tag_name: ${{ steps.version.outputs.VERSION }}
|
||||
name: Release ${{ steps.version.outputs.VERSION }}
|
||||
body: |
|
||||
## Horus Release ${{ steps.version.outputs.VERSION }}
|
||||
|
||||
|
||||
### Binaries
|
||||
This release includes the following binaries for Linux x86_64:
|
||||
- `supervisor` - Hero Supervisor service
|
||||
- `coordinator` - Hero Coordinator service
|
||||
- `horus` - Horus main binary
|
||||
- `osiris` - Osiris server
|
||||
- `herorunner` - Hero runner
|
||||
- `runner_osiris` - Osiris runner
|
||||
- `runner_sal` - SAL runner
|
||||
|
||||
### Installation
|
||||
Download the appropriate binary for your system:
|
||||
Built via the herolib V installer (`horus_full_install.vsh`) inside
|
||||
the `hero-git:latest` image and packaged for Linux x86_64:
|
||||
- `supervisor`
|
||||
- `coordinator`
|
||||
- `horus`
|
||||
- `osiris`
|
||||
- `herorunner`
|
||||
- `runner_osiris`
|
||||
- `runner_sal`
|
||||
|
||||
### Installation (example)
|
||||
```bash
|
||||
# Example: Download and install supervisor
|
||||
wget https://git.ourworld.tf/peternashaat/horus/releases/download/${{ steps.version.outputs.VERSION }}/supervisor-${{ steps.version.outputs.VERSION }}-linux-x86_64.tar.gz
|
||||
wget https://git.ourworld.tf/herocode/horus/releases/download/${{ steps.version.outputs.VERSION }}/supervisor-${{ steps.version.outputs.VERSION }}-linux-x86_64.tar.gz
|
||||
tar -xzf supervisor-${{ steps.version.outputs.VERSION }}-linux-x86_64.tar.gz
|
||||
chmod +x supervisor
|
||||
sudo mv supervisor /usr/local/bin/
|
||||
```
|
||||
|
||||
|
||||
### Verification
|
||||
Verify the integrity of downloaded files using the checksums:
|
||||
```bash
|
||||
sha256sum -c checksums.txt
|
||||
```
|
||||
|
||||
### Changes
|
||||
See commit history for detailed changes in this release.
|
||||
draft: false
|
||||
prerelease: false
|
||||
prerelease: false
|
||||
Reference in New Issue
Block a user