northroot-proof-engine 0.3.2

Core proof computation and validation library for PoSH (Proof of Shape) and PoX (Proof of Execution)
Documentation
name: Rust CI

on:
  workflow_call:
    inputs:
      features:
        description: 'Cargo features to use (e.g., "all-features" or "")'
        required: false
        type: string
        default: '--all-features'
      toolchain:
        description: 'Rust toolchain version'
        required: false
        type: string
        default: 'stable'
    secrets:
      CRATES_IO_TOKEN:
        required: false

jobs:
  test:
    name: Test Suite
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Install Rust
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ inputs.toolchain }}

      - name: Cache cargo registry
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
          restore-keys: |
            ${{ runner.os }}-cargo-

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

      - name: Run clippy
        run: cargo clippy --all-targets ${{ inputs.features }} -- -D warnings

      - name: Run tests
        run: cargo test ${{ inputs.features }} --verbose

      - name: Build
        run: cargo build ${{ inputs.features }} --verbose