recursive-agent 0.8.2

A Rust coding-agent platform: kernel, tools, multi-agent orchestration, HTTP API, MCP, and TUI
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: "-D warnings"

jobs:
  test:
    name: test (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]

    steps:
      - uses: actions/checkout@v4

      - name: Configure git identity for tests
        run: |
          git config --global user.email "ci@recursive.local"
          git config --global user.name "CI Bot"
          git config --global safe.directory "*"

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

      - name: Cache cargo registry & target
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
          restore-keys: |
            ${{ runner.os }}-cargo-

      - name: Format check
        run: cargo fmt --all -- --check

      - name: Clippy
        run: cargo clippy --workspace --all-targets --all-features -- -D warnings

      - name: Build
        run: cargo build --workspace --verbose

      - name: Test
        run: cargo test --workspace --verbose

  supply-chain:
    name: supply-chain (cargo audit + machete)
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable

      # cargo install compiles from source (~1-2 min each); cache the binaries
      # so repeat runs skip the compile. Mirrors the test job's actions/cache
      # pattern (same action, different path — the cargo bin dir).
      - name: Cache cargo-audit / cargo-machete binaries
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/bin/cargo-audit
            ~/.cargo/bin/cargo-machete
          key: ${{ runner.os }}-cargo-tools-${{ hashFiles('.github/workflows/ci.yml') }}
          restore-keys: |
            ${{ runner.os }}-cargo-tools-

      # RUSTFLAGS="-D warnings" is set workflow-wide for the product build; the
      # installed tools aren't part of this workspace, so don't let their build
      # warnings fail the install steps.
      - name: Install cargo-audit
        env:
          RUSTFLAGS: ""
        run: |
          if ! command -v cargo-audit >/dev/null 2>&1; then
            cargo install cargo-audit --locked
          fi

      - name: Install cargo-machete
        env:
          RUSTFLAGS: ""
        run: |
          if ! command -v cargo-machete >/dev/null 2>&1; then
            cargo install cargo-machete --locked
          fi

      # Fails on any RUSTSEC advisory (default cargo audit behaviour).
      - name: cargo audit (RUSTSEC advisories)
        run: cargo audit

      # Fails when unused dependencies are found (workspace is currently clean).
      - name: cargo machete (unused dependencies)
        run: cargo machete