-
Notifications
You must be signed in to change notification settings - Fork 0
307 lines (268 loc) · 8.92 KB
/
kibot.yml
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
name: "KiBot Build"
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
paths:
- '**.kicad_sch'
- '**.kicad_pcb'
- '.github/workflows/kibot.yml'
pull_request:
paths:
- '**.kicad_sch'
- '**.kicad_pcb'
- '.github/workflows/kibot.yml'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
preflight:
runs-on: ubuntu-latest
container: ghcr.io/inti-cmnb/kicad8_auto_full:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: hardware/electrical
sparse-checkout-cone-mode: false
- name: Move files up
run: |
mv ./hardware/electrical/* .
rm -r hardware/
- name: Run Kibot
uses: INTI-CMNB/KiBot@v2_k8
with:
config: "kibot/preflight.kibot.yaml"
dir: output
schema: "artsey_ergo.kicad_sch"
board: "artsey_ergo.kicad_pcb"
- name: "Setup jq"
uses: dcarbone/install-jq-action@v3
- name: Parse ERC
run: |
erc_warnings=$(cat output/artsey_ergo-erc.json | jq '[try .violations[] | select(.severity == "warning")] | length')
erc_errors=$(cat output/artsey_ergo-erc.json | jq '[try .violations[] | select(.severity == "error")] | length')
cat <<EOF > output/erc_validation.md
- **Errors**: $erc_errors
- **Warnings**: $erc_warnings
- **Link**: [HTML Report](output/artsey_ergo-erc.html)
EOF
cat output/erc_validation.md
- name: Parse DRC
run: |
drc_warnings=$(cat output/artsey_ergo-drc.json | jq '[try .violations[] | select(.severity == "warning")] | length')
drc_errors=$(cat output/artsey_ergo-drc.json | jq '[try .violations[] | select(.severity == "error")] | length')
cat <<EOF > output/drc_validation.md
- **Errors**: $drc_errors
- **Warnings**: $drc_warnings
- **Link**: [HTML Report](output/artsey_ergo-drc.html)
EOF
cat output/drc_validation.md
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: artsey_ergo
path: output
render_angled:
runs-on: ubuntu-latest
container: ghcr.io/inti-cmnb/kicad8_auto_full:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: hardware/electrical
sparse-checkout-cone-mode: false
- name: Move files up
run: |
mv ./hardware/electrical/* .
rm -r hardware/
- name: Run Kibot
uses: INTI-CMNB/KiBot@v2_k8
with:
config: "kibot/render_angled.kibot.yaml"
dir: output
schema: "artsey_ergo.kicad_sch"
board: "artsey_ergo.kicad_pcb"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: render_angled
path: output
report:
runs-on: ubuntu-latest
container: ghcr.io/inti-cmnb/kicad8_auto_full:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: hardware/electrical
sparse-checkout-cone-mode: false
- name: Move files up
run: |
mv ./hardware/electrical/* .
rm -r hardware/
- name: Run Kibot
uses: INTI-CMNB/KiBot@v2_k8
with:
config: "kibot/config.kibot.yaml"
dir: output
schema: "artsey_ergo.kicad_sch"
board: "artsey_ergo.kicad_pcb"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: report
path: output
render_top:
runs-on: ubuntu-latest
container: ghcr.io/inti-cmnb/kicad8_auto_full:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: hardware/electrical
sparse-checkout-cone-mode: false
- name: Move files up
run: |
mv ./hardware/electrical/* .
rm -r hardware/
- name: Run Kibot
uses: INTI-CMNB/KiBot@v2_k8
with:
config: "kibot/render_top.kibot.yaml"
dir: output
schema: "artsey_ergo.kicad_sch"
board: "artsey_ergo.kicad_pcb"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: render_top
path: output
render_bottom:
runs-on: ubuntu-latest
container: ghcr.io/inti-cmnb/kicad8_auto_full:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: hardware/electrical
sparse-checkout-cone-mode: false
- name: Move files up
run: |
mv ./hardware/electrical/* .
rm -r hardware/
- name: Run Kibot
uses: INTI-CMNB/KiBot@v2_k8
with:
config: "kibot/render_bottom.kibot.yaml"
dir: output
schema: "artsey_ergo.kicad_sch"
board: "artsey_ergo.kicad_pcb"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: render_bottom
path: output
step:
runs-on: ubuntu-latest
container: ghcr.io/inti-cmnb/kicad8_auto_full:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: hardware/electrical
sparse-checkout-cone-mode: false
- name: Move files up
run: |
mv ./hardware/electrical/* .
rm -r hardware/
- name: Run Kibot
uses: INTI-CMNB/KiBot@v2_k8
with:
config: "kibot/step.kibot.yaml"
dir: output
schema: "artsey_ergo.kicad_sch"
board: "artsey_ergo.kicad_pcb"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: step
path: output
build:
runs-on: ubuntu-latest
needs: [
preflight,
render_angled,
report,
render_top,
render_bottom,
step
]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: .
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: artsey_ergo
path: output
- name: Download artifact
uses: actions/download-artifact@v4
with:
path: output
- name: Move artifact files
run: |
ls -l
ls -l output
ls -l output/render_angled
ls -l output/report
find output/report
mkdir export
mkdir html
mkdir images
mkdir documents
mv output/drc_validation.md ./
mv output/erc_validation.md ./
mv output/step/Step/artsey_ergo-3D.step ./artsey_ergo-3D.step
mv output/report/report/artsey_ergo-report.txt ./artsey_ergo-report.md
mv output/render_top/artsey_ergo-3D_blender_top.png images/artsey_ergo-3D_blender_top.png
mv output/render_bottom/artsey_ergo-3D_blender_top.png images/artsey_ergo-3D_blender_bottom.png
mv output/render_angled/artsey_ergo-3D_blender_top.png images/artsey_ergo-3D_blender_angled.png
mv output/report/IBOM/artsey_ergo-ibom.html export/artsey_ergo-ibom.html
mv output/report/BOM/artsey_ergo_bom.html export/artsey_ergo-bom.html
mv output/report/Schematic/artsey_ergo-schematic-default.pdf documents/artsey_ergo-schematic-default.pdf
mv output/report/Schematic/artsey_ergo-schematic-mono.pdf documents/artsey_ergo-schematic-mono.pdf
mv output/report/JLCPCB/artsey_ergo-JLCPCB.zip export/artsey_ergo-JLCPCB.zip
mv output/report/JLCPCB/BOM/artsey_ergo_bom_jlc.csv export/artsey_ergo_bom_jlc.csv
mv output/report/JLCPCB/PickAndPlace/artsey_ergo_cpl_jlc.csv export/artsey_ergo_cpl_jlc.csv
cp export/artsey_ergo-JLCPCB.zip export/artsey_ergo-Eurocircuits.zip
rm -rf output
ls -l
ls -l export
find .
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
future: true
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4