Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/manufacturing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: manufacturing.sh

on: [push, pull_request, workflow_dispatch]

jobs:
fab:
name: Fab Outputs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: script
run: |
cat <<EOF > runit.sh
#!/bin/sh
set -e -x
cd /io

apt-get update
apt-get install -yq git kicad xvfb xdotool python3-pip python3-xvfbwrapper python3-psutil zip

git config --global --add safe.directory /io

pip3 install --break-system-packages kiauto==2.2.1 kibom==1.9.1

cd design
bash scripts/manufacturing.sh
EOF
chmod +x runit.sh
docker run --rm --quiet \
--pull=always \
-v `pwd`:/io \
debian:12 \
/io/runit.sh

- name: output
run: |
set -e -x
cd design
for ff in *.zip
do
echo $ff
ls -l $ff
zipinfo $ff
sha256sum $ff > ${ff}.sha256
cat ${ff}.sha256
done
- name: zip
uses: actions/upload-artifact@v4
with:
name: marble
path: "design/*.zip*"
- name: check
run: >
! unzip -p design/*.zip
| strings
| grep "$PWD"
2 changes: 1 addition & 1 deletion design/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ If you have made changes to the Marble design and are ready to generate the manu
### Required software

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

KiCad version 6 is needed.
Expand Down
16 changes: 7 additions & 9 deletions design/scripts/manufacturing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
# run this script from the `Marble` project directory:
# $ bash scripts/manufacturing.sh
#
# Versions tested on Debian Bullseye 2024-03-20:
# Versions tested on Debian Bullseye 2025-04-07:
# KiCad 6.0.11 (wish for more varied experience)
# KiBoM 1.8.0 (tested with commit ac29a12)
# KiBoM 1.9.1
# kiauto 2.2.1 (tested natively, docker and chroot)
#
# Installation process for kiauto:
# sudo apt-get install xvfb xdotool python3-pip
# sudo apt-get install git xvfb xdotool python3-pip
# sudo apt-get install python3-xvfbwrapper python3-psutil
# (or let pip3 find xvfbwrapper and psutil)
# pip3 install kiauto==2.2.1
# pip3 install kiauto==2.2.1 kibom==1.9.1
#
# No need to open the GUI! Everything can be done using this script,
# including generation of the BOM .xml and IPC-D-356 Netlist files.
Expand All @@ -32,10 +32,8 @@ if ! test "$(echo A{B,C})" = "AB AC"; then
exit 1
fi

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

Expand Down Expand Up @@ -112,7 +110,7 @@ echo OK

# Run KiBoM from the command line
echo running KiBoM
python3 -m KiBOM_CLI --cfg scripts/bom.ini $A.xml $A
python3 -m kibom --cfg scripts/bom.ini $A.xml $A
echo KiBoM complete

# One more cross-check
Expand Down