Files
horus/.gitea/workflows/ci.yml
PeterNashaat 192972aba8
Some checks failed
CI / Build & Test (push) Failing after 59s
Update .gitea/workflows/ci.yml
limit rust checks/builds to bin crates only

Run cargo check/test/clippy/build only for crates under bin/ using
--manifest-path instead of the full workspace. This avoids unrelated
validating all binaries.
2025-11-19 12:32:36 +00:00

108 lines
3.4 KiB
YAML

name: CI
on:
push:
branches:
- '**'
pull_request:
types: [opened, synchronize, reopened]
jobs:
build-and-test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-
- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-target-
# 🔍 Check only crates under bin/
- name: Check code (all crates under bin/)
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
# ✅ Run tests only for crates under bin/
- name: Run tests (all crates under bin/)
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
# 🧹 Clippy only for crates under bin/
- 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
# Formatting can safely stay workspace-wide
- name: Check formatting
run: cargo fmt --all -- --check
# 🏗 Build release binaries only for crates under bin/
- 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: |
echo "Built binaries:"
ls -lh target/release/ | grep -E '^-.*x.*'
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: binaries-${{ github.sha }}
path: |
target/release/supervisor
target/release/coordinator
target/release/horus
target/release/osiris
target/release/herorunner
target/release/runner_osiris
target/release/runner_sal
retention-days: 7
if-no-files-found: warn