Cover -DAKBASIC_WITH_AKGL=ON in CI

A fifth push job, akgl_build: the text sink and the graphics, audio and input
backends, plus the akgl_backends suite that drives them against a real software
renderer under the dummy video and audio drivers and reads the pixels back.

It stays a separate job rather than a flag on cmake_build because
AKBASIC_WITH_AKGL is off by default and that default is the claim being made:
the interpreter and its whole 70-case suite build and pass on a machine with no
SDL. Keeping the two jobs apart proves that on every push instead of asserting
it.

Deferring this assumed it needed submodules: recursive and a long build. Both
guesses were wrong, and measurement is the only reason we know:

- Recursive is not needed and costs 461 MB. It descends into SDL_image/external,
  SDL_mixer/external and SDL_ttf/external -- aom, dav1d, libjxl, libtiff,
  mpg123, opus, flac and a dozen more -- and not one of them is used. Every one
  configures as "Could NOT find". Six submodules initialised non-recursively
  take about 25 seconds instead.
- The build is roughly a minute of CPU across 330 object files, because SDL3
  compiles out almost every backend that is not wanted here.

The one real system dependency is libfreetype-dev and libharfbuzz-dev. SDL_ttf
reports "Using system freetype library" and links libfreetype.so.6; without them
it would reach for deps/SDL_ttf/external/freetype, which the checkout
deliberately does not clone. Two apt packages against two more submodules.

Every step was run verbatim from a clean clone before being written down --
checkout, submodule init, configure, build and test -- rather than inferred from
the working tree. 71/71.

Also corrects three counts elsewhere in the file that had gone stale: the suite
is 70 cases rather than 61, line coverage is 93.5% rather than 92.3%, and branch
coverage reads 18% rather than 17%. Those numbers are assertions about the gate,
so a wrong one is worse than none.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-31 09:06:24 -04:00
parent ff7bec9f55
commit f7511678b8
2 changed files with 110 additions and 11 deletions

24
TODO.md
View File

@@ -798,7 +798,7 @@ entire test corpus and passes clean under ASan and UBSan.
| Gate | Result |
|---|---|
| `ctest` | 70/70 — 41 upstream golden cases, 5 local ones, 21 unit tests, 2 embedding examples, 1 known-failing |
| `ctest` with `-DAKBASIC_WITH_AKGL=ON` | 71/71 — the above plus `akgl_backends` |
| `ctest` with `-DAKBASIC_WITH_AKGL=ON` | 71/71 — the above plus `akgl_backends`; the `akgl_build` CI job |
| Golden corpus | 41/41 byte-exact, driven in place from the submodule |
| ASan + UBSan | 70/70 |
| Line coverage | 93.5% (3631/3884) — above the 90% gate |
@@ -880,11 +880,23 @@ What remains, in priority order:
2. **A line editor for the akgl sink.** `readline` reports EOF, so `INPUT` does not work
through a drawn text layer. It wants the keystroke ring plus a cursor, and it is also what
`WINDOW` and `KEY` in group E need. See §3.
3. **CI does not cover `-DAKBASIC_WITH_AKGL=ON`.** Doing so needs `submodules: recursive`,
which pulls SDL, SDL_image, SDL_mixer, SDL_ttf and jansson — a long build on a job the other
four do not need. Deliberately deferred, not forgotten: the akgl target is built and tested
locally with the two commands in §3, and it will rot silently until somebody decides that
cost is worth paying.
3. ~~**CI does not cover `-DAKBASIC_WITH_AKGL=ON`.**~~ **Done** — the `akgl_build` job in
`.gitea/workflows/ci.yaml`. It turned out much cheaper than the deferral assumed, and the
two reasons are worth keeping because both were guesses that measurement corrected:
- **`submodules: recursive` is not needed and costs 461 MB.** It descends into
`SDL_image/external`, `SDL_mixer/external` and `SDL_ttf/external` — aom, dav1d, libjxl,
libtiff, mpg123, opus, flac and a dozen more — and *not one of them is used*. Every one
configures as "Could NOT find". The job initialises exactly six submodules
non-recursively instead, which takes about 25 seconds.
- **The build is about a minute of CPU, not "a long build".** 330 object files, because
SDL3 compiles out almost every backend that is not wanted here.
The one real system dependency is `libfreetype-dev` and `libharfbuzz-dev`: SDL_ttf prefers
the system copies and would otherwise reach for `external/freetype`, which the checkout
deliberately does not clone. Two apt packages against two more submodules is an easy trade.
Every step was verified from a clean clone before being written down, not inferred.
4. **§6 items 1217** — the defects the port uncovered. Item 12 is the one that produces a
*wrong answer* rather than a refused one, and should be fixed first.
5. **Mutation survivors in `src/value.c`.** The harness is in place (`scripts/mutation_test.py`,