The corpus job scores the pinned-rev corpus (cached at ~/.cache/lucisv-corpus on the runner, fetched once on a miss) on every push and fails below scripts/corpus-baseline (813) or on any verification error / crash. The release workflow now runs tools/audit_artifacts.sh before publishing: musl must be fully static, linux-gnu's glibc ceiling must stay <= 2.28 (RHEL 8), every file must be the object format its name claims — verified against the 10 real v0.7.1 release binaries. Linux execution under Docker was considered and declined: no container runtime on the runner. Version 0.7.2 with a changelog covering this, the printer column fix and the README truth pass. Co-Authored-By: Claude Fable 5 <[email protected]>
102 lines
5.0 KiB
Markdown
102 lines
5.0 KiB
Markdown
# ci-release
|
|
|
|
## Goal
|
|
|
|
Automate the checks and the release. Every push to master runs the three
|
|
checks CLAUDE.md requires (fmt, clippy, test) on Gitea Actions; every tag
|
|
`vX.Y.Z` builds the full cross-platform artifact set (Apple Silicon +
|
|
x86_64 macOS, static-musl and RHEL 8-compatible Linux, Windows — both
|
|
binaries each — plus the `.vsix` and `SHA256SUMS`) and publishes a Gitea
|
|
release whose notes are the CHANGELOG section for that version. The point
|
|
is that a release is one `git tag` + `git push` and cannot ship without
|
|
green checks, matching versions, and written notes.
|
|
|
|
## Assumptions
|
|
|
|
- The runner is `mac-arm64`: this development Mac, registered instance-wide
|
|
against https://git.luci.ooo with labels `macos-arm64`/`self-hosted`,
|
|
running in **host mode** (no containers) as a Homebrew service
|
|
(`brew services start gitea-runner`; config
|
|
`/opt/homebrew/etc/gitea-runner/config.yaml`, state and job workdirs
|
|
under `/opt/homebrew/var/lib/gitea-runner`). Everything
|
|
`tools/release.sh --cross` needs (rustup targets, mingw-w64, the
|
|
messense linux-gnu toolchain, node) is already installed per
|
|
`tools/RELEASING.md`; the workflows install nothing.
|
|
- One runner, capacity 1: CI and release jobs queue rather than race. A
|
|
release build and a local `cargo build` can still contend for the
|
|
machine; acceptable on a solo project.
|
|
- The corpus is not in the repository; CI scores it from a pinned-rev
|
|
cache on the runner host (`~/.cache/lucisv-corpus`, fetched once by
|
|
`tools/corpus_fetch.sh` on a miss) and gates on
|
|
`scripts/corpus-baseline` via `scripts/corpus_gate.sh`.
|
|
- `secrets.GITHUB_TOKEN` is auto-provided by Gitea Actions with rights to
|
|
create releases and attach assets on this repo.
|
|
- Release notes are written by hand (by the lead/Claude, specific to the
|
|
changes) into `CHANGELOG.md` *before* tagging; CI publishes, it does not
|
|
compose. A missing section fails the release on purpose.
|
|
|
|
## Handshakes
|
|
|
|
- Consumes `tools/release.sh --cross` unchanged: artifact names
|
|
(`lucisv[-server]-<version>-<triple>[.exe]`, `lucisv-<version>.vsix`,
|
|
`SHA256SUMS`) and the version-from-binary convention.
|
|
- Consumes `CHANGELOG.md`'s heading convention: `## <version> — <date>`;
|
|
`tools/release_notes.sh` keys on the second word of `## ` headings.
|
|
- `tools/publish_release.sh` expects the GitHub-compatible CI environment
|
|
(`GITHUB_SERVER_URL`, `GITHUB_REPOSITORY`, `GITHUB_TOKEN`,
|
|
`GITHUB_REF_NAME` via the workflow) and jq + curl on the runner.
|
|
- Promises to the release checklist (`tools/RELEASING.md`): the tag must
|
|
equal `v` + the workspace version, and the CHANGELOG section must exist,
|
|
or the workflow fails before publishing anything.
|
|
|
|
## Status / TODO
|
|
|
|
- [x] Runner installed (`brew install gitea-runner`), registered
|
|
(`mac-arm64`), running as a service.
|
|
- [x] `.gitea/workflows/ci.yml` — fmt/clippy(-D warnings)/test on every
|
|
master push and PR.
|
|
- [x] `.gitea/workflows/release.yml` — tag → cross build → version check →
|
|
notes extraction → release with assets.
|
|
- [x] `tools/release_notes.sh` (+ missing-section failure path tested),
|
|
`tools/publish_release.sh` (get-or-create, skip-attached re-run safety).
|
|
- [x] End-to-end verification with a real tag (v0.7.1).
|
|
- [x] Corpus score as a CI gate (`corpus` job: cached corpus +
|
|
`scripts/corpus_gate.sh` against `scripts/corpus-baseline`; regression,
|
|
verification error or crash fails the push).
|
|
- [x] Release-time artifact audit (`tools/audit_artifacts.sh`: musl
|
|
static-ness, linux-gnu glibc ceiling <= 2.28, PE/Mach-O file types) —
|
|
automates what RELEASING.md documented as manual; Linux/Windows binaries
|
|
remain audited, never executed (no such machine in the loop, and no
|
|
container runtime on the runner).
|
|
- [ ] A second runner on a non-macOS host, if native-built (rather than
|
|
cross-built) Linux artifacts are ever wanted.
|
|
|
|
## Work log
|
|
|
|
- 2026-08-26 — lead. Installed and registered the runner (one-time
|
|
instance token from the owner), wrote both workflows and both scripts,
|
|
smoke-tested `release_notes.sh` on the present-and-missing paths.
|
|
Decisions: host mode over docker (the cross toolchain lives on this Mac
|
|
and macOS jobs can't be containerized anyway); notes extracted from
|
|
CHANGELOG.md rather than generated in CI (the owner wants specific,
|
|
written notes — composing them is the lead's job at tag time, publishing
|
|
is CI's); a hard failure on tag/version mismatch or missing notes rather
|
|
than a fallback body. Version bumped to 0.7.1 and released end-to-end as
|
|
the verification.
|
|
|
|
- 2026-08-26 — lead (round 2, after external review). Added the corpus
|
|
gate job and the release artifact audit; both tested before landing (the
|
|
gate against the local corpus at exactly the 813 baseline, the audit
|
|
against the 10 downloaded v0.7.1 release binaries — all pass). Docker
|
|
was considered for executing the musl build's tests on Linux and
|
|
rejected: no container runtime exists on the runner Mac, and installing
|
|
a VM stack is an owner decision, not a CI increment.
|
|
|
|
## QA log
|
|
|
|
_(no QA round — infrastructure, verified by the live v0.7.1 run; see work log)_
|
|
|
|
## Review
|
|
|
|
_(reserved)_
|