From a2146c0f0d1131eb598979d3bd43bd3639a73b3a Mon Sep 17 00:00:00 2001 From: Yogthos Date: Mon, 22 Jun 2026 23:27:49 -0400 Subject: [PATCH] buildsmoke: skip when the Chez build toolchain is absent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The standalone-binary build needs Chez's kernel dev files (libkernel.a, scheme.h) and a C compiler. A distro chezscheme package ships neither, so the gate failed on CI (apt installs petite+scheme only). Preflight for the csv dir and cc and skip cleanly when they're missing — same pattern as certify skipping without Clojure. Where the toolchain exists (dev machines), it runs as before; the discovered csv dir is pinned via JOLT_CHEZ_CSV so the build uses exactly it. --- host/chez/build-smoke.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/host/chez/build-smoke.sh b/host/chez/build-smoke.sh index d058b96..883b853 100755 --- a/host/chez/build-smoke.sh +++ b/host/chez/build-smoke.sh @@ -5,6 +5,26 @@ root="$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd)" cd "$root" +# Preflight: a standalone build needs Chez's kernel dev files (libkernel.a + +# scheme.h) and a C compiler. A distro chezscheme package ships neither, so on +# such hosts (CI included) skip — like `certify` skips without Clojure. Pin the +# csv dir we validate so the build uses exactly it. +csv="$JOLT_CHEZ_CSV" +if [ -z "$csv" ]; then + chez_bin="$(command -v chez || command -v scheme || command -v petite || true)" + if [ -n "$chez_bin" ]; then + base="$(cd "$(dirname "$chez_bin")/.." 2>/dev/null && pwd)" + for d in "$base"/lib/csv*/*/; do + [ -f "${d}libkernel.a" ] && csv="${d%/}" && break + done + fi +fi +if ! command -v cc >/dev/null 2>&1 || [ -z "$csv" ] || [ ! -f "$csv/scheme.h" ] || [ ! -f "$csv/libkernel.a" ]; then + echo "build smoke: skipped (Chez kernel dev files or C compiler not available)" + exit 0 +fi +export JOLT_CHEZ_CSV="$csv" + app="$root/test/chez/build-app" out="$(mktemp -d)/app-bin" trap 'rm -rf "$(dirname "$out")"' EXIT