Improve CI checks and fix RPM release step
This commit is contained in:
@@ -2,22 +2,36 @@ name: ci
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ci-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
checks:
|
||||||
|
name: Rust Checks
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
components: rustfmt, clippy
|
||||||
|
|
||||||
- name: Build relay
|
- name: Cache Rust build
|
||||||
run: cargo build -p relay
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Build client
|
- name: Cargo check
|
||||||
run: cargo build -p client
|
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
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Build rpm packages
|
- name: Build rpm packages
|
||||||
run: |
|
run: |
|
||||||
cargo rpm build -p relay --release
|
(cd relay && cargo rpm build --release)
|
||||||
cargo rpm build -p client --release
|
(cd client && cargo rpm build --release)
|
||||||
find target/release/rpmbuild/RPMS -name "*.rpm" -exec cp {} dist/ \;
|
find . -path "*/target/release/rpmbuild/RPMS/*.rpm" -exec cp {} dist/ \;
|
||||||
|
|
||||||
# -------------------------------------------------
|
# -------------------------------------------------
|
||||||
# FIXED: Generic package upload (Gitea correct API)
|
# FIXED: Generic package upload (Gitea correct API)
|
||||||
|
|||||||
Reference in New Issue
Block a user