Skip to content

ci: switch firmware formatting to clang-format and add test-vector validation#11

Merged
tmarhguy merged 2 commits intomainfrom
codex/add-github-actions-workflow-for-tests-wgn8aw
Jan 12, 2026
Merged

ci: switch firmware formatting to clang-format and add test-vector validation#11
tmarhguy merged 2 commits intomainfrom
codex/add-github-actions-workflow-for-tests-wgn8aw

Conversation

@tmarhguy
Copy link
Owner

Motivation

  • Ensure ALU test vectors are syntactically and structurally valid before merging by adding a JSON Schema and validator.
  • Replace the Arduino CLI formatting check with clang-format to provide a reproducible, installable formatter for .ino files.
  • Provide a documented local workflow so developers can run the same checks CI will run.
  • Clean up Arduino sketches so they pass the repository formatting rules.

Description

  • Updated the CI workflow .github/workflows/ci.yml to install jsonschema and clang-format==18.1.5, run tools/validate_test_vectors.py, and run clang-format --dry-run --Werror --style=file against all *.ino files.
  • Added a repository .clang-format style file to define formatting rules and updated README.md with local validation commands using pinned tool versions.
  • Added test/schema/test-vector.schema.json and tools/validate_test_vectors.py, plus a test/vectors/.gitkeep placeholder, to validate JSON test vectors.
  • Cleaned whitespace/formatting in Arduino sketches miscellaneous/firmware/controller-display/controller_display.ino and miscellaneous/firmware/controller-input/controller_input.ino to satisfy the formatter.

Testing

  • No automated tests were executed as part of this rollout.
  • The repository's CI verify job had previously failed on the branch before these formatting changes, and CI has not been re-run since switching to clang-format.
  • The tools/validate_test_vectors.py script is included and will return non-zero on validation or JSON parse errors, causing CI to fail when invalid vectors are present.
  • Local validation commands are documented in README.md so developers can run the same checks prior to opening a PR.

Codex Task

@tmarhguy tmarhguy merged commit 43f41ed into main Jan 12, 2026
0 of 2 checks passed
tmarhguy added a commit that referenced this pull request Jan 16, 2026
…tests-wgn8aw

ci: switch firmware formatting to clang-format and add test-vector validation
@tmarhguy tmarhguy deleted the codex/add-github-actions-workflow-for-tests-wgn8aw branch January 16, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant