Skip to content

feat: add CI checks and release workflows for antd daemon#20

Merged
jacderida merged 3 commits intomainfrom
feat/ci-release-workflows
Apr 8, 2026
Merged

feat: add CI checks and release workflows for antd daemon#20
jacderida merged 3 commits intomainfrom
feat/ci-release-workflows

Conversation

@Nic-dorman
Copy link
Copy Markdown
Collaborator

Summary

Adds two GitHub Actions workflows to gate antd daemon changes and automate release builds:

  • CI workflow (.github/workflows/ci.yml) — quality gate on PRs and pushes to main
  • Release workflow (.github/workflows/release.yml) — cross-platform binary builds on version tags

CI Workflow — ci.yml

Triggers: Push to main or PR, filtered to paths under antd/** (and the workflow file itself). Language SDK directories (antd-js/, antd-py/, etc.) do not trigger this — those are end-user libraries, not part of the daemon build.

Steps (in order):

  1. cargo fmt --check — enforce consistent formatting
  2. cargo clippy --locked -- -D warnings — lint with all warnings as errors
  3. cargo doc --locked --no-deps — verify rustdoc builds cleanly
  4. cargo test --locked — run all antd tests

All steps use --locked to enforce that Cargo.lock is in sync with Cargo.toml. If a contributor changes dependencies without updating the lock file, CI will fail rather than silently resolving different versions.

Protobuf: The antd daemon uses tonic-build to compile .proto files at build time. The workflow installs protoc via arduino/setup-protoc@v3.

ant-core dependency: antd depends on ant-core via a git dependency (WithAutonomi/ant-client), pinned by Cargo.lock. When someone runs cargo update -p ant-core, the resulting Cargo.lock change is itself a file under antd/, so the CI workflow triggers automatically — no special upstream detection needed.

Release Workflow — release.yml

Trigger: Push of a v* tag (e.g., v0.2.0).

Release process (following the same pattern as ant-ui):

  1. Bump version in antd/Cargo.toml
  2. Commit and push to main
  3. Push a version tag: git tag v0.3.0 && git push origin v0.3.0
  4. The release workflow triggers automatically

Build matrix:

Target Runner Artifact name
x86_64-unknown-linux-gnu ubuntu-latest antd-linux-amd64
aarch64-apple-darwin macos-latest antd-darwin-arm64
x86_64-pc-windows-msvc windows-latest antd-windows-amd64.exe

Output: Creates a GitHub Release with:

  • Release binaries for all three platforms
  • SHA256SUMS file for integrity verification
  • Auto-generated release notes (from commits since last tag)

What is NOT covered (intentionally)

  • Language SDKs (antd-js/, antd-py/, antd-go/, etc.) — these are HTTP/gRPC client wrappers built by end-user developers, not part of the daemon release
  • FFI bindings (ffi/) — excluded from first production release scope
  • Integration tests — the CI gate runs unit/mock tests only; devnet-based integration testing (scripts/test-api.sh) is assumed to be done locally before pushing

Test plan

  • Push a change to antd/ on a PR branch — verify CI workflow triggers and all 4 steps pass
  • Push a change to antd-js/ — verify CI does not trigger
  • Push a v* tag — verify release workflow builds all 3 platforms and creates a GitHub Release with binaries + checksums
  • Verify --locked catches a deliberately stale Cargo.lock (modify Cargo.toml without updating lock)

🤖 Generated with Claude Code

Nic-dorman and others added 3 commits April 8, 2026 09:19
Adds GitHub Actions CI gate (fmt, clippy, doc, test) on PRs touching
antd/, and a release workflow that builds cross-platform binaries on
v* tag push.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Run cargo fmt across all antd source files
- Add #![deny(unsafe_code)] to prevent unsafe regression
- Add cargo-audit job for dependency vulnerability scanning
- Add antd-rust API contract tests to CI (mock-based, validates daemon API surface)
- Trigger CI on antd-rust/** changes too

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Suppress dead_code on generated proto types (tonic include_proto)
- Suppress dead_code on bootstrap_peers and is_public fields (kept for future use)
- Replace redundant closures with function pointers in chunks.rs
- Fix stale file_cost call in antd-rust example (3 args → 2)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jacderida jacderida merged commit 81a5cda into main Apr 8, 2026
3 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