ci(tpagectl): add CI pipeline and cross-platform builds #613
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/thwap-pagesd!613
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/tpagectl-pipeline"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Implements Phase 8 CI pipeline (roadmap #293).
.forgejo/workflows/ci.ymlnow triggers onpush(all branches) as well aspull_request; the "Check for Go changes" gate is event-aware (PR → diff vs base; push → always runs). The test job additionally buildscmd/tpagectland enforces the ≥80% tpagectl coverage gate (from #287).tpagectl+thwap-pagesdfor linux/darwin/windows on amd64/arm64 (CGO_ENABLED=0, version ldflags for tpagectl), uploading artifacts viaactions/upload-artifact.release.ymlexpands the matrix to linux/darwin/windows/freebsd/openbsd × amd64/arm64, builds both binaries (tpagectl carries-X main.version/commit/datefrom the tag), and publishes all to the Forgejo release.Why
Roadmap task #293, the last item in Phase 8.
Testing
linux/darwin/windows/freebsd/openbsd× amd64/arm64, CGO_ENABLED=0)go test -race ./...,golangci-lint, pre-commit clean (workflows can't be executed locally)Breaking Changes
None (CI-only changes).
Notes
CI enforces the tpagectl coverage gate (≥80%) introduced in #287. The release matrix keeps freebsd/openbsd alongside the roadmap's linux/darwin/windows.
Closes #289
Closes #290
Closes #291
Closes #292
Closes #293
Clean CI pipeline. The event-aware "Check for Go changes" gate (push → always, PR → 3-dot diff vs base with the base branch fetched) is correct, the test job runs
-racewith-covermode=atomicplus vet/gofmt and inlines the ≥80% tpagectl coverage gate consistently withmake coverage, and the cross-build matrices (6 CI + 10 release targets,CGO_ENABLED=0, tag-derived-X main.version/commit/dateldflags) are sound. Approving; one release-quality suggestion filed.Suggestions
.forgejo/workflows/release.yml(and the CI build job) – Windows artifacts are named without.exe. Append.exeformatrix.os == 'windows'in both matrices. Filed as #614.Questions
darwinbuilds useCGO_ENABLED=0, but the macOS Keychain backend (go-keychain) is cgo-based; a no-cgo darwin binary may compile yet lack a functional keychain backend, degrading to the documented 0600 config fallback. Confirming that's acceptable.on: push:(all branches) pluspull_requesttriggers CI twice on PR branches — redundant but harmless.action-gh-releasevia full GitHub URL requires runner egress to github.com; consistent with the existing GitHub-hosted actions, worth keeping in mind for the LAN instance.Praise
push/pull_requestgate duplication is handled cleanly with the event-name branch, andfetch-depth: 0makes the diff reliable.main.version/commit/date.New commits pushed, approval review dismissed automatically according to repository settings
Reworked the CI/release to use the org's reusable Forgejo actions instead of hand-rolled docker/matrix logic (commit
e8e10ec):thwap-actions/golang-releasereplaces the manual cross-platform matrix inci.yml(tpagectl for linux/darwin/windows/freebsd/openbsd × amd64/arm64; artifacts only, no release without a token) and drivesrelease.ymlfor bothtpagectlandthwap-pagesdwith the tag version +github.token, uploading binaries and checksums to the Forgejo release.thwap-actions/docker-buildreplaces any docker-in-CI concerns: a newdockerjob builds thethwap-pagesdimage from the repo Dockerfile (linux/amd64+arm64) on PR/main, and pushes togit.lan.thwap.org/thwap/thwap-pagesdon main whenTHWAP_REGISTRY_USER/THWAP_REGISTRY_PASSare configured.Test/lint jobs are unchanged. Verified locally that the exact
golang-releasebuild command compiles from./cmd/tpagectland that the workflow YAML passes pre-commit.Re-review at
e8e10ec. The rework to the org's reusable LAN-hosted actions (thwap-actions/golang-release,thwap-actions/docker-build) is an improvement: it replaces the hand-rolled matrices, adds a multi-arch Docker build, builds/releases both binaries across 10 platforms, and drops the earlier github.com-egress concern for releases. Test/lint jobs and the ≥80% coverage gate are unchanged and correct. Approving; one pipeline-hygiene suggestion filed.Suggestions
.forgejo/workflows/ci.yml/release.yml– The reusable actions are referenced at mutable@mainrefs. Pin to an immutable release tag (@v1) so CI/release behavior is reproducible and not silently changed by updates to those branches. Filed as #615.Notes
main.version+main.commitbut no longermain.date, sotpagectl versionreportsbuilt: unknownin releases (the pre-rework version injected the tag timestamp).dockerjob runs on every push to every branch with no "Check for Go changes" gate — it builds the multi-arch image even for docs-only pushes..exeextension) is now delegated togolang-releaseinternals — confirm the action names Windows artifacts appropriately, otherwise it stands.Praise
vars/secretsonly on main pushes, keeping fork/PR builds push-free.push/pull_requestevent-aware Go-changes gate remains correct across all jobs.