name: CI on: push: branches: [main] pull_request: branches: [main] permissions: contents: read jobs: api-compat: name: Public API baseline runs-on: macos-15 timeout-minutes: 45 steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 with: fetch-depth: 0 - uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master with: toolchain: nightly-2026-08-01 targets: aarch64-apple-darwin - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2 with: cache-bin: true - name: Install API snapshot tool run: cargo install cargo-public-api --version 0.52.0 --locked - name: Check reviewed public API baseline run: python3 tools/check-api-baseline.py - name: Check manifest and feature contract run: python3 tools/check-api-manifest.py - name: Check additions-only compatibility floor run: python3 tools/check-api-compatibility.py - name: Check canonical and legacy external consumer run: | cargo check --manifest-path api/fixtures/Cargo.toml --locked cargo check --manifest-path api/fixtures/Cargo.toml --all-features --locked 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@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 - uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master with: toolchain: 1.96.0 - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # 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 --no-fail-fast - name: Build application examples run: cargo build -p rns-runtime --examples --locked - name: Test BLE interface features run: cargo test -p rns-interface --features ble --locked lint: name: Lint runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 with: fetch-depth: 0 - uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master with: toolchain: 1.96.0 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 - name: Check source-release contract run: python3 scripts/ci/check_source_release_contract.py - 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.89 MSRV runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 - uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master with: toolchain: 1.89.0 components: clippy - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # 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