On this page
  1. Two images
  2. What frozen means here
  3. The manifest
  4. Checked before it is published
  5. How it is published
  6. A bump, step by step
    1. The Android bump: two repositories, in order
    2. The LLVM bump
    3. A new Ubuntu
  7. What moves in the framework after a bump
  8. The Alpine run image
  9. Keep a copy

The build image

One image carries the whole toolchain of every Linux, web and Android job, so that a job downloads nothing and a green run means the same toolchain built it as last time. It lives in its own repository, raylib-build-image, and the framework names it by digest. This page is how to keep it: what is in it, how a new one is made and published, and the order of every step that pins it.

Two images#

ImageBuilt fromRunsPinned in the framework by
ghcr.io/omardev29/raylib-buildDockerfile, with python/, smoke/ and verify/; workflow docker-image.yamlevery Linux, web and Android job, the framework's own jobs, this site's CI; amd64 and arm64build_image_digest
ghcr.io/omardev29/raylib-run-alpinealpine/; workflow alpine-image.yamlthe musl build, started on Alpine; amd64 onlyrun_alpine_digest

The two workflows never rebuild each other: a change under alpine/ publishes only the Alpine image, a change to the rest only the build image.

What frozen means here#

LayerPinned by
The baseubuntu:24.04 by digest, the UBUNTU_DIGEST argument
Every apt packageevery source rewritten to snapshot.ubuntu.com at APT_SNAPSHOT, so an install resolves to the same bytes on any day
Every downloada sha256 beside its version: CMake, Ninja, zig, UPX, butler, actionlint, Mull, the Android command-line tools
Emscriptenemsdk fetched by commit, EMSDK_COMMIT, never by tag
The Python test toolsthe hash lock (Python)
The Gradle homewarmed by building the framework at GRADLE_WARM_COMMIT, and proven offline before the image is published

Every version is an ARG at the top of the Dockerfile: one place to bump. Rebuilding the same Dockerfile gives the same contents, but not the same digest — the image records when it was built — which does not matter, because the framework pins the digest of the one that was published and verified.

The manifest#

The image writes /etc/raylib-build-image.json: every pinned version, and the architecture. The versions of what came from apt or pip — LLVM, cppcheck, Mull, the Python test tools — are read from the installed tool, not copied from an argument, so the manifest says what is in the image. Every container job prints it first, so a red log says which toolchain produced it, and tools/versions_check.sh, run inside the image, compares it with the framework's versions block: a framework that asks for an SDK the image does not have fails there, not twenty minutes into Gradle.

Checked before it is published#

Two checks, and each has to do the job of the tool, not print its version:

  • The smoke check, a step of the Dockerfile itself, invokes every tool a CI job invokes. From smoke/ it builds, runs, merges and reports a profiled binary; makes cppcheck refuse an out-of-bounds write and accept clean C++20; has ASan, UBSan and LSan each stop the mistake it exists for; runs libFuzzer for a hundred runs; makes Mull report the one mutant smoke/mull.c leaves alive; and makes mutmut kill the one mutant only a Hypothesis property can kill. A broken image fails to build.
  • The verify script, verify/image.sh, runs in the image that was just built, on a runner of its own architecture, and checks the manifest's architecture is the one asked for.

The architectures are not the same image: arm64 has no Android SDK, no riscv64 libraries, an empty Gradle home, and no actionlint or butler, because the NDK's host tools are x86-64 only and those jobs run on amd64. The manifest leaves those keys out on arm64 rather than fake them.

How it is published#

Event in the image repositoryWhat happens
A pull requestboth architectures built and verified, nothing pushed
A manual run on a branch other than mainthe same: built, verified, nothing pushed — not even :latest, which the canary floats to
A push to main that changes the Dockerfile, python/, smoke/, verify/ or the workfloweach architecture built on a runner of its own (ubuntu-24.04, ubuntu-24.04-arm), pushed by digest, pulled back and verified at that digest; then one job makes the multi-architecture list of the two, checks it holds exactly those two, tags it with the commit, only then moves :latest, and writes the list's digest to the run's summary

The layer cache goes to a registry tag, :buildcache, not to the Actions cache: the image is around ten gigabytes, past what a repository's Actions cache holds. Both packages must stay public: the framework's jobs, and the jobs of every game made from it, pull them with their own token.

A bump, step by step#

Any change to the image — a newer tool, a new package, a newer snapshot — goes the same way.

  1. In the image repository, change the ARG (and its sha256), on a branch. For a new apt package, add it to the install list; for a new snapshot, change APT_SNAPSHOT, and check the two Python pins apt owns (the lock).
  2. Build it on the branch with a manual run: both architectures built and verified, nothing published. Or build it locally:
    docker build -t raylib-build .
    docker run --rm -e EXPECT_ARCH=amd64 -v "$PWD/verify:/verify:ro" raylib-build bash -l /verify/image.sh
  3. Try the framework in it before publishing: in a checkout of the framework, the whole ladder in the local image (a checkout of its own), with tools/versions_check.sh told nothing yet — it will report the drift you are about to fix, which proves it is reading the new manifest.
  4. Merge to the image repository's main. The workflow publishes, and the summary of that run gives the list's digest. Never pin :latest; never pin the digest of one architecture's image.
  5. In the framework, on a branch, replace the digest everywhere it is written and change every key that moved:
    OLD=$(sed -nE 's/^build_image_digest +//p' thirdparty/FROZEN_VERSIONS.md)
    NEW=sha256:...    # from the image run's summary
    grep -rl "$OLD" .github/workflows thirdparty/FROZEN_VERSIONS.md | xargs sed -i "s/$OLD/$NEW/g"
    bash tools/versions_check.sh
    The digest is in ci.yml (PINNED_IMAGE), in web-backends.yml, three times in deep.yml — a job's container: cannot read a variable — and in thirdparty/FROZEN_VERSIONS.md; tools/versions_check.sh fails while any two disagree. This site follows by itself: its CI reads the image from the framework's ci.yml at FRAMEWORK_REF.
  6. Run what the image is exact about, in the new image: rmp test, rmp test examples, rmp test coverage, and the size lines from a release build. What moves says what to expect.
  7. The pull request says what moved in the image, what moved in the framework because of it, and what was re-recorded. Once the image repository's verify workflow is green on both architectures, the pull request that pins an image a card of the plan builds merges on a review by an agent that did not write it (CLAUDE.md, "What does not wait for him").

The Android bump: two repositories, in order#

The image's Gradle home is warmed by building the framework's Android project at GRADLE_WARM_COMMIT, and the Android job builds offline from it. So a change to Gradle, AGP, the SDK levels or AdMob's version needs a framework commit that the image is built from, and an image the framework then pins:

  1. In the framework, on a branch: the new set in raymob/app/build.gradle, raymob/build.gradle and raymob/gradle/wrapper/gradle-wrapper.properties (with the wrapper's sha256), and the same values in the versions block. Push it. The Android job of that branch fails offline, because the image does not have the new dependencies yet; that is expected.
  2. In the image repository: GRADLE_WARM_COMMIT set to that commit, and the SDK, NDK and build tools arguments set to the same values. The build warms the home from it, with AdMob on and off, and proves both builds offline from a clean tree before it can publish.
  3. Publish, take the digest, and pin it on the same framework branch. Its Android job is green now, and tools/versions_check.sh holds the framework's Gradle files, its versions block and the image's manifest to one set.

The warm commit has to stay fetchable for as long as anyone may rebuild the image: the build fetches it from the framework's repository by its full hash. A commit a pull request carries stays reachable on GitHub through the pull request's own ref, even after its branch is deleted; a commit of a branch pushed without one, and then deleted or rewritten, does not. Open the pull request before the image is built, or point the next image's warm commit at the merged commit on main.

The LLVM bump#

LLVM is held where it is by Mull, which is built for one LLVM release and refused by the image for any other (MULL_LLVM_VERSION). Moving LLVM means a Mull for it, and the -18 in the names of the tools the Dockerfile, the manifest step and the framework's coverage and mutation scripts call — llvm-config-18, mull-runner-18, the clang plugin's path. If no Mull exists for the LLVM wanted, the choice is between keeping LLVM and dropping mutation of the C++ from the image; that is Omar's.

A new Ubuntu#

The largest bump: the base digest, the snapshot, the package names that changed between releases, the two Python pins apt owns, the system compilers, and the ubuntu key — which the manifest step writes as a literal, not from an argument. The image's Python moves with it, so the lock is regenerated. Do it alone, in its own pull request, with a full matrix after.

What moves in the framework after a bump#

Changed in the imageWhat can go redWhat to do
GCC or Clangnew warnings (the framework builds its checks with warnings as errors); the e2e shots and the render hash, if the code generation changed a floatfix the warning in the code; a moved shot is re-recorded in the image with rmp test e2e-update, every picture looked at, and a moved golden needs behaviour-approved
zig, UPX, any compilerthe size budget, past 1.5 % a warning and past 10 % a failurethe new lines from the release run, tools/size_check.py --update, with the reason in the pull request
GCC's headersthe cost of each public header, tools/header_budget.txtthe new numbers from tools/header_cost.py, run in the image
LLVMthe coverage floors (another release counts lines differently) and the mutation floorsraise with tools/coverage_check.sh --update; a floor that has to come down is a hand edit a reviewer reads, never a script's
clang-format, clang-tidyfiles that were formatted, warnings nobody owedtheir own bump
Emscriptenthe web build, its size line, the web boot testa full web run, and the web size line
The Android setthe Android build, offlinethe Android bump
The apt snapshotany of the above at oncea snapshot bump is every package's bump: do it alone

The Alpine run image#

The musl build is started on Alpine, twice: the headless build, which renders the golden frame, and the archive a player downloads, under xvfb-run on Mesa's llvmpipe. The image is Alpine by digest with exactly those packages and nothing else — no compiler, no Python — and a small GLX program, built against the same Alpine, that opens every library GLFW opens, makes a context, insists the renderer is llvmpipe and reads two drawn pixels back. The build runs it, and alpine/verify/image.sh runs it again on the built image, with --init and no network as the framework runs it, before anything is published.

Its packages are not pinned to versions, because Alpine keeps one version per package per release branch and deletes the one it replaces; there is no snapshot service to point at. What CI runs is frozen by the digest. A rebuild installs whatever its branch has that day, and the image's /etc/raylib-run-alpine.json lists every installed package with its version, so two builds can be compared line by line.

It is pinned in two places, RUN_IMAGE in _linux.yml's musl-x64-run job and run_alpine_digest in thirdparty/FROZEN_VERSIONS.md, and tools/versions_check.sh fails while they disagree. A bump is a push to alpine/ on the image repository's main, which builds it, verifies it at its digest and only then tags it. Locally:

docker build -t raylib-run-alpine alpine/
docker run --rm --init --network none -e EXPECT_ARCH=amd64 \
    -v "$PWD/alpine/verify:/verify:ro" raylib-run-alpine sh /verify/image.sh

When the Alpine release it is built on stops getting fixes, move the base to a newer release by digest, and run the musl jobs; nothing else depends on which Alpine it is.

Keep a copy#

The published image is the toolchain. Rebuilding it depends on a dozen outside addresses still serving the same bytes — the Ubuntu snapshot above all — and some of them will not, one day. Keep every digest the framework has pinned in a place of your own: Ten years and more has the commands.