check / check (push) Successful in 7m45s
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
20 lines
609 B
Bash
Executable File
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 "$@"
|