florecon 0.1.2

Incremental financial reconciliation by min-cost flow: a conserving combinator algebra over a network-simplex core. Nothing created, nothing lost.
Documentation
name: ci

on:
  push:
    branches: [master]
  pull_request:

permissions:
  contents: read

jobs:
  rust:
    name: lint + test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy, rustfmt
          targets: wasm32-unknown-unknown
      - uses: Swatinem/rust-cache@v2
      - uses: taiki-e/install-action@v2
        with:
          tool: just
      - run: just lint
      - run: just test

  starter:
    name: author starter (native + wasm)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: wasm32-unknown-unknown
      - uses: Swatinem/rust-cache@v2
      - uses: taiki-e/install-action@v2
        with:
          tool: just
      # Build + run the starter seed exactly as an author would, so it can never
      # drift against the SDK: native harness on the sample, then the ship wasm.
      - run: just starter

  semver:
    name: semver-checks (florecon)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      # Compares the crate's public API against the last release on crates.io and
      # fails an undeclared breaking change (0.x: breaking => minor bump).
      - uses: obi1kenobi/cargo-semver-checks-action@v2
        with:
          package: florecon
          feature-group: all-features

  versions:
    name: version consistency
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - run: bash scripts/check-versions.sh

  hosts:
    name: host conformance (wasm + python + js)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: wasm32-unknown-unknown
      - uses: Swatinem/rust-cache@v2
      - uses: taiki-e/install-action@v2
        with:
          tool: just
      - uses: astral-sh/setup-uv@v6
      - uses: actions/setup-node@v5
        with:
          node-version: "20"

      # Build the interco plugin to wasm (also stages it into the Python host).
      - run: just build-wasm

      # Python host: the golden wire-contract replay + the stateful smoke, both
      # driving the real wasm through the generic host.
      - name: python host
        env:
          PYTHONPATH: hosts/python/src
        run: |
          uv run --no-project --python 3.12 --with wasmtime --with pyarrow \
            python hosts/python/golden_replay.py
          uv run --no-project --python 3.12 --with wasmtime --with pyarrow \
            python hosts/python/smoke_stateful.py

      # JS host: head-less smoke (loads the same wasm, asserts parity).
      - name: js host
        working-directory: hosts/js
        run: |
          npm ci
          npm test