Skip to content

ci(hardware): headless KiCad ERC/DRC and schematic exports - #20

Merged
cryptotomte merged 1 commit into
mainfrom
chore/kicad-ci
Sep 2, 2026
Merged

ci(hardware): headless KiCad ERC/DRC and schematic exports#20
cryptotomte merged 1 commit into
mainfrom
chore/kicad-ci

Conversation

@cryptotomte

Copy link
Copy Markdown
Owner

Summary

Turns kicad-cli into a CI gate for the hardware tree:

  • hardware/rev2/tools/kicad-check.sh — ERC on the rev2 schematic, DRC on every board that has a board outline (rev1 now; rev2 joins automatically once the stage-B layout exists — until then it is skipped with a visible message rather than failing on a blank board), and SVG/PDF exports of all rev2 sheets into the gitignored hardware/rev2/export/.
  • .github/workflows/hardware-check.yml — runs the same script in kicad/kicad:10.0 (pinned by digest, constitution III) on every hardware/** change and uploads reports + exports as a workflow artifact, so any CI run gives you the rendered schematic.
  • CLAUDE.md: build-commands note.

Verification

  • Local (kicad-cli 10.0.3, macOS): ERC 0 violations, rev1 DRC 0 violations, rev2 DRC skipped (no outline), 9 sheets → SVG + one PDF.
  • Container (kicad/kicad:10.0, linux/amd64 under emulation, --user root, HOME=/tmp): identical results — this is the exact CI path.
  • This PR's own run is the first real CI execution.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QU8EzuVKjCFbXraYenJVYa

Adds hardware/rev2/tools/kicad-check.sh — ERC on the rev2 schematic
(--severity-error, exit on violations), DRC on every board that has an
Edge.Cuts outline (rev1 today; rev2 auto-joins once stage-B layout
exists, until then it is skipped with a visible message), and SVG/PDF
exports of all rev2 sheets into the gitignored hardware/rev2/export/.

.github/workflows/hardware-check.yml runs the same script in the
kicad/kicad:10.0 image pinned by digest on every hardware/** change and
uploads reports + exports as a workflow artifact, so the schematic can
be inspected from any CI run. Verified locally with kicad-cli 10.0.3
and inside the container (linux/amd64): ERC 0 violations, rev1 DRC 0
violations, 9 sheets exported.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QU8EzuVKjCFbXraYenJVYa
@cryptotomte
cryptotomte merged commit 3899176 into main Sep 2, 2026
1 check passed
@cryptotomte
cryptotomte deleted the chore/kicad-ci branch September 2, 2026 06:45
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