zapd 1.1.2

The ZAP router — embedded in every ZAP process; one per user login, elected by lock
Documentation
name: ci

on:
  push:
    branches: [main]
  pull_request:

jobs:
  test:
    name: ${{ matrix.target }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - { os: macos-14,         target: aarch64-apple-darwin,       run: true }   # arm64 native
          - { os: macos-14,         target: x86_64-apple-darwin,        run: false }  # native cross-compile (LLVM, no QEMU)
          - { os: ubuntu-latest,    target: x86_64-unknown-linux-musl,  run: true }   # amd64 native
          - { os: ubuntu-24.04-arm, target: aarch64-unknown-linux-musl, run: true }   # arm64 native
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.target }}
          components: clippy
      - name: musl tools
        if: contains(matrix.target, 'musl')
        run: sudo apt-get update && sudo apt-get install -y musl-tools
      - run: cargo clippy --workspace --all-targets --target ${{ matrix.target }} -- -D warnings
      - run: cargo build --release --target ${{ matrix.target }}
      - if: matrix.run
        run: cargo test -p zapd --target ${{ matrix.target }}   # includes the multi-process election

  python:
    name: python binding
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-14]
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: actions/setup-python@v5
        with: { python-version: '3.12' }
      - name: build + test
        working-directory: python
        run: |
          python -m venv .venv && . .venv/bin/activate
          pip install maturin pytest
          maturin develop --release
          pytest -q tests