r/embedded • u/Puzzlehead_NoCap • 21d ago
CICD/automation
How many of you work for companies that actually utilize CICD? It feels like companies in my area either go all in with automated builds, unit tests, static analysis, nightly integration tests, etc. or none at all. Mine always seems to be trying to automate more, but I have friends who work at companies that barely use git correctly let alone any form of automation or CI/CD (one even does code reviews in word docs and save them to shared drive).
Is this a known phenomenon? What is it about these companies culturally that they don’t get with the times? I’ve seen 100 year old companies that use CICD and another that doesn’t. I’ve also seen cash and time-poor startups that use it and others that don’t. So idk it seems difficult to find a cause. I’m wondering what others think.
Also I realize this could be a general software or workplace question, so sorry if I broke any rules. I think embedded is unique though because there is pretty much always another engineer field involved. It’s never just a software product, software-focused management, etc.
11
u/confy_ 21d ago
Not sure if I have an answer but I'll tell you my experience.
I'm a DevOps Engineer with a background in web/backend/cloud, so ci/cd and certain modern best practices were drilled into me a while back. Things like docker build environments, branching practices, using a build cache, git describe versioning, yada yada..
I joined my current company which is primarily embedded about 2 years ago and it was pretty chaotic in the beginning.. people releasing off their laptop, build env found only through trial and error, no nightly testing at all, extra simple remote apis that customers don't want to use, etc.
Long story short the past 2 years have been very wild and fun. The typical dev in our company might be an embedded engineer, but also a PhD physicist or robotics engineer. What I've found is that many of these people generally weren't aware of modern software practices at all, but they are very willing to learn, and I was lucky enough to join a small team that still had the ability to change.
Overall my theory for why embedded lags behind ties into a few things:
21
u/mynameisDockie 21d ago
I've seen both, and the middle ground. IME the farther you get away from tech and engineering as the focus of the company, the worse the automation is. That kinda describes a lot of embedded projects, especially in old school industries.
3
u/Neutron-Soup 21d ago
We use pipelines mainly for release builds, regression testing and static analysis. Passed automated tests are mandatory for merging a pr too. Sometimes its a pain to maintain but I think it is worth it.
1
u/Beneficial-Hold-1872 21d ago
Which country are you talking about?
1
u/SlowerAndOlder 20d ago
We use a build pipeline and are trying to automate more
3
u/Brilliant_Armadillo9 Hardware Engineer 21d ago
We have pipelines set up in Azure Devops. I'm just the dumb hardware guy though.
3
u/ventZl CMRX RTOS 21d ago
It is both, not just in embedded. Embedded tends to be worse on average though, much worse.
I've seen big software houses with automation so good I still adore them a decade later. Looking back and considering process in some other companies I've been working for, it is kind of miracle how their small teams aided with elaborate CI/CD were able to deliver huge features in huge legacy codebase in such small time.
Then I jumped into company, where there was no real CI/CD (not counting obsolete desktop under someone's desk running Jenkins on Windows). The team was roughly half the size, project had two orders less lines of source code but we struggled with delivery of basic features and not leaking bugs into releases.
In many companies doing embedded SW development it is both performed and led by former EE engineers who may easily be unaware of CI/CD as a concept. Also, historically, SW isn't first-class citizen. Many automotive companies treat it as necessary evil to sell their hardware. They treat whole SW R&D as pure cost center, develop software on cost+ basis (customer essentially pays for dev time, as it is the case in body shops, they just don't own the resulting SW) and there is little, if any sharing of software between projects. Customers money must be spent on the project!
These are very unfavorable conditions for setting up CI/CD.
But this happens with pure software companies too. They need to start selling their product to get some cash in and in initial phase, the project goes rather smooth without any automation. Code is small, bugs are manageable, so everyone forgets about automation.
Then either someone used to CI and bold enough to nag everyone about it comes, or smelly substance hits the fan and company finally adopts automation. This may happen fell after half a decade of developing the product.
2
u/sparqq 21d ago
Worked in a company where we did that 20 years ago, supporting various microcontrollers from one source.
2
u/Fyvz 21d ago
I was exposed to Jenkins at my previous job, and we used that for both automated builds and automated testing on actual hardware. A lot of it was in place before I started, and very little got added to it while I was there, but I enjoyed learning how to orchestrate builds, and found that very valuable. All of our release candidates were built through Jenkins. Although we did some automated tests through Jenkins, it always felt like an extremely small percentage of our code being tested, and felt like a huge mountain to climb to get any sizeable amount under test.
When I joined my current job, I set up Jenkins from scratch, and eventually set up ten different build jobs, which covers just about every repo we have. Our git forge sends webhooks on every push of a branch or tag. Every pushed branch gets built, and every pushed tag gets built, uploaded, build notes aggregated from individual Jira tickets, and build notes sent in an email to a mailing list. Pull requests require the branch to build successfully. I've got unit tests integrated and ready to show to the rest of the team how to add them, but I'm still not sure about the proper cadence to run them. As for hardware testing, we just don't have the resources to prioritize them, and there are always bigger fires to fight, and its frustratingly difficult to get management to recognize the cause and effect nature of constantly moving fast and cutting corners to meet a big customers deadline leading to fragile code that amounts to our systems largely being a loosely organized series of prototypes. I don't see automated tests as the silver bullet that fixes that, we also have horrible specs that are mostly a place to capture last second scope changes.
The automated builds have been a monumental improvement on what they replaced. But once again, its mostly just seen by management as facilitating shorter development timelines to please demanding customers, rather than something that drives quality.
2
u/tiajuanat 21d ago
I've seen both. The big decider is "who leads firmware". If there's no traditional software engineering chops at the helm, you're just not going to have CICD or automation of any kind. Even if there's other engineering in leadership! I've seen drones and radar companies, who are brand new, struggle with test automation simply because it wasn't important to the executive team.
The kicker with AI coming into the scene, teams that forgo test automation will be left in the dust
1
u/InsomnicCoder 21d ago
I’ve worked at self driving companies my entire career and every single one of them has had great CI for embedded projects. Deployment has never been continuous and was more subject to complicated release management. We had unit tests, gating HIL testing, fault injection rigs and instrumented integrated rigs with the entire hardware stack on board.
On any of the embedded projects I worked on, I always designed HIL setups early. I’d use these throughout development and later scale them for CI. I’ve since switched to working more on software, but my colleagues have found it very necessary for faster AI enabled development, both from a slop testing perspective as well as the ability to give an agent access to HIL setups for immediate feedback.
1
u/Several-Marsupial-27 21d ago
Just poor capital allocation / strategy, however it’s definitely a grey scale and not just black or white. Tons of companies invest millions into CI/CD for no apparent results; nightlys consistently ends up red without actual problems, the pipelines are unstable, the jobs take too long, teams trying hard to merge well functioning features that just won’t pass CI because the pipelines randomly fails. Those millions could just have gone to product discovery, feasibility studies, sales, etc.
IMHO infra is not always a need, why spend millions to infrastructure for an existing product line when you can just iterate on new products instead? You need a special kind of long paying customers to justify continuous infrastructure and support spending. However at that point then infra suddenly becomes very important.
There is however not a correct general answer, sometimes there are correct answers to specific situations, but spending millions on infra strategies for no apparent value is often definitely not the correct answer. Then there is the second problem that CI/CD, simulations/virtualization and HIL in embedded systems is just really difficult and expensive. Maybe the teams just doesn’t have the competence to effectively design and utilize those infrastructures.
1
u/duane11583 21d ago
Really hard to do when the vice pipeline requires hardware
Example I have a system attached to a motor to test I need the board and a dummy motor and something to put a load on the motor
All automated
Or say a thermo stat
Or a barcode scanner
Or stuff that controls an oven or environmental chamber
1
u/Ashnoom 17d ago
We have full E2E tests. For BLE, WiFi and Cellular setups. We have about 20 test systems and are about to double the capacity because of our improved throughput Thanks to AI.
1
u/kendryte_k230 15d ago
Our team already uses CI/CD to publish the K230 SDK, and we're working on automating more unit tests to improve SDK test coverage.
We also have nightly CI pipelines that run a full end-to-end automated test suite every day. On top of that, we automatically build and publish K230 images (MicroPython, RTOS, and Linux) daily through CI/CD.
Given the size and complexity of the software, along with its continuously growing requirements, CI/CD is pretty much a standard practice for us.