Adds .github/workflows/joule-code-conformance.yml: on any change under joule-code/, build the reference library, run its tests, round-trip the v1 conformance pack (fails if the harness reports any failures), and build+test the L3 JouleClaw binding example. Makes "conformant = round-trips the vectors" (SPEC §8) a checked gate, not an assertion — matching the existing smart-byte conformance + vanity scanner workflows. Co-Authored-By: Claude Opus 4.8 <[email protected]>
57 lines
1.7 KiB
YAML
57 lines
1.7 KiB
YAML
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
|