ci: add build + test + bootstrap-cfree workflows for the Forgejo runner
Until now the only workflow was docs.yml — nothing gated a change on the compiler even building, on `x test` / `x test-tools`, or on the headline C-free self-rebuild reproducing the seed. Add two Forgejo Actions workflows on the same `docker` runner the docs job uses. The toolchain is macOS-first: the self-hosted compiler emits the Darwin libc standard-stream globals (`__stdoutp`/`__stderrp`), the one thing that stops its IR from linking on Linux. Everything else is portable — clang-16 assembles the seed cleanly and the C-free bootstrap reproduces it byte-for-byte on Linux too. So rather than require a macOS runner (none is registered), bridge that single gap with a tiny **C-free LLVM-IR shim** (tools/ci/linux_stdio_shim.ll) that defines the Darwin-named globals over glibc's stdout/stderr, injected into every clang link via LUDIC_CC. The language keeps its no-C-compiler guarantee. Workflows: - ci.yml — bootstrap the toolchain from the seed, then `x test` + `x test-tools` + the docs-cover-the-implementation checks, on push to main and PRs. - bootstrap.yml — `x bootstrap-cfree`: assert the seed rebuilds itself byte-for-byte (returns non-zero on drift). Make the suites host-aware so a Linux run is green without hiding anything: a new is_darwin()/skip() pair (tools/x/prelude.ludic) makes the cases that are genuinely macOS-ABI bound — the Cocoa-windowed `ludicc -o` link, the golden render hashes (blessed on macOS; text raster differs by a hair elsewhere), the Os known-folder/uname surface, Fs.list and the LSP workspace walk (both read the BSD dirent layout) — print a visible `skip` off Darwin instead of failing. On macOS every one of them still runs: suites stay 56 / 29 / 29 green there, and run 51 / 28 (+skips) on Linux, bootstrap-cfree byte-identical on both. The formatting gate is ludic-fmt *idempotence* (already in `x test-tools`), not `fmt(x) == x`: this codebase deliberately preserves hand alignment, so a strict "already formatted" check would fight that contract. A prebuilt CI image with clang-16 + python3 baked in is the obvious follow-up speed-up (ties into the packaging work in #33). Closes #32 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ac1e8d157d
commit
1c1192e7c0
7 changed files with 208 additions and 8 deletions
|
|
@ -125,6 +125,18 @@ function check(label: pointer, got: pointer, want: pointer) -> void {
|
|||
else { bad2(label, `expected [{want}] got [{got}]`) }
|
||||
}
|
||||
|
||||
# ---- host platform ----------------------------------------------------------
|
||||
# A few cases exercise macOS-specific runtime ABI — Cocoa windowing, the BSD
|
||||
# utsname/dirent layout — or compare against renders blessed on macOS. The
|
||||
# self-hosted compiler and its C-free bootstrap are host-neutral (they produce
|
||||
# byte-identical IR on any host), so the bulk of the suite runs anywhere; only
|
||||
# these platform-bound cases are skipped — visibly, never silently — when the
|
||||
# suite runs off Darwin. That lets a Linux CI runner gate every portable
|
||||
# guarantee without red from the parts that are macOS-only today.
|
||||
function host_os() -> pointer { return capture_line("uname -s") }
|
||||
function is_darwin() -> bool { return host_os() == "Darwin" }
|
||||
function skip(msg: pointer) -> void { print(` skip {msg}`) }
|
||||
|
||||
# print the "== N passed, M failed ==" footer and return the process exit code
|
||||
function report() -> int {
|
||||
print("")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue