Commit Graph
7 Commits
Author SHA1 Message Date
adamfandClaude Opus 5.5 7157c6649e CI: scratch directories per run, not per commit
Test and publish the site / test (push) Successful in 18s
Test and publish the site / publish (push) Successful in 8s
Test and publish the site / deploy (push) Successful in 1s
The build runner takes two jobs at once, so the same commit pushed to
two branches (main and a feature branch) ran its test job twice in
parallel against one src-<sha> directory, and each run's clean-up
deleted the other's source mid-test. Suffix the scratch directories
(and activity-tracker's throwaway Postgres and network) with the run id.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 16:14:45 +00:00
adamfandClaude Opus 5.5 1ec6fb4f5a CI: test and publish on the build VM, deploy on stpvm
Test and publish the site / test (push) Successful in 5m28s
Test and publish the site / publish (push) Successful in 3m28s
Test and publish the site / deploy (push) Successful in 27s
test and publish (build, smoke test, push) move to stpbuild's runner
(label `build`); the two roll-out steps become a deploy job on stpvm
(`self-hosted`). The fetch is over HTTP with the job's own GITEA_TOKEN.

Also fix the roll-out's working directory: /home/adamf/deploy/web_server
no longer exists on stpvm; the stack lives in /home/adamf/deploy/stpweb.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 16:00:13 +00:00
adamfandClaude Opus 5.5 5ed1e0b89d CI: fetch from git.adam-french.co.uk instead of localhost
Test and publish the site / test (push) Successful in 1m40s
Test and publish the site / publish (push) Successful in 2m41s
Gitea runs on its own LXC, and stpvm's localhost:2222 forwarder to it is
being removed. stpvm pins git.adam-french.co.uk to the LXC's LAN IP in
/etc/hosts, so the self-hosted job reaches it directly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 17:26:35 +00:00
adamfandClaude Opus 5.5 c972fa9fd9 Run and lint solutions on the site
Test and publish the site / test (push) Successful in 1m23s
Test and publish the site / publish (push) Failing after 4m22s
A new admin-only solve page, /p/<name>/solve, edits a problem's code in
C++ or Python (a dropdown switches between them), runs it on custom
input or against the saved tests with per-test verdicts (AC, WA, RE,
TLE, unchecked) and compile errors, marks lint diagnostics in the
editor, and saves the code back as a commit ("Edit <name>"). Drafts
stay in the browser per problem and language until saved. LeetCode
problems are C++ only, since their tests run through driver.h.

Code never runs in the site, which holds the Claude, Gitea and S3
secrets. A separate runner service (cmd/usacorunner, Dockerfile.runner)
does it in a container meant to have no environment, an internal-only
network, a read-only root apart from /tmp, and memory, CPU and pids
limits, with tini to reap orphans. Runs copy the CLI: the same g++
flags with -DLOCAL and the repo's headers, <io>.in on disk and on
stdin, <io>.out or stdout as the output, and usaco test's comparison.
Unlike the CLI they have CPU, memory, file and wall-clock limits.

C++ lint is g++'s warnings plus clang-tidy with a new .clang-tidy
(bugprone, performance and a few readability checks; template.cpp is
clean). Python lint is a syntax check plus ruff. template.py is the
Python starter, with a stdio() helper like template.rs's.

CI builds, smoke-tests and rolls out the runner image before the site.
The web_server stack needs a usaco-runner service before that rollout
can succeed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 11:24:22 +01:00
adamfandClaude Opus 5.5 f0e10d2a58 Roll out under .compose.lock and drop the Docker API pin
Test and publish the site / test (push) Successful in 11s
Test and publish the site / publish (push) Successful in 3s
env-apply was removed from web_server, so its run/lock no longer exists
and the roll-out step failed with "cannot open lock file". Take
.compose.lock, which web_server's deploy and maintenance workflows hold.
The DOCKER_API_VERSION=1.41 pin was for the Pi's Docker 20.10; the host
now runs Docker 29.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 18:07:36 +01:00
adamfandClaude Opus 5.5 3e2b52fdb2 Describe the CI host as stpvm, not the Pi
Test and publish the site / test (push) Successful in 1m29s
Test and publish the site / publish (push) Failing after 2s
The site and its runner moved from the arm64 Pi to stpvm (x86-64,
Docker 29), so the comments about the build host, its Docker version
and the image architecture were wrong.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 17:58:03 +01:00
adamfandClaude Opus 5.5 6d956f1c76 Add the website: Go server + Vue SPA in site/, with CI
A standalone container for web_server, shaped like job-tracker: serves
/usaco/ with solved problems public and solving/skipped plus edits
(status, link, notes) for the site admin. Git is the only store: the
server clones adamf/usaco from Gitea, pulls on the push webhook, and
commits edits back. CI builds the image only when site/ changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 21:51:34 +01:00