panasyn 0.1.0

A lightweight GPU-accelerated terminal emulator for macOS and Linux.
name: CI

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

env:
  CARGO_TERM_COLOR: always

jobs:
  check:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v4

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

      - name: Rust cache
        uses: Swatinem/rust-cache@v2

      - name: Install cargo-audit
        uses: taiki-e/install-action@v2
        with:
          tool: cargo-audit

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

      - name: Run clippy
        run: cargo clippy --all-targets --all-features -- -D warnings

      - name: Audit dependencies
        run: cargo audit

      - name: Run unit tests
        run: cargo test

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

      - name: Build documentation
        run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features

      - name: Build (release)
        run: cargo build --release --all-features

      - name: Package check
        run: cargo package --locked

      - name: Create replay smoke fixture
        run: |
          cat > /tmp/panasyn-ci-smoke.jsonl <<'EOF'
          {"timestamp_ms":0,"type":"PtyBytes","data":"68656c6c6f0a776f726c640a"}
          {"timestamp_ms":10,"type":"PtyBytes","data":"1b5b33316d7265641b5b306d0a"}
          EOF

      - name: Replay smoke fixture (headless)
        run: cargo run --release -- replay /tmp/panasyn-ci-smoke.jsonl --headless --machine

      - name: Replay benchmark
        run: cargo run --release -- replay /tmp/panasyn-ci-smoke.jsonl --benchmark --machine

      - name: Bench suite smoke test
        run: cargo run --release -- bench /tmp/panasyn-ci-smoke.jsonl --frames 3 --pty-bytes 65536 --machine

      - name: Replay regression check
        run: cargo run --release -- replay /tmp/panasyn-ci-smoke.jsonl --regression --machine

      - name: ANSI fuzz test (1000 iterations)
        run: cargo run --release -- fuzz 1000 --categories