ci: add explicit cargo build --examples step (Phase B+C Gate CONCERN-C1 fix)

spec §1.2 acceptance #7 calls for cargo build --examples --workspace 三 OS
PASS in CI. Previously cargo build --workspace + cargo clippy --all-targets
were considered equivalent (clippy with --all-targets compiles examples),
but Phase B+C Gate codex review CONCERN-C1 said the explicit step should
be in the workflow for unambiguous acceptance trace.

Adds cargo build --examples --workspace --target <target> --release
between cargo build --workspace and cargo test on host runners. Skipped on
cross-arch check_only matrix (cross examples build is out of scope; test
runners cover real arch builds).
This commit is contained in:
Kayshen-X 2026-05-05 12:23:45 +08:00
parent 92cf0378e8
commit fd87709f61

View file

@ -92,6 +92,9 @@ jobs:
- name: Build (host)
if: matrix.cross == false && matrix.check_only != true
run: cargo build --workspace --target ${{ matrix.target }} --release
- name: Build examples (host, spec §1.2 acceptance #7)
if: matrix.cross == false && matrix.check_only != true
run: cargo build --examples --workspace --target ${{ matrix.target }} --release
- name: Check (cross-arch host, e.g. macos-x86_64 from Apple Silicon)
if: matrix.check_only == true
run: cargo check --workspace --target ${{ matrix.target }}