Update .gitea/workflows/ci.yml
Some checks failed
CI / Build & Test (push) Failing after 59s

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.
This commit is contained in:
2025-11-19 12:32:36 +00:00
parent 09c4444db5
commit 192972aba8

View File

@@ -46,20 +46,45 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-cargo-build-target- ${{ runner.os }}-cargo-build-target-
- name: Check code # 🔍 Check only crates under bin/
run: cargo check --workspace --verbose - 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
- name: Run tests # ✅ Run tests only for crates under bin/
run: cargo test --workspace --verbose - 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
- name: Run clippy # 🧹 Clippy only for crates under bin/
run: cargo clippy --workspace -- -D warnings - 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 - name: Check formatting
run: cargo fmt --all -- --check run: cargo fmt --all -- --check
- name: Build release binaries # 🏗 Build release binaries only for crates under bin/
run: cargo build --workspace --release --verbose - 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 - name: List built binaries
run: | run: |