Skip to content

ci: add the org-wide reusable workflow alongside the existing pipeline - #156

Merged
JustinKovacich merged 2 commits into
mainfrom
ci/adopt-org-rust-workflow
Sep 11, 2026
Merged

JustinKovacich merged 2 commits into
mainfrom
ci/adopt-org-rust-workflow

Conversation

@JustinKovacich

@JustinKovacich JustinKovacich commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

What

Adds .github/workflows/main.yml, a thin caller for luminartech/rust_workflow@v1, matching simple_doip, uds_protocol and automotive_wire_codec. Deletes release-plz.yml — the shared workflow runs the same two release-plz jobs behind use-release-plz: true — aligns release-plz.toml with the siblings, and adds the deny.toml the security job needs.

It takes over none of this repo's eight existing jobs. I opened this PR expecting two to move; CI disproved that, and the description below is the corrected version. ci.yml survives intact, renamed to Bare-metal & Platform CI.

What the shared workflow actually contributes

All of these are new here, not replacements:

new job
Release-plz PR / Release replaces this repo's own release-plz.yml
Documentation rustdoc with warnings denied
Security Audit cargo-audit + cargo-deny
Publish Dry Run proves the crate still packages
Build release build
Build no_std (bare-metal) smoke test alongside the local gate

The release plumbing is the real win. Versioning, changelog, tags, GitHub releases and the crates.io publish now run through the same jobs as the other three protocol crates, off a release-plz.toml whose [changelog] parsers are byte-identical to theirs.

Why every existing job stayed

Each of these was tried or analysed, not assumed:

  • Build, Test & Coverage — the shared workflow applies one feature-flags value to build, test, clippy and docs. This crate needs two: lint wants bare_metal in, tests want it out, because the server's runtime caps default tight under bare_metal and generous otherwise. Measured: the host suite with bare_metal on fails 12 server tests; without it the library is 563 passed, 0 failed.
  • Format & Lint — the shared lint job hardcodes cargo clippy --all-targets, which this pipeline never used. That surfaces ~89 pre-existing pedantic and style findings in test and example code. clippy-args only appends after --, so the scope cannot be narrowed from the caller.
  • SemVer Checkcargo-semver-checks builds rustdoc with all features and takes no feature input, so it hits this crate's own guard: feature `bare-metal-runtime` is no-alloc and cannot be combined with the alloc features. Not fixable from the caller. The local job passes a feature set.
  • Build & Test (Windows) — every job in rust-ci.yml is runs-on: ubuntu-latest, and its header says that is intentional.
  • no_std target build — builds four bare-metal feature combinations separately and audits each rlib for allocator symbols. run-no-std builds one target with and without the alloc feature. Both run now: the shared one as a smoke test, this as the gate.
  • build-std core gate — certifies against a core-only sysroot. No equivalent input.
  • Bare-metal runtime (nightly) — nightly-only and mutually exclusive with the alloc features; the shared workflow's nightly is used only for fuzz and miri.
  • Linear PR History — not provided.

Stages deliberately off

input why
run-unit-tests two feature regimes, one feature-flags knob
run-lint --all-targets scope, see above
run-semver-checks all-features rustdoc build, see above
run-property-tests no prop_-named tests; cargo nextest exits 4 on an empty selection, so it would fail, not skip
run-fuzz-tests no fuzz/ package
run-pre-commit no .pre-commit-config.yaml
run-msrv no rust-version in the manifest — a policy call, not a CI one
run-miri-tests never run here; enabling a new gate inside a pipeline migration makes any failure ambiguous

Also: --all-features cannot build this crate at all, so feature-flags is set to the old $ALLOC_FEATURES, and alloc-feature to _alloc (the workflow default is alloc; naming it wrong would silently skip the alloc build variants).

deny.toml

The one CI failure that was missing scaffolding rather than a workflow mismatch. cargo-deny's default license allowlist is empty, so with no config it rejected every dependency — including MIT OR Apache-2.0 — with "license is not explicitly allowed". Copied from simple_doip.

No pr-lint.yml, unlike simple_doip

simple_doip has one because it squash-merges with squash_merge_commit_title: PR_TITLE, so the PR title is the commit subject release-plz parses. This repo has allow_squash_merge: false and merges with merge commits, so the branch's own commit subjects are what release-plz reads. A PR-title lint would give false assurance while leaving the text that actually drives versioning unchecked.

Follow-up worth considering: nothing currently enforces conventional commits on individual commits here, and those are what drive versioning. Either add a commit-lint, or switch the repo to squash-merge like the siblings.

The general finding

Every blocker traces to one assumption in rust_workflow: that --all-features builds, and that a single feature set suits build, test, clippy, docs and semver-checks alike. That holds for the three sibling crates. It cannot hold for a crate with mutually exclusive no-alloc and alloc feature sets.

Three inputs would let this crate actually converge — a test-specific feature set, a lint-scope toggle, and a features input for semver-checks. That is a change to the shared workflow affecting every repo, so it is deliberately not in this PR.

Verification

CI on this branch: 13 pass, 0 failures. Both workflows appear, no job from the previous set is lost, and every disabled stage reports skipping rather than silently vanishing.

🤖 Generated with Claude Code

Adds `main.yml`, a thin caller for `luminartech/rust_workflow`, matching
`simple_doip`, `uds_protocol` and `automotive_wire_codec`. `release-plz.yml`
is deleted -- `use-release-plz: true` runs the same two jobs inside the
shared workflow -- and `release-plz.toml` picks up the `[changelog]`
parsers the siblings share.

Unlike those three, this repo cannot become a pure thin caller, so `ci.yml`
survives in reduced form. Only `Format & Lint` and `SemVer Check` moved.
Each remaining job stayed for a reason, recorded in that file's header:

- **`Build, Test & Coverage`** -- the shared workflow applies one
  `feature-flags` value to build, test, clippy and docs alike. Lint wants
  `bare_metal` in; tests want it out, because the server's runtime caps
  default tight under `bare_metal` and generous otherwise. Running the host
  suite at the tight defaults fails a dozen server tests. Two regimes, one
  knob, so `run-unit-tests` is off and the lane stays here at
  `$HOST_FEATURES`.
- **`Build & Test (Windows)`** -- every job in the shared workflow is
  `runs-on: ubuntu-latest` and its header says that is deliberate.
- **`no_std target build`** -- builds four separate bare-metal feature
  combinations and audits each rlib for allocator symbols. The shared
  `run-no-std` builds one target with and without the alloc feature. Both
  now run: the shared one as a smoke test, this as the gate.
- **`build-std core gate`** -- certifies against a core-only sysroot; no
  equivalent input exists.
- **`Bare-metal runtime (nightly)`** -- needs nightly and is mutually
  exclusive with the alloc features; the shared workflow's nightly is used
  only for fuzz and miri.
- **`Linear PR History`** -- not provided.

Four shared stages are off, each for a concrete reason rather than
preference: no `prop_`-named tests (an empty nextest selection exits 4, so
the job would fail rather than skip), no `fuzz/` package, no
`.pre-commit-config.yaml`, and no `rust-version` in the manifest to verify
an MSRV against. Miri is off too -- this crate has never run it, and
enabling a new gate inside a pipeline migration would make any failure
ambiguous.

`--all-features`, the workflow's default, cannot build this crate at all:
`bare-metal-runtime` is no-alloc and the manifest rejects combining it with
the alloc features. `feature-flags` is set to the old `$ALLOC_FEATURES`.

No `pr-lint.yml`, unlike `simple_doip`. That workflow exists there because
the repo squash-merges with `squash_merge_commit_title: PR_TITLE`, making
the PR title the commit subject release-plz parses. This repo has
`allow_squash_merge` off and merges with merge commits, so the branch's own
commit subjects are what release-plz reads. A PR-title lint would give
false assurance while leaving the load-bearing text unchecked.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #156   +/-   ##
=======================================
  Coverage   81.72%   81.72%           
=======================================
  Files          48       48           
  Lines       16178    16178           
=======================================
  Hits        13222    13222           
  Misses       2956     2956           

…aces

The first pass assumed `Format & Lint` and `SemVer Check` could move. CI
disproved both, so this restores them and records why.

- `Format & Lint` -- the shared lint job hardcodes `cargo clippy
  --all-targets`, which this repo's pipeline never used. That surfaces ~89
  pre-existing pedantic and style findings in test and example code.
  `clippy-args` only appends arguments after `--`, so the scope cannot be
  narrowed from the caller. `run-lint: false`.
- `SemVer Check` -- `cargo-semver-checks` builds rustdoc with ALL features
  and takes no feature input, so it hits this crate's own `compile_error!`
  guard: "feature `bare-metal-runtime` is no-alloc and cannot be combined
  with the alloc features". Not fixable from the caller.
  `run-semver-checks: false`; the local job passes a feature set.

Adds `deny.toml`, copied from `simple_doip`. cargo-deny's default license
allowlist is empty, so with no config it rejected every dependency --
including `MIT OR Apache-2.0` -- with "license is not explicitly allowed".
That is the one CI failure that was genuinely a missing-scaffolding
problem rather than a workflow mismatch.

Net effect of adopting the shared workflow here: it takes over none of the
eight existing jobs, and adds release-plz, a docs build, a security audit,
a publish dry run, a release build and a no_std smoke build. The release
plumbing is the real win -- `release-plz.yml` is gone and the config now
matches the sibling repos.

Every blocker traces to one assumption in `rust_workflow`: that
`--all-features` builds, and that a single feature set suits build, test,
clippy, docs and semver-checks alike. Neither holds for a crate with
mutually exclusive no-alloc and alloc feature sets.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@JustinKovacich JustinKovacich changed the title ci: adopt the org-wide reusable Rust workflow where it fits ci: add the org-wide reusable workflow alongside the existing pipeline Sep 10, 2026
@JustinKovacich
JustinKovacich added this pull request to the merge queue Sep 11, 2026
Merged via the queue into main with commit 0baa3f1 Sep 11, 2026
25 checks passed
@JustinKovacich
JustinKovacich deleted the ci/adopt-org-rust-workflow branch September 11, 2026 02:46
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.

3 participants