From c0f2f9d1e13593748cc14999e9a63cfbef568990 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Sun, 6 Apr 2025 11:51:54 +0100 Subject: [PATCH 1/2] update kibom from pypi --- design/scripts/README.md | 2 +- design/scripts/manufacturing.sh | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/design/scripts/README.md b/design/scripts/README.md index fe50bb2..69f64d0 100644 --- a/design/scripts/README.md +++ b/design/scripts/README.md @@ -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 ≥ 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. diff --git a/design/scripts/manufacturing.sh b/design/scripts/manufacturing.sh index 43b9827..1971a17 100644 --- a/design/scripts/manufacturing.sh +++ b/design/scripts/manufacturing.sh @@ -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. @@ -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 @@ -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 From b832ced48f336d67530abb20e56938e50e2dbb4a Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Sun, 6 Apr 2025 11:45:34 +0100 Subject: [PATCH 2/2] GHA run manufacturing.sh --- .github/workflows/manufacturing.yml | 56 +++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/manufacturing.yml diff --git a/.github/workflows/manufacturing.yml b/.github/workflows/manufacturing.yml new file mode 100644 index 0000000..ea97eb4 --- /dev/null +++ b/.github/workflows/manufacturing.yml @@ -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 < 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"