aidaemon 0.11.12

A personal AI agent that runs as a background daemon, accessible via Telegram, Slack, or Discord, with tool use, MCP integration, and persistent memory
Documentation
name: CI

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

env:
  CARGO_TERM_COLOR: always

jobs:
  release-tag-guard:
    name: Release tag guard
    if: github.event_name == 'push' && github.ref == 'refs/heads/master'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
        with:
          fetch-depth: 0

      - name: Ensure release commits are tagged
        run: |
          set -euo pipefail

          SUBJECT="$(git log -1 --pretty=%s "$GITHUB_SHA")"
          TAG_NAME="$(printf '%s\n' "$SUBJECT" | sed -nE 's/^release: (v[0-9]+\.[0-9]+\.[0-9]+).*/\1/p')"

          if [ -z "$TAG_NAME" ]; then
            echo "HEAD commit is not a release commit; skipping tag guard."
            exit 0
          fi

          if git tag --points-at "$GITHUB_SHA" | grep -Fxq "$TAG_NAME"; then
            echo "Found matching tag ${TAG_NAME} on ${GITHUB_SHA}."
            exit 0
          fi

          echo "::error::Release commit '${SUBJECT}' reached master without matching tag '${TAG_NAME}' pointing at ${GITHUB_SHA}."
          echo "Tags currently pointing at ${GITHUB_SHA}:"
          git tag --points-at "$GITHUB_SHA" || true
          exit 1

  check:
    name: Check (fmt + clippy)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5

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

      - name: Install Linux dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y libdbus-1-dev pkg-config libssl-dev

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

      - name: Check formatting
        run: cargo fmt --check

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

  test:
    name: Test (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    timeout-minutes: 20
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-14]
    steps:
      - uses: actions/checkout@v5

      - uses: dtolnay/rust-toolchain@stable

      - name: Install Linux dependencies
        if: matrix.os == 'ubuntu-latest'
        run: |
          sudo apt-get update
          sudo apt-get install -y libdbus-1-dev pkg-config libssl-dev

      - name: Free disk space (ubuntu)
        if: matrix.os == 'ubuntu-latest'
        run: |
          sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
          sudo docker image prune --all --force || true
          df -h

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

      - name: Cache fastembed model
        uses: actions/cache@v4
        with:
          path: .fastembed_cache
          key: fastembed-allminilml6v2-v2

      - name: Run tests
        run: cargo test --all-features

      - name: Harness eval fixture suite
        run: cargo test --lib harness_eval --all-features

  build-check:
    name: Build check (release)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5

      - uses: dtolnay/rust-toolchain@stable

      - name: Install Linux dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y libdbus-1-dev pkg-config libssl-dev

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

      - name: Build release
        run: cargo build --release --features "browser"

  coverage:
    name: Code coverage
    runs-on: ubuntu-latest
    continue-on-error: true  # Visibility only — doesn't block merges
    steps:
      - uses: actions/checkout@v5

      - uses: dtolnay/rust-toolchain@stable

      - name: Install Linux dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y libdbus-1-dev pkg-config libssl-dev

      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov

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

      - name: Cache fastembed model
        uses: actions/cache@v4
        with:
          path: .fastembed_cache
          key: fastembed-allminilml6v2-v2

      - name: Generate coverage
        run: cargo llvm-cov --all-features --lcov --output-path lcov.info

      - name: Upload to Codecov
        uses: codecov/codecov-action@v4
        with:
          files: lcov.info
          fail_ci_if_error: false
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}