zeph 0.22.4

Lightweight AI agent with hybrid inference, skills-first architecture, and multi-channel I/O
name: CI (non-Linux)

on:
  workflow_dispatch:
    inputs:
      ref:
        description: "Branch, tag, or commit SHA to test"
        required: false
        default: ""

permissions:
  contents: read

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: "-D warnings"
  RUSTC_WRAPPER: ""
  CARGO_INCREMENTAL: "0"

jobs:
  build-tests:
    name: Build Tests (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    timeout-minutes: 45
    strategy:
      fail-fast: false
      matrix:
        os: [macos-latest, windows-latest]
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
        with:
          ref: ${{ inputs.ref || github.ref }}
      - uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
        with:
          toolchain: stable
      - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
        with:
          cache-targets: "false"
      - uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
      - uses: taiki-e/install-action@4f74fa8a3d358e568049b7b1a7fbb4fceabda454 # nextest
      - name: Build and archive tests
        run: cargo nextest archive --config-file .github/nextest.toml --workspace --features full --lib --bins --archive-file nextest-archive.tar.zst
        env:
          RUSTC_WRAPPER: sccache
          SCCACHE_GHA_ENABLED: "true"
      - name: Upload test archive
        uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
        with:
          name: nextest-archive-${{ matrix.os }}
          path: nextest-archive.tar.zst
          retention-days: 1

  test:
    name: "Test (${{ matrix.os }}, shard ${{ matrix.partition }})"
    needs: [build-tests]
    runs-on: ${{ matrix.os }}
    timeout-minutes: 10
    strategy:
      fail-fast: false
      matrix:
        os: [macos-latest, windows-latest]
        partition: ["1/8", "2/8", "3/8", "4/8", "5/8", "6/8", "7/8", "8/8"]
    # macOS/Windows default per-test thread stacks are smaller than Linux's, so
    # Config-heavy async test frames that build more than one Agent/ServeAgentDeps
    # in the same frame (e.g. build_agent_factory_gates_trust_state_independently_per_session,
    # build_combined_deps_wires_policy_gate_through_to_session_agent) can overflow the
    # default stack here even though they pass in Linux's non-instrumented `test` job
    # (same root cause as the coverage job's fix in ci.yml, run 29873938646).
    env:
      RUST_MIN_STACK: "33554432"
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
        with:
          ref: ${{ inputs.ref || github.ref }}
      - uses: taiki-e/install-action@4f74fa8a3d358e568049b7b1a7fbb4fceabda454 # nextest
      - name: Download test archive
        uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
        with:
          name: nextest-archive-${{ matrix.os }}
      - name: "Run tests (shard ${{ matrix.partition }})"
        run: cargo nextest run --config-file .github/nextest.toml --archive-file nextest-archive.tar.zst --workspace-remap . --profile ci-partition --partition "hash:${{ matrix.partition }}"