Skip to content

build: clarify makefile target names and restructure ci#356

Merged
webern merged 4 commits into
mainfrom
claude/github-actions-makefile-clarity-nf5z6l
Jul 15, 2026
Merged

build: clarify makefile target names and restructure ci#356
webern merged 4 commits into
mainfrom
claude/github-actions-makefile-clarity-nf5z6l

Conversation

@webern

@webern webern commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Human Summary

CI was hard to understand so I am attempting to simplify it.

Summary

The Makefile target names and the CI job layout had both drifted into something
hard to follow. This pass makes both legible around one mental model: a single
product (mx::api) on a substrate (mx::core), plus a dev tool (gen/).

Makefile:

  • Targets renamed to a consistent area-first <area>-<action> scheme:
    core-build / core-roundtrip-test / core-unit / core-coverage,
    api-lib / api-build / api-test / api-roundtrip / api-coverage,
    plus gen-test, audit-test, fmt-check, and the api-roundtrip-* helpers.
  • New test-all runs every C++ suite at once (core roundtrip + unit + api-test
    • api-roundtrip) — the deep gate CI uses on Linux.
  • Deleted four low-value or redundant targets and their drivers: validate-cpp
    (plus mxtest/validate/ and the mxtest-validate CMake target), probe-cpp
    (plus mxtest/probe/), check-core-dev, and gen-check (its rename and
    collision checks already run during real generation).

CI, from ten always-on jobs down to a leaner set:

  • test-linux (make test-all), test-macos (native AppleClang, api tier),
    test-windows (new — native MSVC, driving CMake directly), swift,
    quality (fmt-check + generated-output drift), and a gen job gated on
    changes under gen/.
  • test-windows is a required check and is expected to stay red until the code
    is MSVC-clean; it exists so that fallout runs on every PR from now on.
  • Coverage moved out of the always-on run into a new manual-only
    coverage.yaml, triggered by the workflow's Run button or a /coverage
    comment on a PR. It posts the same gcovr tables to the PR as before.

pr-comment.yaml is unchanged; it still posts the gen-quality comment for fork
PRs. Docs, skills, and instruction files are updated to the new names.

Testing

This is a CI/build change, so the workflows running on this PR are the real
test. Verified locally:

  • make help renders, and make -n test-all resolves the full dependency
    chain in both the in-container and docker-wrapper branches
  • Every dual-branch target is defined exactly once per branch, and no stale
    target names remain outside docs/ai/design/ (kept as historical)
  • All three workflow files parse as YAML
  • Full suites and coverage run in CI on this PR (not run locally)

References


Generated by Claude Code

Rename Makefile targets to a consistent area-first `<area>-<action>`
convention (core-*, api-*, gen-*, audit-*, fmt-*), add `test-all` as the
deep all-C++ gate, and delete redundant/low-value targets (validate-cpp,
probe-cpp, check-core-dev, gen-check) together with their sources and the
mxtest-validate CMake target.

Restructure GitHub Actions CI from ten always-on jobs into a leaner set:
changes, test-linux (make test-all), test-macos, test-windows (new, native
MSVC), swift, quality (fmt-check + regen drift), and a gen job gated on
gen/** changes. Move code coverage out of the always-on run into a new
manual-only coverage.yaml (workflow_dispatch or a `/coverage` PR comment),
still posting the same gcovr tables to the PR.

pr-comment.yaml is unchanged (still posts the gen-quality comment for fork
PRs). Docs, skills, and instruction files updated to the new target names.
@webern webern added non-breaking fixes or implementation that do not require breaking changes ai Issues opened by, or through, a coding agent. labels Jul 15, 2026 — with Claude
@github-actions

Copy link
Copy Markdown

gen-quality gen/

gen-quality: 84.5 / 100   (floor 84.5, +0.0)

  structure     86.5  x0.50   [fn 90.5 / file 82.6]
  cyclomatic    88.4  x0.25
  cognitive     76.6  x0.25

  409 functions across 31 files, 7702 lines (largest file 1044)
  max cc 56  max cognitive 44  max fn loc 152

Worst offenders (top 5 per axis; full lists in score.json):
  cyclomatic gen/xsd/analyze.py:311     report                             56
  cyclomatic gen/plates/build.py:956    _validate_config_against_ir        35
  cyclomatic gen/press/context.py:145   plate_context                      34
  cyclomatic gen/__main__.py:46         _ir                                23
  cyclomatic gen/tests/test_ir.py:102   _check_references                  20
  cognitive  gen/xsd/analyze.py:311     report                             44
  cognitive  gen/ir/resolve.py:119      flat_elements                      40
  cognitive  gen/tests/test_ir.py:102   _check_references                  38
  cognitive  gen/press/context.py:145   plate_context                      37
  cognitive  gen/xsd/analyze.py:207     _sccs                              37
  size       gen/xsd/analyze.py:311     report                             152
  size       gen/press/context.py:145   plate_context                      96
  size       gen/plates/build.py:533    _value_plate                       89
  size       gen/plates/build.py:956    _validate_config_against_ir        89
  size       gen/ir/resolve.py:119      flat_elements                      78

Commit 19c3f2c5732af896ee0827d7ee478d79ac20516c.

webern and others added 2 commits July 15, 2026 15:37
The changes-job filter OR'd 'gen/**' with '!gen/**/*.md', so picomatch
evaluated the negation as a standalone matcher that any non-gen-markdown
path satisfies -- the gen filter fired on essentially every PR. Add
predicate-quantifier 'every' so a changed file must be under gen/ AND not
markdown to trip it.
@webern

webern commented Jul 15, 2026

Copy link
Copy Markdown
Owner Author

/coverage

Windows was the CI long-pole at ~19 min (17m42s in the build step alone)
because the native macOS/Windows/Swift jobs had no compiler cache -- only
the Linux jobs did, via ccache baked into the mx-sdk image.

- test-windows: switch from the Visual Studio generator to Ninja so sccache
  can hook in (the VS generator ignores CMAKE_<LANG>_COMPILER_LAUNCHER), set
  up MSVC via ilammy/msvc-dev-cmd, and force /Z7 embedded debug info (sccache
  can't cache /Zi's shared-PDB writes). Single-config Ninja also collapses the
  binary paths from build/api/Debug/ to build/api/.
- test-macos: replace the build/-dir cache (keyed on src/**, so busted by
  every source change) with ccache via compiler-launcher env vars.
- swift: cache the SwiftPM .build tree.
- Bump actions/checkout v4 -> v5 and actions/github-script v7 -> v8 (both now
  on Node 24; Node 20 is deprecated on GitHub Actions runners).
@webern
webern merged commit 52c612d into main Jul 15, 2026
7 checks passed
@webern
webern deleted the claude/github-actions-makefile-clarity-nf5z6l branch July 15, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai Issues opened by, or through, a coding agent. non-breaking fixes or implementation that do not require breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant