mirror of
https://github.com/ratspeak/rsReticulum
synced 2026-11-27 13:52:16 +00:00
73 lines
2.3 KiB
YAML
73 lines
2.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test:
|
|
name: Test (${{ matrix.os }})
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-bin: false
|
|
- name: Install system deps (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: sudo apt-get update && sudo apt-get install -y libudev-dev libdbus-1-dev libpcsclite-dev pkg-config
|
|
- name: Test (default features)
|
|
run: cargo test --workspace --locked
|
|
- name: Build application examples
|
|
run: cargo build -p rns-runtime --examples --locked
|
|
- name: Test BLE interface features (Linux/macOS)
|
|
if: runner.os != 'Windows'
|
|
run: cargo test -p rns-interface --features ble --locked
|
|
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy, rustfmt
|
|
- name: Install system deps
|
|
run: sudo apt-get update && sudo apt-get install -y libudev-dev libdbus-1-dev libpcsclite-dev pkg-config
|
|
- run: cargo fmt --all -- --check
|
|
- run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
|
|
- name: Check public API documentation
|
|
env:
|
|
RUSTDOCFLAGS: "-D warnings"
|
|
run: cargo doc --workspace --no-deps --locked
|
|
- run: cargo check --workspace --no-default-features --locked
|
|
|
|
msrv:
|
|
name: Rust 1.85 MSRV
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: dtolnay/rust-toolchain@1.85.0
|
|
with:
|
|
components: clippy
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-bin: false
|
|
- name: Install system deps
|
|
run: sudo apt-get update && sudo apt-get install -y libudev-dev libdbus-1-dev libpcsclite-dev pkg-config
|
|
- name: Clippy (all targets and features)
|
|
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
|