[HN Gopher] CI/CD with KiCad and Gitlab
___________________________________________________________________
CI/CD with KiCad and Gitlab
Author : sschueller
Score : 75 points
Date : 2023-05-12 20:49 UTC (2 hours ago)
HTML web link (sschueller.github.io)
TEXT w3m dump (sschueller.github.io)
| hkwerf wrote:
| At 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.
| :)
| cushychicken wrote:
| How 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 wrote:
| Most 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.
| ddoolin wrote:
| 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.
| krasin wrote:
| > 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.
| hkwerf wrote:
| At 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 wrote:
| Can I ask how did you switch career from hardware to
| swoftware?
| hkwerf wrote:
| I'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.
| hkwerf wrote:
| There'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 wrote:
| Eagle 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 wrote:
| KiCad has made significant improvements since 2018. There
| are still warts but it is much more polished overall.
| johnwalkr wrote:
| KiCAD is clunky but Eagle is just plain weird. Even
| copy/paste is a completely unique workflow compared to
| anything I've ever seen.
| hkwerf wrote:
| Eagle'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?
| johnwalkr wrote:
| It's kind of a miracle that the output files from all the
| solutions are standardized and work across the industry to
| automate production and you can get a PCB made for $1. In
| the mechanical CAD/manufacturing world there is a LOT of
| manual work and discussion required. There are now
| automated quoting services, but they just put the onus on
| the user to upload files and manually input details into a
| proprietary system.
| hkwerf wrote:
| I'm not an expert for mechanics, but isn't what you
| discuss for mechanics usually tolerances or properties
| that are not directly involved in the outline of a part,
| such as materials used or roughness?
|
| This stuff you still need to discuss. It's just that the
| basics are often enough. But, in my experience, if you
| want less than 0.3 mm tolerance on your PCB outline or a
| component needs a certain soldering cycle or method, you
| better tell your PCB manufacturer and you better do it on
| the phone, they may or may not look at the drawings. Once
| we only accidentally discovered that an isolator in a
| medical device was soldered using a temperature profile
| that exceeded its maximum temperature and thus the
| isolation was no longer guaranteed by the manufacturer.
| IshKebab wrote:
| I 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.
| cushychicken wrote:
| Smashing 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 wrote:
| Yes, 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 wrote:
| How many people use the outputs of your pipeline, out of
| curiosity?
| sschueller wrote:
| Just me. It's for my personal projects.
| teleforce wrote:
| I'm curious in what you meant by there's no way to
| automatically perform hardware testing in CI server?
|
| Is it hardware testing at the simulation/emulation level as a
| "digital twin" or hardware as testing as in hardware-in-the-
| loop (HLL)?
| bb88 wrote:
| @sschueller
|
| Awesome job.
|
| Can you make a base gitlab project so anyone can fork it easily
| when anyone wants to create a new project?
| spyremeown wrote:
| Very 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 wrote:
| Take a look at Cue!
|
| https://cuelang.org/
___________________________________________________________________
(page generated 2023-05-12 23:00 UTC)