Skip to content

ci: add CI and release workflows - #1

Merged
0xLeif merged 2 commits into
mainfrom
ci/add-workflows
May 3, 2026
Merged

0xLeif merged 2 commits into
mainfrom
ci/add-workflows

Conversation

@0xLeif

@0xLeif 0xLeif commented May 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds .github/workflows/ci.yml — build + test on Linux/macOS/Windows, clippy with -D warnings, rustfmt --check
  • Adds .github/workflows/release.yml — cross-compile binaries on tag push, attach to GitHub release
  • Applies cargo fmt to make the lint job pass

Test plan

  • CI workflow runs green on this PR
  • Future tag push produces release artifacts for all 4 targets

🤖 Generated with Claude Code

Adds standard CI (build + test on linux/mac/windows, clippy, rustfmt) and
release (cross-compile + attach binaries to GH release on tag push).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@corvid-agent

Copy link
Copy Markdown

👋 CorvidAgent is looking into this.

@corvid-agent corvid-agent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good — clean CI/CD setup. A few minor observations:

CI (ci.yml)

  • The check job uses cargo build --release which is slower than a debug build. For CI purposes a plain cargo build would catch the same compilation errors faster. Reserve --release for the release workflow.
  • Lint-only-on-ubuntu is the right call since clippy/fmt results are platform-independent.

Release (release.yml)

  • No test step before building artifacts. If a tag lands on a broken commit, you'd ship broken binaries. Consider either adding cargo test before the build step, or requiring CI to pass on the tagged commit (e.g., via branch protection on main + only tagging from main).
  • x86_64-apple-darwin on macos-latest (ARM runner) relies on cross-compilation — should work fine since the target is explicitly installed via dtolnay/rust-toolchain, but worth a sanity check on the first release.

Source changes — purely cargo fmt, no logic changes. ✅

Overall solid. Approving — the suggestions above are minor improvements, not blockers.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request primarily focuses on code formatting within src/main.rs, including expanding the Kind::all array to multiple lines and condensing a timeout calculation and a test assertion into single lines. A review comment suggests using assert_eq! instead of assert!(matches!(...)) in the test suite to improve the clarity of error messages during failures.

Comment thread src/main.rs
game.board[(H - 1) as usize][0],
Some(Kind::T)
));
assert!(matches!(game.board[(H - 1) as usize][0], Some(Kind::T)));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In tests, using assert_eq! is generally preferred over assert!(matches!(...)) for simple equality checks. assert_eq! provides more descriptive error messages by displaying both the actual and expected values upon failure, which is particularly helpful when debugging CI failures in a headless environment.

Suggested change
assert!(matches!(game.board[(H - 1) as usize][0], Some(Kind::T)));
assert_eq!(game.board[(H - 1) as usize][0], Some(Kind::T));

CI runs clippy 1.95 which enables `collapsible_match`; locally the lint
was satisfied by older toolchains.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@0xLeif
0xLeif merged commit c68dc6c into main May 3, 2026
4 checks passed
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.

2 participants