Skip to content

Every repository has a Builds tab that runs declared make targets
inside short-lived containers, streams the output live to the browser,
and publishes the resulting artifacts for download. Builds run on the
application host in a small Debian and Python container with make,
a C compiler, and Python installed.

Open /repos/{name}/build, pick steps, and press Start build. Only
members with write access can start. Steps run in Makefile order, each
in its own container, and the page follows the output live with per-step
marking. While a build runs, the Builds tab shows a pulsing dot.

Pushes start builds too. New repositories build each pushed
branch right after the push lands, over HTTP and over SSH; untick
"Build every pushed branch automatically" in the repository settings
to opt out. Pushes that arrive while a build of the same repository
runs are skipped quietly, and so are pushes whose branch has no build
targets.

One build runs per repository at a time. The server runs at most two
builds at once across all repositories; a third start is rejected with
429 and the page offers a one-click retry. Each build has a wall clock
limit of 30 minutes and each step a limit of 10 minutes, after which
the build stops as failed. Finished builds stay in the history for
30 days.

The build server reads the top-level Makefile (GNUmakefile first,
then makefile, then Makefile) at the built ref and collects every
target whose name starts with buildserver_. The suffix is the step
name, so buildserver_test shows as test. Discovery only reads the
file; nothing in it executes during discovery.

buildserver_lint:
	ruff check .

buildserver_test: buildserver_lint
	pytest -q

Per-step settings come from sibling variables named after the target:

Variable Meaning Example
buildserver_{step}_image Container image for this step gcc:14
buildserver_{step}_timeout Step limit in seconds 300
buildserver_{step}_network 1 requests container network 1
buildserver_{step}_artifacts Static artifact declaration path=dist/*.whl name=wheels when=always expire=90

The artifact declaration takes path (a file or glob under /out),
name (defaults to the file name), when (on_success, on_failure,
or always), and expire (retention in days). Network requests only
take effect for steps an administrator allowlisted; everything else
runs without network.

Three commands are available inside every build container for talking
back to the runner:

buildserver_fail "message" [code] fails the step with a clear
message, skips the remaining steps, and finishes the build as failed:

buildserver_migrate:
	./migrate || buildserver_fail "migration check failed" 2

buildserver_info key=value ... attaches string metadata to the build,
visible on the job and in the live stream:

buildserver_version:
	buildserver_info version=1.4.0

buildserver_artifact <path> [--name NAME] [--when WHEN] [--expire-in DAYS] registers files under /out for harvest when the
step ends:

buildserver_package:
	python -m build --outdir /out/dist
	buildserver_artifact /out/dist/*.whl --name wheels --when always

Only these commands drive build events; output that happens to look
like a build marker is harmless text.

Each published artifact becomes one immutable zip, stored by its sha256
checksum with a provenance sidecar recording the repository, commit,
and step. Downloads go through short-lived signed links valid one
hour. Artifacts expire after 30 days unless the step set another
retention or a writer toggles Keep; the latest successful set per
branch is always kept. Total artifact disk use is capped at 20 GB with
oldest-first eviction, and each build can publish at most 500 MB.

Reports are first-class: publish a junit XML file and its test summary
renders in the preview, and the same holds for Cobertura and lcov
coverage reports. Text and image entries preview inline below 10 MB;
larger entries offer a download link instead.

Build steps run untrusted repository content, so each step container
gets a read-only source checkout, a read-only root filesystem, no
network by default, and a writable scratch directory that is removed
afterwards. Repository secrets are never mounted into build containers.
Step output is capped, and runaway steps are killed after their
timeout.

15.6ms