7 ms·
CI/CD with KiCad and Gitlab
- hkwerf 3y agoAt my previous job I, too, set up CI/CD from Schematics/PCB data to device documentation PDFs, 3D models for mechanical integration, and packages for several of our EMS (electronics manufacturing services, each required different data formats) and other items, such as part database management (EOL checks, availability, prices). I, too, used KiCad and Gitlab, and was honestly quite happy with it. The biggest problem was that at a professional scale, KiCad was crashing a bit more often than one would like and it was tedious to find and fix the bugs or work around them if they were already fixed upstream (which they often were). Still, this heavily sped up prototyping, as anybody could always fetch the data required to release or produce stuff. Shifting left works for electronics just as well as it does for software. :)
- ddoolin 3y agoWhat are some professional alternatives to KiCad? I've seen Altium (which already appears leagues ahead of KiCad, but the license fee is really high...) but none others.
- krasin 3y ago> What are some professional alternatives to KiCad? I've seen Altium (which already appears leagues ahead of KiCad, but the license fee is really high...) but none others. Kicad is on a good track to become as capable as Altium, if we judge over the last 3-4 years of the progress. I made it a habit to give them money annually via the Donate button on their front page: https://www.kicad.org https://www.kicad.org.
- hkwerf 3y agoAt least for many common use cases that is absolutely true. IMO other tools mostly excel at special tasks. Be it having a good component library, or less rocky integration with external tools, for example for FPGA/ASIC configuration or layout, so the stuff that is heavily driven by commercial interest in increasing an engineer's speed or lowering defect rate. (Disclaimer: Haven't been doing electronics for two years, though, as I switched to Software.)
- ChuckNorris89 3y agoCan I ask how did you switch career from hardware to swoftware?
- hkwerf 3y agoI'm a generalist with a degree in computer science and physics, experience in science (a little), software and electronics engineering, and a lot more non-technical stuff. While I'm certainly a lousy software engineer, it's more than enough to get hired in and around Munich.
- ChuckNorris89 3y agoCan I ask what kind of coding do you do at your current job? Embedded or web? I also want to make the switch from embedded software to higher level software but all employers scoff at my lack of modern SW experience. Also around Germany.
- bboygravity 3y agoI'm in a similar position (EE doing embedded programming with experience in Python C and C++ and a bunch of other stuff) and also thinking about switching to higher level stuff (web-apps, business apps, whatever). Also in Europe. My motivation: the higher level stuff seems easier with up to twice higher hourly rates, but most importantly: it seems way easier to get fully remote jobs in the higher level programming areas. I would even take a pay-cut in exchange for fully remote: it's my nr 1 motivator to switch to something else. What's your motivation if I may ask? Just curious.
- ChuckNorris89 3y ago>What's your motivation if I may ask? Just curious. Same. Mostly the possibility of WFH which is absent if you ever need to touch lower level HW. Pay I can take it or leave it. > the higher level stuff seems easier It's not really easier though. I had a 3 month stint doing some backend contract work and the amount of framework fuckery and the speed of development on live web systems that customers use, can be crazy stressful compared to embedded. It's like changing the components of a car, while driving it. Shit breaks much more often. Embedded felt much less stressful since any of my commits to production didn't instantly impact thousands of customers at once like on the web, with the risk of fucking their data or experience.
- hkwerf 3y agoThere's probably no single field where you will find more solutions to the same problem, maybe except for text editors? Common ones would be Mentor Xpedition, PADS, Cadence or OrCAD, though. Another irritatingly common one is Eagle, but last I used it it was quite a bit worse than KiCad. However, this is a small subset of the actual list. Chances are, there's many companies working with proprietary PCB designers that were discontinued 20 years ago or just maintained for a few companies.
- petsfed 3y agoEagle was popular because you could get it for free as a hobbyist. That suckered me in years ago, convinced my employer to pay for the license, and then they got acquired by Autodesk literally 2 weeks later and refused to honor the license we had just bought, so I had to guard my installer binary with my life. And then we ourselves got acquired by a company that could afford Altium. Last I used KiCad for much (ca 2018), I found the workflow to be kind of clunky so I never expended much effort to get really good with it. For instance, their footprint assignment scheme caused so many errors because you couldn't, at that time, assign footprints to a given part in the component editor. Thus, you could spend a lot of time getting the footprint just so, then not notice you fat fingered the footprint assignment unless you did the old trick of printing out your solder mask and hand populating your board. But whatever KiCad's current flaws, its not Fritzing, so that helps.
- kevin_thibedeau 3y agoKiCad has made significant improvements since 2018. There are still warts but it is much more polished overall.
- johnwalkr 3y agoKiCAD is clunky but Eagle is just plain weird. Even copy/paste is a completely unique workflow compared to anything I've ever seen.
- hkwerf 3y agoEagle's poor copy and paste when I had to use it at university was a real shocker. So much work for such a common task. And it was so easy to get it wrong. Sadly, it's not like KiCad excels there either. At least to my knowledge it's not possible to replicate a routed part of your module like it's already possible to reuse schematics sheets, is it?
- IshKebab 3y agoI think the other two big expensive pro ones are Mentor Expedition and Cadence Allegro. There's also NI Ultiboard. I haven't used any of them though. I don't think you need them unless you're doing really pro stuff (e.g. a PCIe card or motherboard) or RF design. On the free side they mostly suck. KiCad is powerful but has AWFUL usability. Don't bother unless you're willing to fight the software and spend hours on tutorials for things that should be trivial. Think early Blender but worse. The other free options are: * Eagle: Terrible. Do not bother. No idea why anyone uses this. Doesn't even get copy and paste right. * gEDA: Awful. Do not use. * DesignSpark PCB. This is very Windows 95 and a bit odd in some ways, but it's probably the easiest to use software and it's not limited like some free software (frequently there are board size or component count limits). Very decent option. If you're new to PCB design and use Windows I think I would maybe recommend this. Either this or... * Horizon EDA: A new option that uses the KiCad routing engine but is way more usable. I would say this is the best free option at the moment, and it's open source. Except maybe LibrePCB because... * LibrePCB: I haven't actually gotten around to trying this yet so I have no idea. May be good, may be awful.
- dima55 3y agogEDA was quite good when it was active. In the last few years the ringdove eda project is actively maintaining and improving pcb, while the lepton eda project is actively maintaining and improving the rest. They're quite good.
- timtzm 3y agoI’m experimenting with flux.ai. Browser based pcb design. It has promise and a good team.
- cushychicken 3y agoHow long ago was this? v6 has been very stable for me. Early v7 builds were a crap shoot. I may try again later this year but I'm really happy with v6 for now.
- hkwerf 3y agoMost of that work was done 2016 - 2020. Typically we saw issues when people jumped on new features in new releases, so it's pretty much excusable and we'd just forbid the use of these features as long as we didn't really need them. However, it was not uncommon. I always had a debug build of KiCad on my machine in order to replicate crashes or odd behavior others saw. It should be noted that we're generally talking about PCBs that could get pretty big and complicated. We certainly uncovered edge cases that were hard to foresee that way.
- cushychicken 3y agoCurious how big/complicated. I've never done anything more that 6 layers with ~200 cmpts placed in Kicad before.
- spyremeown 3y agoVery cool! Does anybody know something like a translator tool between all the different `yaml`s different CI/CD services use? Or maybe some metalanguage specifically made for that that can run instead of whatever hell dash/bash is. I wish I could just jump ships altering a `script` tag in whatever `yaml` from whichever service.
- pjot 3y agoTake a look at Cue! https://cuelang.org/ https://cuelang.org/
- cushychicken 3y agoSmashing job. I use kibot in a similar fashion locally to generate my fab packages for my kicad designs. I had it set up as a CI job for a while, but I ended up disabling it for a few reasons, the main one being that I just don't think it's a good idea to constantly create build artifacts for circuit board designs. It has created problems when people have circulated intermediate schematics generated by CI that don't match the hardware we built. You really only need to archive fab packages (by which I mean schematic, gerbers, BOM, assembly drawing, fab notes, etc) at the points in time where you fab and assemble a board. Creating more artifacts just creates the possibility for more noise. It's not like software CI as there's not really a way to automate hardware testing in a CI server. Very little incremental value in continuous artifact generation as a result.
- sschueller 3y agoYes, I was thinking of changing the pipeline to respond to only tags for outputs. Then i can just set a release tag when I am ready to send it to a fab.
- cushychicken 3y agoHow many people use the outputs of your pipeline, out of curiosity?
- sschueller 3y agoJust me. It's for my personal projects.
- cushychicken 3y agoAh OK. Way less chance of confusion that way. :) I've used kicad professionally for about three years now. That brief phase of using CI was in my current employer and we had some confusing weeks where no one knew which sch version was the right one. Being able to share out autogenerated schematics is one of those rare cases where CI hinders you rather than helps you. I'm sort of tunneling in on this one facet though. This is great work and I'll be reading it more closely when I get off the plane. I'll probably grab some of your kibot configs for myself!
- bb88 3y ago@sschueller Awesome job. Can you make a base gitlab project so anyone can fork it easily when anyone wants to create a new project?
- cushychicken 3y agoI'd also recommend submitting this as an example use of kibot to the kibot repo on GitHub. Kibot is really long on functionality - the maintainer is someone in South America who does a pretty incredible job of maintaining it and integrating commonly used plug-ins. The one thing it really lacks is a comprehensive starting example of how to use it and structure a YAML file. This would be a great example.
- imrehg 3y agoThis is very cool! As person doing small scale PCBs in a previous life, might just try to make things set up with my repo similarly (though have to find it first, might be in GitHub, so the idea would be the same but the tooling somewaht different). One thing that makes me wonder all the time are CI/CD runs that commit back to the repository. That feels weird for some reason I cannot articulate very well yet, but makes me think there should be a better way. Especially if the results are artefacts like that. Any experience by others to weigh in?
- brightball 3y agoDepends on the setup and branching execution rules I would think.
- rdxle579 3y ago[flagged]
- stefanoco 3y agoGreat!!! A big part of the value here is the clear and complete explanation, with pointers to external references. May I ask you how do you perform the part: “All these artifacts are commited back into the master and a version is applied. I also have a CHANGELOG.md which is automatically filled from commit messages (I used conventional commits to format my commit messages)”
- stefanoco 3y ago…found myself, I didn’t know about the full capabilities of semantic-release cited in the post!
- iamflimflam1 3y agoReally nice. Should be reasonably easy to turn into a GitHub workflow. Do you have any write ups on the blender rendering and animation? If that could be automated I know a lot of people who would love to use it.
- sschueller 3y agoI will make a write up for that as well when I get a chance.
- nimish 3y agoI've ripped out chunks of KiCad to run as CI/CD on the basic PCBs I have. KiCad's data and code is really not geared up for this, so quite a bit had to be hacked up to make it idempotent and even just to bring it up to basic C++ coding standards. I've been looking at upstreaming what I can and what would even make sense. Ultimately I've switched to mostly using non-KiCad python (dealing with the messy nature of the bundled python wasted 3 solid days, don't use it unless you must) to generate and manage a parts DB + vector drawings that are then processed into the KiCad formats. It works, but a lot of KiCad internals were simply never designed to handle this scenario. Even multiple PCBs are a pain. It uses multiple proprietary vector representations, some for rendering and some for analysis, etc. The file formats themselves are ok to deal with but aren't well-specified so they will change on you. Fortunately, the end Gerbers are well defined and it's often easier to simply generate those directly vs going through KiCad if the DRC are guaranteed by construction to never be violated
- stavros 3y agoI have done something similar, and have also successfully used the outputs with JLCPCB's assembly service, if you want something similar that's been tested and works: https://gitlab.com/stavros/sensor-board/ https://gitlab.com/stavros/sensor-board/
- tempodox 3y agoThe Blender render is the pinnacle. Awesome job.
- junon 3y agoSide note: where do people get their high-res, beautiful STEP models for renders? I use componentsearchengine but it's rare they have decent models for anything other than the primitive components.
- sschueller 3y agoI use what I can find on step files. Grabcad sometimes or directly from the component maker. The render on my page is however a bit more work. I graft textures over the parts and set material properties such as reflections. I will do a write up on it when I get a chance.
- junon 3y agoOkay so you're doing some extra stuff in Blender? Makes sense! Appreciate the response, it's beautiful work :)
- RF_Savage 3y agoManufacturer provided models, 3dcontentcentral and grabcad for me. In that sequence. Altiums built-in step model generator is also quite decent. Snapeda and componentsearchengine are also getting better.
- tuna-f1sh 3y agoI found KiBot configuration a bit overwhelming and with the addition of the ‘kicad-cli’ tool in KiCad 7 made a Makefile based runner: https://github.com/tuna-f1sh/kicad-makefile https://github.com/tuna-f1sh/kicad-makefile It allows for a build that is closer to the vanilla KiCad GUI experience and can be built locally with the normal install using ‘make’ - something I wanted.