Using kibot and Github Actions for PCB design automation at 3devo #453
matthijskooijman
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all! Over the past weeks I've been working to use kibot and Github Actions to automate checks and generating outputs for the PCB designs for 3devo, a company I'm working for. At 3devo, we've been using KiCad for designing the boards in our machines for a few years and are now using the excellent KiBot tool to further structure our workflow.
This work has involved creating KiBot config files, github workflow configuration and some helper scripts. Since we suspect our work might be useful (or at least interesting) for others too, we've decided to publish it under a creative commons license. The PCB designs themselves will be kept private, but our workflow work lives in a separate repository, that is now public:
https://github.com/3devo/PCB-workflows
The repository has extensive documentation about how it is intended to be integrated into a project repository and how we implemented various things, so I won't go into much detail here - see the README there.
The basic idea is that there is to put minimal version information in the repository itself (i.e. put no version numbers in the kicad files themselves), so when you export things manually from KiCad, they will be shown as version "dev" (and not the most recently released version, which might be inaccurate if you made changes). Because the KiCad fiels in git will always just contiain "dev", there is no need to revert the version number back to "dev" after each release (which would be an alternative approach). To create a release you just add an entry to the changelog, tag it and push to github. The workflow then automatically inserts the version number from the tag into the project files for generating the build products only, so e.g. schematics show the right version.
In addition, the workflow can generate diffs from one release to the next (or from one commit to the next on intermediate branch pushes, or over a range of commits when pushing a PR), which is helpful to quickly see what changed exactly.
Note that currently, these scripts generate mostly documentation outputs (schematics, images, 3D views, etc.), but not fabrication outputs (gerbers, boms, position files) yet, since we are currently in the process of restructuring our fabrication process, so the right parameters for these need to be revisited later (but these should be easy to add - KiBot docs are great).
As an example of a release produced by this workflow, see:
There is also a small script to apply most of the needed changes to a repository containing a PCB design:
I'd like to finish with a big thank you to @set-soft. While creating this workflow, I have been generating a dozen or so github issues with suggestions for small improvements that would make our workflow nicer. @set-soft has been very quickly and thoroughly following up on all of these, implementing every single thing I threw at him. Much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions