Skip to content

ci: collapse crates.io publish + cut redundant CI work - #94

Merged
TechAlchemistX merged 1 commit into
mainfrom
chore/v0.20-cicd-workflow-optimization
Jun 21, 2026
Merged

ci: collapse crates.io publish + cut redundant CI work#94
TechAlchemistX merged 1 commit into
mainfrom
chore/v0.20-cicd-workflow-optimization

Conversation

@TechAlchemistX

Copy link
Copy Markdown
Owner

Summary

CI/CD pass to cut deploy time (crates.io publish) and CI build time, and retire the hand-maintained publish ordering that caused 4 release incidents (v0.15/16/17).

Release deploy (release.yml)

  • Single cargo publish --workspace --locked replaces 23 hand-ordered cargo publish -p … steps + 8 sleeps (~300s). cargo (≥1.66; repo pins 1.95.0) waits on the index between crates and derives the topological order itself, so adding a workspace member no longer needs a release.yml edit.
  • Recovery path reworked: native --workspace does not skip already-published crates (cargo#15006, #16139) — it errors at the first and never reaches the missing tail. workflow_dispatch now enumerates publishable members, probes crates.io per version, and --excludes the live ones so cargo fills only the gap. Validated locally with --dry-run (correct order, zero errors).
  • Native arm64: aarch64-unknown-linux-gnu builds on ubuntu-24.04-arm (free for public repos) instead of cross/Docker.

CI (ci.yml)

  • concurrency + cancel-in-progress — a newer push cancels stale runs.
  • Three toolchain-free grep jobs folded into one lint-greps job (gates kept as named steps).
  • test job → cargo nextest run + a separate --doc step.

Security (security.yml, new)

  • cargo deny + cargo audit moved to a dependency-path-filtered workflow + weekly schedule (time-based advisories). Safe: main has no required status checks, so path-filtering can't deadlock a merge.

Watch on first run

  • nextest: a test relying on shared process-global state could flake under process-per-test — that'd be a latent isolation bug, not a workflow regression.
  • The real publish-crates behavior only fully exercises on a release tag.

Not done (deliberate)

  • B5 toolchain/cache tuning deferred: CI already resolves to pinned 1.95.0 via rust-toolchain.toml; forcing shared cache keys needs before/after measurement. See kb/wiki/build-plans/cicd-workflow-optimization.md.

🤖 Generated with Claude Code

Release deploy (release.yml):
- Replace the 23 hand-ordered `cargo publish -p ...` steps and all 8
  inter-step sleeps (~300s of pure waiting) with a single
  `cargo publish --workspace --locked`. cargo (>=1.66, repo pins 1.95.0)
  waits for each crate to be live on the index before the next and
  derives the topological order itself, so adding a workspace member no
  longer needs a release.yml edit. Retires the recurring "forgot to add
  the new crate in dep order" incident class (v0.15/16/17).
- Rework the workflow_dispatch recovery path: native `--workspace` does
  not skip already-published crates (rust-lang/cargo#15006, #16139), so
  recovery enumerates publishable members, probes crates.io per version,
  and `--exclude`s the live ones — cargo then publishes only the missing
  tail, still in dep order. Validated locally with `--dry-run`.
- Build aarch64-unknown-linux-gnu on a native ubuntu-24.04-arm runner
  (free for public repos) instead of `cross` Docker emulation.

CI (ci.yml):
- Add concurrency + cancel-in-progress so a newer push cancels stale runs.
- Fold tracing-leak-guard + mcp-tools-inventory + secret-no-leak-grep into
  one toolchain-free `lint-greps` job (gates kept as named steps).
- Switch the test job to `cargo nextest run` + a separate doctest step.

Security (security.yml, new):
- Move `cargo deny` + `cargo audit` out of ci.yml into a dependency-path-
  filtered workflow plus a weekly schedule for time-based advisories.
  Safe: main has no required status checks, so path-filtering cannot
  deadlock a merge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@TechAlchemistX
TechAlchemistX merged commit f5288ac into main Jun 21, 2026
9 checks passed
@TechAlchemistX
TechAlchemistX deleted the chore/v0.20-cicd-workflow-optimization branch June 21, 2026 16:04
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