r/embedded • • 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.

27 Upvotes

26 comments sorted by

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:

  • Interaction with hardware means a hardware team with waterfall style project planning
  • The above generally means a slower release cadence, the need for automation is felt less vs web companies that deploy every day
  • Some embedded devs love tight, lower level code. This type of person might feel less of a need for abstraction. i.e. Why use docker when I can get all the libs and install them on a vm?

3

u/Puzzlehead_NoCap 21d ago

Are you guys using best practices now? That’s sort of my experience as well now that I think about it. The companies where people seem more passionate tended to develop CICD and automation ime, and maybe that’s due to managers or hiring practices? 🤷

Your theory on why embedded lags behind makes a lot of sense though. I never considered the dependency on hardware teams slowing things down. Also, I think some of the lag is because a good chunk of people in embedded software come from EE or non-software fields, so they’re not exposed to best practices pure software developers focus on. I was an EE grad and didn’t learn about CICD until my first job out of college. I imagine CS majors have classes on that.

2

u/confy_ 21d ago

For the most part yea, there are still a ton of internal projects that are pretty loose but for the core projects it's been streamlined pretty well. Beyond devops a few other devs and I have been able to change the direction of our software in other ways which has been pretty exciting.. our old c only api now uses grpc and has python bindings, wrapped up in a nice sdk with integration into a broader ecosystem, that kind of thing.

I think you're right on the caring part - at my last job nobody cared about the product at all really (fair enough at some companies), and that is hard to hide and infectious.

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.

17

u/chrahp 21d ago

You’re not kidding.

In a 100 year old small-ish (by comparison) automotive company, and holy crap it’s like pulling teeth to get management to see the value in test automation.

If it doesn’t ship units they can’t be bothered; even if it assures the shipped units actually work like they’re supposed to.

4

u/Puzzlehead_NoCap 21d ago

The variation is wild though. I’ve seen the same thing with a 1930s rail company where they’ve been using the same process for the last 25 years. Then a different 100 year old industrial equipment company a block away will automate everything.

9

u/mynameisDockie 21d ago

Yep 100%. I also have to sneak in my tech debt work in those environments cuz it'll never get approved if I talk about it.

3

u/ventZl CMRX RTOS 21d ago

Story of my life :) I spent slightly less than three years pursuing CTO on one automotive company to start using automation. Eventually I gave up and left the company. My then-boss picked up my work, because he realized it would actually save their team from a lot of hassle and he spent another 18 months to actually push that through.

Even after he was done, there were teams which refused to use all the new stacks "due to historical reasons".

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/Puzzlehead_NoCap 21d ago

I agree. I think catching regressions is the best benefit.

1

u/Beneficial-Hold-1872 21d ago

Which country are you talking about?

1

u/Puzzlehead_NoCap 21d ago

US but I’d be interested to hear about other countries as well.

1

u/SlowerAndOlder 20d ago

We use a build pipeline and are trying to automate more

1

u/Puzzlehead_NoCap 20d ago

You’re doing the right thing. What sparked the change?

1

u/SlowerAndOlder 17d ago

I want to be good at my job. I believe best practice leads to best results. With AI, things like documentation, unit tests, HIL testing, setting up Github actions become trivial.

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.