aicx 0.9.2

Operator CLI + MCP server: canonical corpus first, optional semantic index second (Claude Code, Codex, Gemini)
Documentation
name: CI

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

permissions:
  contents: read

env:
  CARGO_TERM_COLOR: always
  RUST_MEMEX_REF: 047e63bd9c89bb174fed6e69f9a3a9c203e04981

jobs:
  check:
    name: ${{ matrix.name }}
    runs-on: ${{ fromJSON(matrix.runner) }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - name: linux-self-hosted
            runner: '["self-hosted", "ops-linux"]'
          - name: macos-self-hosted
            runner: '["self-hosted", "dragon-macos"]'

    steps:
      - uses: actions/checkout@v6
        with:
          path: aicx

      - name: Checkout rust-memex sibling
        uses: actions/checkout@v6
        with:
          repository: Loctree/rust-memex
          ref: ${{ env.RUST_MEMEX_REF }}
          path: rust-memex

      - name: Install protoc
        # Manual install instead of arduino/setup-protoc@v3 — that action
        # GitHub-API-fetches release metadata even for pinned versions,
        # which times out intermittently on the macos-self-hosted runner
        # (arduino/setup-protoc#108; observed 2026-05-24 PR #9 macOS:
        # 34s "unable to get latest version" hang after 2+ successful
        # runs). brew/apt provide protoc v23+, prost-build / tonic-build
        # compatible.
        shell: bash
        run: |
          if command -v protoc >/dev/null 2>&1; then
            echo "protoc already installed: $(protoc --version)"
            exit 0
          fi
          if [[ "$RUNNER_OS" == "Linux" ]]; then
            sudo apt-get update -qq
            sudo apt-get install -y -qq protobuf-compiler
          elif [[ "$RUNNER_OS" == "macOS" ]]; then
            brew install protobuf
          else
            echo "::error::Unsupported OS for protoc install: $RUNNER_OS"
            exit 1
          fi
          protoc --version

      - uses: actions/setup-python@v6
        if: runner.os == 'Linux'
        with:
          python-version: '3.x'

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

      - name: semgrep
        if: runner.os == 'Linux'
        working-directory: aicx
        run: |
          python -m pip install --upgrade pip semgrep
          semgrep --config auto --error --quiet

      - name: cargo check
        working-directory: aicx
        run: cargo check --locked

      - name: cargo clippy default
        working-directory: aicx
        run: cargo clippy --locked -p aicx --all-targets -- -D warnings

      - name: cargo clippy native GGUF
        working-directory: aicx
        run: |
          cargo clippy --locked -p aicx-embeddings --features gguf -- -D warnings
          cargo clippy --locked -p aicx --features native-embedder --all-targets -- -D warnings

      - name: cargo test
        working-directory: aicx
        # Keep serialized until remaining AICX_HOME-mutating tests share one
        # root-crate lock or move to explicit-home helpers (Wave F).
        run: cargo test --locked --all-targets -- --test-threads=2

      - name: cargo test native GGUF
        working-directory: aicx
        run: |
          cargo test --locked -p aicx-embeddings --features gguf
          cargo test --locked -p aicx --features native-embedder --test native_embedder

      - name: cargo fmt
        working-directory: aicx
        run: cargo fmt -- --check