name: joule-code conformance gate # Enforces the Joule Code conformance contract on every change: the reference # library must build and pass its tests, and the published C1–C4 wire vectors # must round-trip (SPEC §8). "Conformant = round-trips the vectors" — checked, # not asserted. on: pull_request: paths: - 'joule-code/**' - '.github/workflows/joule-code-conformance.yml' push: branches: - main paths: - 'joule-code/**' - '.github/workflows/joule-code-conformance.yml' jobs: conformance: name: Build + round-trip C1-C4 vectors runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@master with: toolchain: "1.96.0" - name: Cache cargo uses: actions/cache@v4 with: path: | ~/.cargo/registry ~/.cargo/git joule-code/joule-code-rs/target key: joule-code-${{ runner.os }}-${{ hashFiles('joule-code/joule-code-rs/Cargo.lock') }} - name: Reference library tests working-directory: joule-code/joule-code-rs run: cargo test --workspace - name: Round-trip the v1 conformance pack (C1-C4) working-directory: joule-code/joule-code-rs run: | set -e out="$(cargo run -q -p joule-code-conformance -- verify ../conformance/v1)" echo "$out" # The pack must pass with zero failures. echo "$out" | grep -Eq '0 failed' || { echo "::error::conformance pack reported failures"; exit 1; } - name: L3 JouleClaw binding example builds + tests working-directory: joule-code/examples/l3-jouleclaw run: cargo test