nereid 0.9.0

Source-available noncommercial terminal diagram TUI and MCP server for Mermaid-backed sessions
Documentation
name: CodSpeed Benchmarks

on:
  push:
    branches:
      - main
    paths:
      - '**/*.rs'
      - 'Cargo.toml'
      - 'Cargo.lock'
      - '.cargo/**'
      - 'benches/**'
      - 'scripts/**'
      - '.github/workflows/codspeed.yml'
  pull_request:
    paths:
      - '**/*.rs'
      - 'Cargo.toml'
      - 'Cargo.lock'
      - '.cargo/**'
      - 'benches/**'
      - 'scripts/**'
      - '.github/workflows/codspeed.yml'
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

permissions:
  contents: read
  id-token: write

jobs:
  codspeed:
    name: Run benchmarks
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5

      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable
      - name: Restore Rust cache
        uses: Swatinem/rust-cache@v2
        with:
          shared-key: bench-${{ runner.os }}-${{ runner.arch }}
          save-if: ${{ github.event_name != 'pull_request' }}
          cache-on-failure: true

      - name: Install cargo-codspeed
        run: cargo install cargo-codspeed

      # The `specs/` directory in the repo root conflicts with the GCC linker,
      # which interprets it as a compiler spec file. Move it aside during the
      # build and restore it before running.
      - name: Build benchmarks
        run: |
          moved_specs=0
          if [ -d specs ]; then
            mv specs _specs_backup
            moved_specs=1
          fi

          restore_specs() {
            if [ "$moved_specs" -eq 1 ] && [ -d _specs_backup ]; then
              mv _specs_backup specs
            fi
          }
          trap restore_specs EXIT

          cargo codspeed build -m simulation

      - name: Run benchmarks
        uses: CodSpeedHQ/action@v4
        with:
          mode: simulation
          run: cargo codspeed run