ci: run the conformance suites that cargo test never executed #93

Merged
dcharlot merged 1 commit from ci/run-conformance-verifiers into main 2026-09-17 06:58:33 -04:00

View file

@ -50,18 +50,18 @@ jobs:
fail-fast: false
matrix:
include:
- { name: jcp-rs, dir: jcp/jcp-rs, runner: linux }
- { name: sandbox-rs, dir: sandbox/sandbox-rs, runner: linux }
- { name: jcp-rs, dir: jcp/jcp-rs, runner: linux, conformance: jcp-conformance }
- { name: sandbox-rs, dir: sandbox/sandbox-rs, runner: linux, conformance: sandbox-conformance }
- { name: smart-byte-rs, dir: smart-byte/smart-byte-rs, runner: linux }
- { name: openpay, dir: openpay, runner: linux-arm64 }
- { name: joule-code-rs, dir: joule-code/joule-code-rs, runner: linux-arm64 }
- { name: map-rs, dir: map/map-rs, runner: linux-arm64 }
- { name: aac-rs, dir: aac/aac-rs, runner: linux-arm64 }
- { name: map-rs, dir: map/map-rs, runner: linux-arm64, conformance: map-conformance }
- { name: aac-rs, dir: aac/aac-rs, runner: linux-arm64, conformance: aac-conformance }
- { name: joulecontract-rs, dir: joulecontract/joulecontract-rs, runner: linux-arm64, z3: true }
- { name: jouledesk-rs, dir: jouledesk/jouledesk-rs, runner: macos }
- { name: arl-rs, dir: arl/arl-rs, runner: macos }
- { name: sense-rs, dir: sense/sense-rs, runner: macos }
- { name: proof-rs, dir: proof/proof-rs, runner: linux, z3: true }
- { name: proof-rs, dir: proof/proof-rs, runner: linux, z3: true, conformance: proof-conformance }
- { name: joulehook-rs, dir: joulehook/joulehook-rs, runner: macos }
- { name: eoc-rs, dir: eoc/eoc-rs, runner: linux }
- { name: mesh-rs, dir: mesh/mesh-rs, runner: linux-arm64 }
@ -150,3 +150,32 @@ jobs:
env:
RUSTFLAGS: ${{ matrix.rustflags }}
run: cargo test --workspace
# Run each standard's conformance suite.
#
# These suites live in a binary's `main()`, not in `#[test]`, so
# `cargo test` never executes them — verified, not assumed:
# `cargo test -p aac-conformance` runs **0 tests** while
# `cargo run -p aac-conformance` runs **40 checks**; map is 1 test vs 15
# checks. Same shape for jcp, proof and sandbox. The suites include
# negative vectors (`C-neg`, `Cneg`), which are the ones that catch a
# verifier ACCEPTING what it must reject.
#
# This is the `main()` instance of the same bug as a feature-gated test:
# the code compiles under `--all-targets`, reports nothing, and looks
# covered. Compiling a suite is not running it.
#
# `--bin` is explicit because these crates also ship a `gen-vectors`
# binary; `cargo run -p <crate>` is ambiguous with two binaries and fails
# rather than choosing — which is how this step would silently never run.
#
# No path argument: these binaries take none. They check the
# implementation against in-code expectations, which is a different claim
# from validating the published `conformance/v1` files on disk — nothing
# in CI does that yet, and this step does not pretend to.
- name: Conformance suite
if: matrix.conformance
working-directory: ${{ matrix.dir }}
env:
RUSTFLAGS: ${{ matrix.rustflags }}
run: cargo run -q -p ${{ matrix.conformance }} --bin ${{ matrix.conformance }}