Files
pixa/script/cibuild
T
clawbot 0cef03d3a5
check / check (push) Successful in 7m45s
Run the checks on every script/cibuild and script/docker build (closes #101)
Both scripts pass a new CHECK_EPOCH, which the Dockerfile's make
fmt-check, make lint and make test steps name in their commands. On an
unchanged tree Docker used to serve those steps from its build cache, so
a run could pass without checking anything. The script/bootstrap steps
stay cached. A plain docker build . still works, as upaas builds the
image that way: it leaves CHECK_EPOCH empty and reuses the check steps
only for an identical build context.

Model: opus-5-5
2026-10-03 15:53:10 +00:00

20 lines
609 B
Bash
Executable File

#!/bin/sh
# script/cibuild: run the CI build. The Dockerfile runs the checks
# (make fmt-check, lint, test) as build steps. This script passes a new
# CHECK_EPOCH on every run, so Docker runs those steps instead of
# reusing cached results: a successful run means the checks passed on
# this tree. A plain `docker build .` can reuse them and proves nothing
# by itself. Generic: needs no adaptation. The Gitea workflow runs this
# on push.
set -eu
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
main() {
cd "$ROOT"
epoch="$(date +%s)$$"
docker build --build-arg CHECK_EPOCH="$epoch" .
}
main "$@"