#!/bin/sh # CI del motore (M0 + M1 in corso): formattazione, build, test unitari, reftest, confine C. # Target dichiarato (docs/09-test-conformita.md): sotto 5 minuti sull'host. set -eu cd "$(dirname "$0")/.." export PATH="$HOME/.cargo/bin:$PATH" FONT="${ENGINE_FONT:-/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf}" START=$(date +%s) echo "== fmt" cargo fmt --check echo "== build (release)" cargo build --release 2>&1 | grep -E "^(error|warning: unused)" || true echo "== test unitari" cargo test --quiet echo "== reftest" cargo run --quiet --bin reftest -- --cases cases echo "== confine C (API verso il guscio)" cc -Iinclude tests/ffi_smoke.c target/release/libengine.a -lm -lpthread -ldl -o "${TMPDIR:-/tmp}/engine_ffi_smoke" "${TMPDIR:-/tmp}/engine_ffi_smoke" "$FONT" | tail -3 END=$(date +%s) echo echo "CI: $((END - START)) s"