From d23bf52c5047ea992dfb279dfe7257b0606a090b Mon Sep 17 00:00:00 2001 From: Lawrence Date: Tue, 24 Feb 2026 12:12:11 +0000 Subject: [PATCH] Improve CI checks and fix RPM release step --- .gitea/workflows/ci.yml | 30 ++++++++++++++++++++++-------- .gitea/workflows/release.yml | 6 +++--- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 5ed9c3f..617810a 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -2,22 +2,36 @@ name: ci on: push: - branches: - - main pull_request: +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + jobs: - build: + checks: + name: Rust Checks runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - - name: Install Rust + - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy - - name: Build relay - run: cargo build -p relay + - name: Cache Rust build + uses: Swatinem/rust-cache@v2 - - name: Build client - run: cargo build -p client + - name: Cargo check + run: cargo check --workspace --all-targets --locked + + - name: Cargo fmt + run: cargo fmt --all -- --check + + - name: Cargo clippy + run: cargo clippy --workspace --all-targets --locked -- -D warnings + + - name: Cargo test + run: cargo test --workspace --all-targets --locked diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index f4f3a27..34fbb95 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -62,9 +62,9 @@ jobs: - name: Build rpm packages run: | - cargo rpm build -p relay --release - cargo rpm build -p client --release - find target/release/rpmbuild/RPMS -name "*.rpm" -exec cp {} dist/ \; + (cd relay && cargo rpm build --release) + (cd client && cargo rpm build --release) + find . -path "*/target/release/rpmbuild/RPMS/*.rpm" -exec cp {} dist/ \; # ------------------------------------------------- # FIXED: Generic package upload (Gitea correct API)