open-standards/.github/workflows/joule-code-conformance.yml
David Charlot aed707e488 joule-code: CI conformance gate (build + round-trip C1-C4 on every change)
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]>
2026-06-04 06:34:19 -04:00

57 lines
1.7 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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