ci-local.sh (1231 bytes)
1 #!/bin/sh 2 # ci-local.sh -- CI for the three public repos without a hosted CI service. It replays the 3 # jobs in a clean ubuntu:24.04 container: clone equwal/forthlisp, -stm32 and -z80 over https, 4 # install the toolchain from Ubuntu, run every test layer. Needs docker. 5 # Prints one summary line per job, then "CI: PASS" or "CI: FAIL". 6 docker run --rm ubuntu:24.04 sh -c ' 7 export DEBIAN_FRONTEND=noninteractive 8 apt-get update -qq >/dev/null && apt-get install -y -qq sbcl qemu-system-arm binutils-arm-none-eabi build-essential git ca-certificates >/dev/null || exit 1 9 cd "$HOME" && for r in forthlisp forthlisp-stm32 forthlisp-z80; do git clone -q https://github.com/equwal/$r || exit 1; done 10 rc=0 11 echo "repos: $(for r in forthlisp forthlisp-stm32 forthlisp-z80; do printf "%s@%s " $r $(git -C $r rev-parse --short HEAD); done)" 12 cd "$HOME/forthlisp" && { sbcl --script host.lisp compile prims.lisp >/dev/null && sbcl --script host.lisp compile demo.lisp >/dev/null && echo "core host: compile ok"; } || { echo "core host: FAIL"; rc=1; } 13 cd "$HOME/forthlisp-stm32" && { sh test.sh || rc=1; } 14 cd "$HOME/forthlisp-z80" && { sh build-emu.sh >/dev/null && sh test.sh || rc=1; } 15 [ $rc = 0 ] && echo "CI: PASS" || echo "CI: FAIL" 16 exit $rc 17 '