Skip to content

ci: move CI and release to GitHub Actions - #1

Merged
jiunbae merged 3 commits into
mainfrom
ci/github-actions-pipeline
Aug 25, 2026
Merged

ci: move CI and release to GitHub Actions#1
jiunbae merged 3 commits into
mainfrom
ci/github-actions-pipeline

Conversation

@jiunbae

@jiunbae jiunbae commented Aug 25, 2026

Copy link
Copy Markdown
Member

Why

The Actions tab is red and there is no test gate anywhere.

  • GitHub has no workflow files at all. The last run (v2026.4.5, May) failed and stayed red; its actions/upload-artifact@v3 steps can no longer succeed since v3 was shut down, so re-running it would fail again regardless.
  • The Gitea mirror's release workflow is healthy — v2026.7.23 published all four npm packages and three release tarballs successfully — but it only runs on tags. Nothing lints or tests ordinary commits, and the last 11 commits (all security fixes) landed unverified.
  • Those commits do not pass a quality gate today: cargo fmt --check fails and clippy -D warnings reports 28 violations.

What changed

Quality gate greencargo clippy --fix handled 27 mechanical lints (redundant closures, needless borrows, Iterator::last on a DoubleEndedIterator, io::Error::other), plus cargo fmt. persona::review keeps its 9 arguments, each mapping 1:1 to a CLI flag, with the lint allowed and a note. All semantics-preserving; 142 tests pass.

.github/workflows/ci.yml (push to main, every PR) — fmt, clippy -D warnings, tests, manifest version consistency, and a build + --version/--help smoke test on linux-musl and darwin-arm64.

.github/workflows/release.yml — the Gitea workflow ported to GitHub-hosted runners, with the breakage fixed along the way:

before after
artifacts upload/download-artifact@v3 (dead) v4
macOS build self-hosted macos-arm64 macos-latest (arm64 native)
Linux builds manual rustup + zig tarball install cargo-zigbuild, both musl targets
release upload ~100 lines of hand-rolled HTTP calls + jq gh release with the built-in token
missing NPM_TOKEN silently published nothing fails loudly
~/.npmrc default umask written under umask 077
duplicate tag runs possible concurrency group

Also added: verification that all three tarballs actually landed on the release.

scripts/check-versions.sh — the inlined awk version validation (~55 lines, duplicated per forge) extracted into one script both forges call.

.gitea/workflows/release.yml demoted to a manual fallback — its push trigger is removed. The mirror receives tags too, so leaving it on would have two forges publishing the same version concurrently.

make lint / make check-versions / make ci — the same gates, runnable locally.

Verification

  • actionlint (with shellcheck) clean on all three workflows
  • shellcheck scripts/check-versions.sh clean
  • make ci passes: fmt, clippy -D warnings, 142 tests, version consistency
  • NPM_TOKEN is already configured on this repo; no secret setup needed

release.yml cannot be exercised until a v* tag is pushed. It supports workflow_dispatch with dry_run=true for a build-only rehearsal first.

🤖 Generated with Claude Code

jiunbae and others added 3 commits August 25, 2026 11:05
Apply the fixes the new CI gate demands: `cargo clippy --fix` for the
27 mechanical lints (redundant closures, needless borrows, `Iterator::last`
on a DoubleEndedIterator, `io::Error::other`) plus `cargo fmt`.

`persona::review` keeps its 9 arguments — each maps 1:1 to a CLI flag —
so the too_many_arguments lint is allowed there with a note.

All changes are semantics-preserving; 142 tests still pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub had no workflows at all: the Actions tab was red from a May run
whose `actions/upload-artifact@v3` steps can no longer succeed, and no
test or lint gate existed on any forge — the last 11 commits landed
unverified.

- Add ci.yml: fmt, clippy -D warnings, tests, manifest version
  consistency, and a build + `--version`/`--help` smoke test on
  linux-musl and darwin-arm64.
- Add release.yml, ported from the Gitea workflow: artifact v3 -> v4,
  GitHub-hosted runners (macos-latest is arm64, both musl targets via
  cargo-zigbuild), and `gh release` in place of ~100 lines of hand-rolled
  HTTP upload calls. Missing NPM_TOKEN now fails loudly instead of
  publishing nothing, ~/.npmrc is written under umask 077, and a
  concurrency group keeps one tag from releasing twice.
- Extract the inlined awk version validation into
  scripts/check-versions.sh, shared by both forges.
- Demote .gitea/workflows/release.yml to a manual fallback. The mirror
  receives tags too, so leaving its push trigger on would race GitHub
  publishing the same version.
- Add `make lint`, `make check-versions`, and `make ci` so the same
  gates run locally.

Verified with actionlint (shellcheck included) and `make ci`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The first CI run failed clippy on a tree that was green locally: the
runner resolved `stable` to 1.98.0 while this machine had 1.94.0, and
1.98 stabilized `unnecessary_sort_by`, which fires on the descending
sort in `run::score_skills`.

Fix the lint, then remove the drift that hid it — rust-toolchain.toml
pins 1.98.0 with rustfmt and clippy, so `make ci` and the CI gate lint
with the same compiler. Bumping it is now a deliberate commit that has
to pass `make ci` first.

Workflows install the pinned toolchain via `rustup show` and add cross
targets to it; the Gitea fallback installs rustup with
`--default-toolchain none` so its build cannot silently use a floating
stable the pin would override. Cache keys include the toolchain file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jiunbae
jiunbae merged commit 536fae8 into main Aug 25, 2026
4 checks passed
@jiunbae
jiunbae deleted the ci/github-actions-pipeline branch August 25, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant