1
1
name : Kicad - production files generator
2
2
3
+ concurrency :
4
+ group : ${{ github.workflow }}-${{ github.ref }}
5
+ cancel-in-progress : true
6
+
3
7
on :
4
8
push :
5
9
paths :
11
15
workflow_dispatch :
12
16
13
17
env :
14
- schema : " hw/sch_pcb/*.kicad_sch"
15
- board : " hw/sch_pcb/*.kicad_pcb"
18
+ schema : " hw/sch_pcb/${{ github.head_ref || github.ref_name }}.kicad_sch"
19
+ board : " hw/sch_pcb/${{ github.head_ref || github.ref_name }}.kicad_pcb"
20
+ project : ${{ github.event.repository.name }}
21
+ branch : ${{ github.head_ref || github.ref_name }}
16
22
dir : " hw/out"
17
23
kibot : " doc/assets/kibot"
18
24
19
25
jobs :
20
- # checks
21
26
ERC :
22
27
runs-on : ubuntu-latest
23
28
continue-on-error : true
@@ -28,13 +33,14 @@ jobs:
28
33
token : ${{ secrets.pat }}
29
34
ref : ${{ github.head_ref }}
30
35
31
- - uses : MLAB-project /KiBot@master
36
+ - uses : INTI-CMNB /KiBot@v2_dk6
32
37
with :
33
38
config : ${{ env.kibot }}/erc.kibot.yaml
34
39
schema : ${{ env.schema }}
35
40
board : ${{ env.board }}
36
41
dir : ${{ env.dir }}
37
42
43
+
38
44
DRC :
39
45
runs-on : ubuntu-latest
40
46
continue-on-error : true
@@ -45,37 +51,14 @@ jobs:
45
51
token : ${{ secrets.pat }}
46
52
ref : ${{ github.head_ref }}
47
53
48
- - uses : MLAB-project /KiBot@master
54
+ - uses : INTI-CMNB /KiBot@v2_dk6
49
55
with :
50
56
config : ${{ env.kibot }}/drc.kibot.yaml
51
57
schema : ${{ env.schema }}
52
58
board : ${{ env.board }}
53
59
dir : ${{ env.dir }}
54
-
55
- xml :
56
- runs-on : ubuntu-latest
57
- continue-on-error : true
58
- steps :
59
- - uses : actions/checkout@v3
60
- with :
61
- submodules : recursive
62
- token : ${{ secrets.pat }}
63
- ref : ${{ github.head_ref }}
64
-
65
- - uses : MLAB-project/KiBot@master
66
- with :
67
- config : ${{ env.kibot }}/xml.kibot.yaml
68
- schema : ${{ env.schema }}
69
- board : ${{ env.board }}
70
- dir : ${{ env.dir }}
71
- - uses : actions/upload-artifact@v3
72
- if : ${{ success() }}
73
- with :
74
- name : doc_xml
75
- path : hw/sch_pcb/*.xml
76
-
77
60
78
- # documentation
61
+
79
62
schematics :
80
63
runs-on : ubuntu-latest
81
64
continue-on-error : true
86
69
token : ${{ secrets.pat }}
87
70
ref : ${{ github.head_ref }}
88
71
89
- - uses : MLAB-project /KiBot@master
72
+ - uses : INTI-CMNB /KiBot@v2_dk6
90
73
with :
91
74
config : ${{ env.kibot }}/schematics.kibot.yaml
92
75
schema : ${{ env.schema }}
@@ -99,57 +82,77 @@ jobs:
99
82
name : doc_sch
100
83
path : ${{ env.dir }}_docs/**
101
84
102
-
103
85
placement :
86
+ name : " Placement and XML"
104
87
runs-on : ubuntu-latest
105
- continue-on-error : true
88
+ # continue-on-error: true
106
89
steps :
107
90
- uses : actions/checkout@v3
108
91
with :
109
92
submodules : recursive
110
93
token : ${{ secrets.pat }}
111
94
ref : ${{ github.head_ref }}
112
95
113
- - uses : MLAB-project /KiBot@master
96
+ - uses : INTI-CMNB /KiBot@v2_dk6
114
97
with :
115
98
config : ${{ env.kibot }}/placement.kibot.yaml
116
99
schema : ${{ env.schema }}
117
100
board : ${{ env.board }}
118
101
dir : ${{ env.dir }}_docs
119
102
103
+ - uses : INTI-CMNB/KiBot@v2_dk6
104
+ with :
105
+ config : ${{ env.kibot }}/xml.kibot.yaml
106
+ schema : ${{ env.schema }}
107
+ board : ${{ env.board }}
108
+ dir : ${{ env.dir }}_docs
109
+
110
+ # - name: "Rename output"
111
+ # run: |
112
+ # for file in $(find ${{env.dir}} -type f); do sudo mv "${file}" "${file//${{env.project}}/${{env.branch}}}" ; done
113
+ # for file in $(find ${{env.dir}}_docs -type f); do sudo mv "${file}" "${file//${{env.project}}/${{env.branch}}}" ; done
114
+
115
+ - uses : actions/upload-artifact@v3
116
+ if : ${{ success() }}
117
+ with :
118
+ name : doc_xml
119
+ path : hw/sch_pcb/*.xml
120
+
120
121
# Zde se zahazuji debugovaci videa
121
122
- uses : actions/upload-artifact@v3
122
123
if : ${{ success() }}
123
124
with :
124
125
name : doc_placement
125
- path : ${{ env.dir }}_docs/**/*.pdf
126
-
127
-
128
- pnp :
126
+ path : |
127
+ ${{ env.dir }}_docs/**/*.pdf
128
+ ${{ env.dir }}_docs/**/*.svg
129
+ ${{ env.dir }}_docs/**/*.csv
130
+
131
+ report :
129
132
runs-on : ubuntu-latest
130
- continue-on-error : true
133
+ # continue-on-error: true
131
134
steps :
132
135
- uses : actions/checkout@v3
133
136
with :
134
137
submodules : recursive
135
138
token : ${{ secrets.pat }}
136
139
ref : ${{ github.head_ref }}
137
140
138
- - uses : MLAB-project /KiBot@master
141
+ - uses : INTI-CMNB /KiBot@v2_dk6
139
142
with :
140
- config : ${{ env.kibot }}/pnp .kibot.yaml
143
+ config : ${{ env.kibot }}/report .kibot.yaml
141
144
schema : ${{ env.schema }}
142
145
board : ${{ env.board }}
143
- dir : ${{ env.dir }}_docs
146
+ dir : ${{ env.dir }}_report
144
147
145
- # Zde se zahazuji debugovaci videa
146
148
- uses : actions/upload-artifact@v3
147
149
if : ${{ success() }}
148
150
with :
149
- name : doc_pnp
150
- path : ${{ env.dir }}_docs /
151
+ name : doc_report
152
+ path : ${{ env.dir }}_report /
151
153
152
- report :
154
+
155
+ ibom :
153
156
runs-on : ubuntu-latest
154
157
continue-on-error : true
155
158
steps :
@@ -159,21 +162,26 @@ jobs:
159
162
token : ${{ secrets.pat }}
160
163
ref : ${{ github.head_ref }}
161
164
162
- - uses : MLAB-project /KiBot@master
165
+ - uses : INTI-CMNB /KiBot@v2_dk6
163
166
with :
164
- config : ${{ env.kibot }}/report .kibot.yaml
167
+ config : ${{ env.kibot }}/ibom .kibot.yaml
165
168
schema : ${{ env.schema }}
166
169
board : ${{ env.board }}
167
- dir : ${{ env.dir }}_report
170
+ dir : ${{ env.dir }}_ibom
171
+
172
+ - name : " Rename output"
173
+ run : for file in $(find ${{env.dir}} -type f); do sudo mv "${file}" "${file//${{env.project}}/${{env.branch}}}" ; done
168
174
169
175
- uses : actions/upload-artifact@v3
170
176
if : ${{ success() }}
171
177
with :
172
- name : doc_report
173
- path : ${{ env.dir }}_report/
178
+ name : doc_ibom
179
+ path : ${{ env.dir }}_ibom/
180
+
174
181
175
182
# fabrications
176
183
gerbers :
184
+ name : " Fabrication: Gerebrs, Drill and PnP"
177
185
runs-on : ubuntu-latest
178
186
continue-on-error : true
179
187
steps :
@@ -183,13 +191,16 @@ jobs:
183
191
token : ${{ secrets.pat }}
184
192
ref : ${{ github.head_ref }}
185
193
186
- - uses : MLAB-project /KiBot@master
194
+ - uses : INTI-CMNB /KiBot@v2_dk6
187
195
with :
188
196
config : ${{ env.kibot }}/gerbers.kibot.yaml
189
197
schema : ${{ env.schema }}
190
198
board : ${{ env.board }}
191
199
dir : ${{ env.dir }}_gerbers
192
200
verbose : 3
201
+
202
+ - name : " Rename output"
203
+ run : for file in $(find ${{env.dir}}_gerbers -type f); do sudo mv "${file}" "${file//${{env.project}}/${{env.branch}}}" ; done
193
204
194
205
- uses : actions/upload-artifact@v2
195
206
if : ${{ success() }}
@@ -198,65 +209,55 @@ jobs:
198
209
path : ${{ env.dir }}_gerbers/gerbers/**
199
210
200
211
201
- cad :
212
+ graphics :
213
+ name : " CAD and render"
202
214
runs-on : ubuntu-latest
203
- continue-on-error : true
215
+ # continue-on-error: true
204
216
steps :
205
217
- uses : actions/checkout@v3
206
218
with :
207
219
submodules : recursive
208
220
token : ${{ secrets.pat }}
209
221
ref : ${{ github.head_ref }}
210
222
211
- - uses : MLAB-project /KiBot@master
223
+ - uses : INTI-CMNB /KiBot@v2_dk6
212
224
with :
213
225
config : ${{ env.kibot }}/cad.kibot.yaml
214
226
schema : ${{ env.schema }}
215
227
board : ${{ env.board }}
216
228
dir : ${{ env.dir }}_cad
217
-
218
- - uses : actions/upload-artifact@v3
219
- if : ${{ success() }}
220
- with :
221
- name : doc_cad
222
- path : ${{ env.dir }}_cad/**
223
-
224
-
225
- render :
226
- runs-on : ubuntu-latest
227
- continue-on-error : true
228
- steps :
229
- - uses : actions/checkout@v3
230
- with :
231
- submodules : recursive
232
- token : ${{ secrets.pat }}
233
- ref : ${{ github.head_ref }}
234
229
235
- - uses : MLAB-project /KiBot@master
230
+ - uses : INTI-CMNB /KiBot@v2_dk6
236
231
with :
237
232
config : ${{ env.kibot }}/render.kibot.yaml
238
233
schema : ${{ env.schema }}
239
234
board : ${{ env.board }}
240
235
dir : ${{ env.dir }}_img
241
236
verbose : 3
237
+
238
+ - uses : actions/upload-artifact@v3
239
+ if : ${{ success() }}
240
+ with :
241
+ name : doc_cad
242
+ path : ${{ env.dir }}_cad/**
242
243
243
244
- uses : actions/upload-artifact@v3
244
245
if : ${{ success() }}
245
246
with :
246
247
name : doc_img
247
248
path : ${{ env.dir }}_img/img/**
248
249
250
+
249
251
UPDATE_REPO :
250
252
runs-on : ubuntu-latest
251
- name : Update repozitory.
252
- needs : [render, cad, gerbers, schematics, pnp, xml, placement ]
253
+ name : Update repository
254
+ needs : [graphics, gerbers, schematics, placement, report, ibom ]
253
255
steps :
254
256
- uses : actions/checkout@v3
255
257
with :
256
258
ref : ${{ github.head_ref }}
257
259
token : ${{ secrets.pat }}
258
260
259
-
260
261
- run : |
261
262
git pull --force --rebase || true
262
263
git submodule update --remote || true
@@ -267,44 +268,46 @@ jobs:
267
268
- name : Remove old manufarturing data
268
269
run : |
269
270
rm -r hw/cam_profi || true
270
- rw -r doc/gen || true
271
+ rm -r doc/gen || true
271
272
272
273
- name : Extract to right position
273
274
run : |
274
275
275
276
mkdir doc || true
276
277
mkdir doc/gen || true
277
278
mkdir doc/gen/img || true
279
+ mkdir doc/img || true
278
280
mkdir doc/img/render || true
279
281
mkdir hw || true
280
282
mkdir hw/cam_profi || true
283
+ mkdir hw/cam_profi/ibom || true
281
284
282
285
cp doc/assets/kibot/autogenerated.md hw/cam_profi.readme.md || true
283
286
284
287
cp -r doc_img/* doc/gen/img || true
285
288
cp -r doc_cad/cad/* doc/gen || true
286
289
cp -r hw_cam_profi/* hw/cam_profi || true
287
290
cp -r doc_sch/docs/* doc/gen || true
288
- cp -r doc_xml/* doc/gen || true
291
+ cp -r doc_xml/* hw/cam_profi || true
289
292
cp -r doc_sch/img/pcb/* doc/gen/img || true
290
293
cp -r doc_placement/doc* hw/cam_profi || true
291
- cp -r doc_pnp/* hw/cam_profi || true
292
294
cp -r doc_report/* doc/gen || true
295
+ cp -r doc_ibom/docs/* hw/cam_profi/ibom || true
293
296
294
-
295
297
rm -r doc_img || true
296
298
rm -r doc_cad || true
297
299
rm -r hw_cam_profi || true
298
300
rm -r doc_sch || true
299
301
rm -r doc_placement || true
300
- rm -r doc_pnp || true
301
302
rm -r doc_xml || true
302
303
rm -r doc_report || true
303
-
304
+ rm -r doc_ibom || true
305
+
306
+ tree
304
307
305
- - uses : stefanzweifel/git-auto-commit-action@v4
308
+ git add . -f
309
+
310
+ -
uses :
stefanzweifel/[email protected]
306
311
with :
307
312
commit_message : Update actions products
308
- add_options : ' -A'
309
- commit_options : ' -a'
310
-
313
+ add_options : ' -A -f'
0 commit comments