commit 3919360b6850fb73ea8fee937b9e7985626915a4 Spenser Truex <truex@equwal.com> 2026-10-04 09:12:01 +0000 CI: replace GitHub Actions with ci-local.sh, a clean-container runner
.github/workflows/ci.yml | 21 --------------------- README.md | 6 ++++++ ci-local.sh | 17 +++++++++++++++++ docs/build-docs.py | 3 ++- 4 files changed, 25 insertions(+), 22 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 54a1d42..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: ci -on: [push, pull_request] -jobs: - host: - # The host side alone: the host dialect compiles prims.lisp and demo.lisp to Forth. - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - run: sudo apt-get update && sudo apt-get install -y sbcl - - run: sbcl --script host.lisp compile prims.lisp - - run: sbcl --script host.lisp compile demo.lisp - stm32: - # The whole stack on the STM32F446 target in QEMU, with this core checked out beside it. - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: { path: forthlisp } - - uses: actions/checkout@v4 - with: { repository: equwal/forthlisp-stm32, path: forthlisp-stm32 } - - run: sudo apt-get update && sudo apt-get install -y sbcl qemu-system-arm binutils-arm-none-eabi - - run: cd forthlisp-stm32 && sh test.sh diff --git a/README.md b/README.md index 42eb482..6abd36a 100644 --- a/README.md +++ b/README.md @@ -79,3 +79,9 @@ Needs SBCL, `qemu-system-arm`, `arm-none-eabi-as`/`objcopy` (for the assembler t MIT (see `LICENSE`). `tests/r7rs/r7rs-tests.scm` is chibi-scheme's, under its BSD licence (`tests/r7rs/LICENSE`). + +## CI + +`ci-local.sh` (in the forthlisp core repo) runs every test layer of all three repos in a +clean `ubuntu:24.04` container. It runs after each publish, without a hosted CI service. +The last result is on https://dickt.store/forthlisp/. diff --git a/ci-local.sh b/ci-local.sh new file mode 100755 index 0000000..814969a --- /dev/null +++ b/ci-local.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# ci-local.sh -- CI for the three public repos without a hosted CI service. It replays the +# jobs in a clean ubuntu:24.04 container: clone equwal/forthlisp, -stm32 and -z80 over https, +# install the toolchain from Ubuntu, run every test layer. Needs docker. +# Prints one summary line per job, then "CI: PASS" or "CI: FAIL". +docker run --rm ubuntu:24.04 sh -c ' +export DEBIAN_FRONTEND=noninteractive +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 +cd "$HOME" && for r in forthlisp forthlisp-stm32 forthlisp-z80; do git clone -q https://github.com/equwal/$r || exit 1; done +rc=0 +echo "repos: $(for r in forthlisp forthlisp-stm32 forthlisp-z80; do printf "%s@%s " $r $(git -C $r rev-parse --short HEAD); done)" +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; } +cd "$HOME/forthlisp-stm32" && { sh test.sh || rc=1; } +cd "$HOME/forthlisp-z80" && { sh build-emu.sh >/dev/null && sh test.sh || rc=1; } +[ $rc = 0 ] && echo "CI: PASS" || echo "CI: FAIL" +exit $rc +' \ No newline at end of file diff --git a/docs/build-docs.py b/docs/build-docs.py index b7bd22e..efb6af7 100755 --- a/docs/build-docs.py +++ b/docs/build-docs.py @@ -239,7 +239,8 @@ def results_section(): ("3 Forth kernel words", "kernel-tests.txt", r"kernel tests: .*"), ("4 Scheme: chibi-scheme R7RS suite (pass / fail / skip / total)", "tests/r7rs/results.txt", r"r7rs suite: .*"), - ("4 Scheme: our own regression suite", "conformance.txt", r"conformance: .*")): + ("4 Scheme: our own regression suite", "conformance.txt", r"conformance: .*"), + ("CI: all three public repos in a clean ubuntu:24.04 container", "ci-summary.txt", r"CI: .*")): m = re.search(pat, read(f) or "") if m: rows.append([esc(layer), code(f), esc(m.group(0))])