buildsmoke: skip when the Chez build toolchain is absent
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.
This commit is contained in:
parent
35a854eca1
commit
a2146c0f0d
1 changed files with 20 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue