ludic/tools/x
Orkuncakilkaya 1c1192e7c0
All checks were successful
bootstrap / cfree-fixpoint (push) Successful in 21s
ci / build-and-test (push) Successful in 49s
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>
2026-08-30 23:23:23 +03:00
..
build.ludic chore(repo): DX cleanup — categorise examples, text-diffable golden, build/ output (#27 #28 #30) 2026-08-30 18:54:21 +03:00
main.ludic chore(repo): DX cleanup — categorise examples, text-diffable golden, build/ output (#27 #28 #30) 2026-08-30 18:54:21 +03:00
prelude.ludic ci: add build + test + bootstrap-cfree workflows for the Forgejo runner 2026-08-30 23:23:23 +03:00
selfhost.ludic feat(stdlib): add Fs.* / Path.* / Mime.* — filesystem, paths, content types (#10) 2026-08-30 22:43:50 +03:00
selfhost_test.ludic ci: add build + test + bootstrap-cfree workflows for the Forgejo runner 2026-08-30 23:23:23 +03:00
test.ludic ci: add build + test + bootstrap-cfree workflows for the Forgejo runner 2026-08-30 23:23:23 +03:00
tools.ludic ci: add build + test + bootstrap-cfree workflows for the Forgejo runner 2026-08-30 23:23:23 +03:00