Skip to content

Commit 4e8cc50

Browse files
authored
Merge pull request #52 from mdavidsaver
Add GHA running manufacturing.sh
2 parents 6e27804 + b832ced commit 4e8cc50

3 files changed

Lines changed: 64 additions & 10 deletions

File tree

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: manufacturing.sh
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
fab:
7+
name: Fab Outputs
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: script
12+
run: |
13+
cat <<EOF > runit.sh
14+
#!/bin/sh
15+
set -e -x
16+
cd /io
17+
18+
apt-get update
19+
apt-get install -yq git kicad xvfb xdotool python3-pip python3-xvfbwrapper python3-psutil zip
20+
21+
git config --global --add safe.directory /io
22+
23+
pip3 install --break-system-packages kiauto==2.2.1 kibom==1.9.1
24+
25+
cd design
26+
bash scripts/manufacturing.sh
27+
EOF
28+
chmod +x runit.sh
29+
docker run --rm --quiet \
30+
--pull=always \
31+
-v `pwd`:/io \
32+
debian:12 \
33+
/io/runit.sh
34+
35+
- name: output
36+
run: |
37+
set -e -x
38+
cd design
39+
for ff in *.zip
40+
do
41+
echo $ff
42+
ls -l $ff
43+
zipinfo $ff
44+
sha256sum $ff > ${ff}.sha256
45+
cat ${ff}.sha256
46+
done
47+
- name: zip
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: marble
51+
path: "design/*.zip*"
52+
- name: check
53+
run: >
54+
! unzip -p design/*.zip
55+
| strings
56+
| grep "$PWD"

design/scripts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ If you have made changes to the Marble design and are ready to generate the manu
1111
### Required software
1212

1313
* [KiCad](https://www.kicad.org/): version 6.0.x (x &ge; 9)
14-
* [KiBoM](https://github.com/SchrodingersGat/KiBoM): version 1.8.0
14+
* [KiBoM](https://github.com/SchrodingersGat/KiBoM): version 1.9.1
1515
* [KiAuto](https://github.com/INTI-CMNB/KiAuto): version 2.2.1
1616

1717
KiCad version 6 is needed.

design/scripts/manufacturing.sh

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
# run this script from the `Marble` project directory:
33
# $ bash scripts/manufacturing.sh
44
#
5-
# Versions tested on Debian Bullseye 2024-03-20:
5+
# Versions tested on Debian Bullseye 2025-04-07:
66
# KiCad 6.0.11 (wish for more varied experience)
7-
# KiBoM 1.8.0 (tested with commit ac29a12)
7+
# KiBoM 1.9.1
88
# kiauto 2.2.1 (tested natively, docker and chroot)
99
#
1010
# Installation process for kiauto:
11-
# sudo apt-get install xvfb xdotool python3-pip
11+
# sudo apt-get install git xvfb xdotool python3-pip
1212
# sudo apt-get install python3-xvfbwrapper python3-psutil
1313
# (or let pip3 find xvfbwrapper and psutil)
14-
# pip3 install kiauto==2.2.1
14+
# pip3 install kiauto==2.2.1 kibom==1.9.1
1515
#
1616
# No need to open the GUI! Everything can be done using this script,
1717
# including generation of the BOM .xml and IPC-D-356 Netlist files.
@@ -32,10 +32,8 @@ if ! test "$(echo A{B,C})" = "AB AC"; then
3232
exit 1
3333
fi
3434

35-
# KiBoM is cloned from
36-
# https://github.com/SchrodingersGat/KiBoM
37-
if ! python3 -m KiBOM_CLI --version; then
38-
echo "KiBoM not found in \$PYTHONPATH"
35+
if ! python3 -m kibom --version; then
36+
echo "kibom not found in \$PYTHONPATH"
3937
exit 1
4038
fi
4139

@@ -112,7 +110,7 @@ echo OK
112110

113111
# Run KiBoM from the command line
114112
echo running KiBoM
115-
python3 -m KiBOM_CLI --cfg scripts/bom.ini $A.xml $A
113+
python3 -m kibom --cfg scripts/bom.ini $A.xml $A
116114
echo KiBoM complete
117115

118116
# One more cross-check

0 commit comments

Comments
 (0)