kunobi-daemon 0.2.1

Process ownership, request draining, and verified upgrades for local daemons
Documentation
name: CI

on:
  pull_request:
  push:
    branches: [main]

permissions:
  contents: read

concurrency:
  group: ci-${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    name: Test (${{ matrix.os }})
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
      - run: rustup toolchain install 1.95.0 --profile minimal --component rustfmt --component clippy
      - run: cargo fmt --check
      - run: cargo clippy --locked --all-features --all-targets -- -D warnings
      - run: cargo test --locked --all-features
      - run: cargo test --locked --no-default-features --features wire,local
      - run: cargo test --locked --no-default-features --features wire
      - run: cargo test --locked --no-default-features
      - run: cargo run --locked --no-default-features --features wire --example application_messages
      - run: cargo package --locked

  protobuf:
    name: Protobuf schema
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
      - run: rustup toolchain install 1.95.0 --profile minimal --component rustfmt --component clippy
      - run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
      - run: cargo fmt --manifest-path tools/proto-gen/Cargo.toml --check
      - run: cargo clippy --locked --manifest-path tools/proto-gen/Cargo.toml -- -D warnings
      - run: cargo run --locked --manifest-path tools/proto-gen/Cargo.toml -- --check
      - run: python3 scripts/check-protobuf.py

  msrv:
    name: Rust 1.89
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
      - run: rustup toolchain install 1.89.0 --profile minimal
      - run: cargo +1.89.0 test --locked --all-features
      - run: cargo +1.89.0 test --locked --no-default-features --features wire
      - run: cargo +1.89.0 test --locked --no-default-features

  # Native windows-latest cannot see mixed-case .lib names. cargo check does
  # not link; this job is the cargo-xwin path Kunobi's sidecar uses.
  xwin:
    name: Windows cross-link (xwin)
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
      - run: rustup toolchain install 1.95.0 --profile minimal
      - run: rustup target add x86_64-pc-windows-msvc
      - run: sudo apt-get update && sudo apt-get install -y clang lld
      - run: cargo install cargo-xwin --locked --version 0.23.1
      - run: cargo xwin build --locked --all-features --all-targets --target x86_64-pc-windows-msvc