Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Continuous integration

Workflows are in .github/workflows/.

pr.yml (pull requests), on GitHub's runners:

JobDoes
pythonuv run lint: ruff, ruff format, strict mypy, pytest (which includes the book's link and screenshot-index tests)
bookbuilds this handbook with mdbook build docs, so a broken chapter or SUMMARY.md fails the PR
wasmuv run port setup and uv run port build web: the decompiled game compiles for WebAssembly (needs only the source)
regressionsuv run extract-game, toolchain setup, match, match-data: every recorded match still matches, and the data still matches. Needs the game CD and the Borland CD, so it runs on a self-hosted runner labelled zbtools-data

main.yml (pushes to main):

  • Deploys the port (uv run port package) to Cloudflare Pages with wrangler-action, on a GitHub runner (it needs only the repository). Secrets: CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID; variable CLOUDFLARE_PAGES_PROJECT.
  • Deploys this handbook (mdbook build docs, output build/book/) to a second Cloudflare Pages project, with the same two secrets and the variable CLOUDFLARE_DOCS_PAGES_PROJECT.
  • Runs uv run report on the self-hosted runner and uploads it as an artifact. The report contains the game's disassembly, so keep the repository private.

The self-hosted runner

The jobs that need the bring-your-own files run on a runner labelled zbtools-data, with ZBTOOLS_DATA in its environment pointing at a directory holding the files that would be in data/ (the workflow symlinks it), plus 7-Zip, Wine and JDK 21. They are skipped until the repository variable GAME_DATA_RUNNER is true.