CI/CD
-
Okay, so we would have 3 main things to do in our CI:
- Generate STEP files from FreeCAD
- Generate PDF files from KiCad
- Unittest (in the future) and generate binary/hex file
As from my point of view all of three sections should be separated in different repos and combined using
git submodules, though there are few problems I see, mostly inCAD:- CI/CD must know from which input files generate output files - as for now they are kind of mixed in main
CADfolder, so my proposition is to create separate folder for:
1.13D_printedparts, as these need to be converted from*.FCStdinto*.step
1.2.2D drawingsparts, likeCurrent Collector DrawingorGasket Drawingswhich needs to be translated from*.FCStdinto*.pdf
1.3. Renders which would require rendering whole assemblies - those could be placed inAssemblyfolder
We would end up with structure of:
. ├── 2D_drawings ├── 3D_print └── Assembly-
Electronicsis pretty simple, as there will be only KiCAD project, maybe the some kind of electronical/electrical calculations, though I think we are far from it now -
Similar with
Firmware, there would be simply two folders:srcandtests, but that is also a next step
I would love to hear other opinions, my idea is to create CI/CD as simple as possible, due to fact that I understand that many ppl who would like to contribute with CAD files might be not familiar with any CI/CD, and for that I came up with that folder idea
-
Okay so for CAD, I created a simple tutorial, mostly for myself, as I wanna go to sleep soon, and might forget what to do
This might be not optimal, or obsolete, I did not find another FreeCAD's docker imageEDIT: I have found a newer FreeCAD image, though it cointain GUI as well, thus works really weird without X server

-
Pull FreeCAD's docker image (maybe we would need to create an new FreeCAD's image, as this one seems to be pretty old FreeCAD wiki
-
run it in
CADfolder:
docker run --rm -it -v ${PWD}:/home/CAD amrit3701/freecad-cli:latest python3.8- Now we are in docker's image Python interpreter
Let's assume that we do have this tree as I mentioned in previous post:
We are choosing first one from
3D_printedfolder (ofc in the future we would iterate over files in given directory)>>> doc = FreeCAD.open(os.path.join("3D_printed", os.listdir("3D_printed")[0]))We find
bodyobject which (I hope) will be on 1st place:>>> doc.findObjects()[0].Shape.exportStep(f'{doc.Name}.step')Voila! We do have our STEP file
-
-
Oh, nice work! Would this be using the Woodpecker CI that Codeberg has? https://docs.codeberg.org/ci/
I also found where the LumenPNP developers have all their CI/CD workflows, for FreeCAD and KiCAD and such:
https://github.com/opulo-inc/lumenpnp/tree/main/.github/workflows
Maybe these could be used with minimal modification?
-
Stephen Hawes of Opulo has compiled some of their tools here:
The AutoBOM one seems to be based on those workflows above and looks pretty interesting
-
K kirk referenced this topic on
-
K kirk referenced this topic on
-
K kirk referenced this topic on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login