-
Notifications
You must be signed in to change notification settings - Fork 0
143 lines (118 loc) · 4.21 KB
/
Copy pathbuild.yml
File metadata and controls
143 lines (118 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: CI
# V3 source of truth is tscircuit under circuit/. Never run `ato build`.
# Gates are Bun (tscircuit) + Rust (pcbkit). Zero Python.
on: [push, pull_request]
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- uses: dtolnay/rust-toolchain@stable
- name: Cache bun
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
pcbkit/target
key: pcbkit-${{ runner.os }}-${{ hashFiles('pcbkit/Cargo.lock', 'pcbkit/**/Cargo.toml') }}
- run: bun install --frozen-lockfile
- name: verify (quiet)
run: bun run verify:ci
- name: build pcbkit
run: cargo build --release --manifest-path pcbkit/Cargo.toml -p pcbkit-cli
- name: pcbkit assure
run: |
./pcbkit/target/release/pcbkit assure \
-i build/lightbar-dock.circuit.json \
--fab pcbkit/profiles/fab-jlcpcb-2layer.toml \
--golden circuit/assurance/golden-footprints.json \
--pcb ci/artifacts/v3-manufacturing.kicad_pcb \
--manifest ci/artifacts/manifest.toml \
--bringup circuit/assurance/bringup.toml
- name: Upload pcbkit binary
uses: actions/upload-artifact@v4
with:
name: pcbkit-linux
path: pcbkit/target/release/pcbkit
- name: Upload assurance reports
if: always()
uses: actions/upload-artifact@v4
with:
name: design-assurance-reports
path: |
generated/reports
build/lightbar-dock.circuit.json
if-no-files-found: ignore
# KiCad CLI only in this job — no Python, no gating logic.
kicad-drc:
runs-on: ubuntu-latest
container:
image: kicad/kicad:10.0
options: --user root
steps:
- uses: actions/checkout@v4
- name: DRC V3 manufacturing PCB (with project rules)
working-directory: ci/artifacts
run: |
# Run beside .kicad_pro so netclasses / min_* rules load (not KiCad defaults).
kicad-cli pcb drc --format json --severity-error --severity-warning \
-o ../../v3-drc.json \
v3-manufacturing.kicad_pcb
- name: DRC Rev1 historical PCB
run: |
kicad-cli pcb drc --format json --severity-error --severity-warning \
-o rev1-drc.json \
layouts/default/default.kicad_pcb
- name: Upload DRC JSON
uses: actions/upload-artifact@v4
with:
name: kicad-drc-json
path: |
v3-drc.json
rev1-drc.json
# Rust gates on DRC JSON + artifact pin (no Python).
drc-gate:
runs-on: ubuntu-latest
needs: [verify, kicad-drc]
steps:
- uses: actions/checkout@v4
- name: Download pcbkit
uses: actions/download-artifact@v4
with:
name: pcbkit-linux
path: bin
- name: Download DRC JSON
uses: actions/download-artifact@v4
with:
name: kicad-drc-json
path: drc
- name: chmod pcbkit
run: chmod +x bin/pcbkit
- name: Artifact pin
run: ./bin/pcbkit pin --manifest ci/artifacts/manifest.toml
- name: V3 DRC gate (0 unconnected, 0 copper/silk errors)
run: |
./bin/pcbkit drc-gate -j drc/v3-drc.json \
--max-unconnected 0 \
--max-fatal-errors 0 \
--max-type silk_edge_clearance=0 \
--max-type lib_footprint_issues=0 \
--max-type silk_over_copper=0
# lib_footprint_mismatch is KiCad metadata drift on shared packages
# (property angles / UUIDs); not fab-blocking. Tracked separately.
- name: Rev1 historical DRC gate (baseline ≤4 footprint errors)
run: ./bin/pcbkit drc-gate -j drc/rev1-drc.json --max-unconnected 0 --max-fatal-errors 4