Stop treating PCB design like a one‑shot gamble. Start automating the boring stuff.
You already use Git for your firmware. Maybe you even have a CI pipeline that builds and tests your code on every commit. But what about your hardware?
Most hardware engineers still work the same way: design the board, export Gerbers manually, zip them up, email the file to the fab, and wait. If something goes wrong, you repeat the entire painful cycle – losing weeks and burning money.
Software teams solved this problem years ago with Continuous Integration and Continuous Delivery (CI/CD). The good news: you can apply the same thinking to PCB design. No, you don‘t need to become a DevOps expert. You just need to change a few habits and adopt a handful of free, open‑source tools.
This article walks you through why hardware CI/CD matters, what tools you need, and how to set up a simple pipeline that will catch errors before they ever reach the factory floor.
Why Hardware Needs CI/CD (A Painful Story)
Imagine you‘re designing a 4‑layer board for a new IoT product. You finish the layout, run DRC in your EDA tool, export Gerbers, and send them to the manufacturer. Two weeks later, the boards arrive – and half of them don’t work. The manufacturer’s DFM report shows a clearance violation that you missed because you were rushing.
You fix the layout, export again, and pay for another batch. Now you‘ve lost a month and spent thousands on re‑spins.
Now imagine a different workflow: every time you commit a change to your Git repository, an automated pipeline runs a full Design Rule Check, verifies your stackup against the manufacturer’s capabilities, and even generates a fresh set of Gerbers – all within minutes. If something is wrong, you find out immediately, while the design is still fresh in your mind.
That‘s not a dream. It’s perfectly achievable with tools that are available today, for free.
The Tools You‘ll Need (No Expensive Licenses)
You don‘t need to buy enterprise software. The following stack is open source or already integrated into platforms you probably use:
- Git– Version control for your schematics, layouts, and libraries.
- KiCad– Open‑source PCB design suite. Its files are stored as human‑readable text, which makes them Git‑friendly.
- GitHub Actions or GitLab CI – Popular CI platforms that let you run automated tasks on every push.
- KiBot – A command‑line tool that controls KiCad from scripts. It can export Gerbers, drill files, BOMs, and pick‑and‑place files, and even run ERC/DRC checks without opening the GUI.
- YAML– A simple language used to write pipeline definitions (no programming required).
If you‘re not using KiCad, many other EDA tools (Altium, Eagle, EasyEDA) also offer command‑line interfaces or can be integrated with third‑party scripts. But KiCad is the easiest to start with because of its text‑based file format and the excellent KiBot automation layer.
A Step‑by‑Step CI Pipeline (Without Writing Code)
Let’s walk through what a typical CI pipeline for a PCB project looks like – without drowning you in syntax. The goal is to understand the concepts, not to memorise commands.
1. Structure Your Repository
Treat your hardware design like a software project. Create a Git repository with a clear folder structure:
text
your-pcb-repo/
├── hardware/ → KiCad schematics, PCB files, project settings
├── assets/ → images, datasheets, mechanical drawings
├── docs/ → assembly notes, design documentation
└── .github/workflows/ → CI pipeline definition (text file)
Never commit generated files like Gerbers or BOMs. Let the pipeline create them fresh each time. This avoids the common mistake of sending an old Gerber version to the fab.
2. On Every Push, Automatically:
Once you‘ve set up the pipeline file, it will run automatically when you or your team push changes to specific branches (like main or a pull request). The pipeline typically performs these steps, one after another:
a. Run Electrical Rule Check (ERC)
The pipeline launches KiCad in headless mode and checks for common schematic errors: unconnected pins, missing power flags, duplicate reference designators. If ERC fails, the pipeline stops and the commit is marked as “broken.”
b. Run Design Rule Check (DRC)
Next, it checks the PCB layout against the clearance, width, and hole‑size rules you have defined. A typical DRC verifies that traces aren‘t too close to each other, annular rings are large enough, and the board outline is closed.
c. Generate Gerbers and Drill Files
If both checks pass, the pipeline exports fresh Gerber files (RS‑274X format) and an Excellon drill file. These are the exact files that you would send to a manufacturer.
d. Create a Bill of Materials (BOM) and Pick‑&‑Place File
The pipeline also generates a formatted BOM (usually CSV or Excel) and a centroid file with component coordinates, rotations, and side information. Those are essential if you order assembly.
e. Package and Archive
All generated files are automatically zipped and stored as “artifacts” – downloadable directly from the CI platform. No more manual zipping, no more emailing large attachments.
f. (Optional) Run a DFM Check via API
Some CI pipelines can call a manufacturer‘s DFM API (e.g., from PCBWay or JLCPCB) to check the board against their specific production rules. This adds another layer of safety but requires an API key.
3. Review the Results
After the pipeline finishes, you can open the artifacts, preview the Gerbers with a free online viewer, and inspect the BOM – all from your web browser. If you see a mistake, you fix it in KiCad, commit the change, and the pipeline runs again. By the time you‘re ready to order, you‘ve already validated the design dozens of times.
Real Benefits You‘ll Notice Immediately

One hardware team that adopted CI reported a 60% reduction in prototype re‑spins within two months. The cost was zero – just a weekend of setup.
What If You Don‘t Use KiCad?
The same principles apply, regardless of your EDA tool:
- Altium can be automated using its OutJob configuration and command‑line switches (-RunAction). Some teams run Altium inside a Windows CI runner.
- Eagleprovides a command‑line interface (eaglecon) that can execute user‑defined scripts (ULPs) to export Gerbers and run checks.
- EasyEDA has an API that allows you to export Gerbers programmatically.
The tools differ, but the mindset remains identical: automate validation and output generation.
Getting Started (Without Overwhelming Yourself)
You don‘t need a perfect pipeline from day one. Start small and iterate.
Week 1: Choose a small, finished PCB project – not your most complex one. Put its KiCad files under Git.
Week 2: Write a simple script (or copy an existing one) that runs DRC and exports Gerbers. Run it manually every time you change the board. Get comfortable with the commands.
Week 3: Move that script into a CI pipeline on GitHub or GitLab. Use a free repository (public or private). Test that it runs correctly on every push.
Week 4: Add ERC and BOM generation. Then add the artifact upload step. Invite a colleague to submit a pull request to your repo and see the pipeline execute.
Once you‘ve tasted the workflow, you‘ll never want to go back to manual exports.
Beyond CI – Continuous Delivery for Hardware
CI is about validation. Continuous Delivery (CD) takes it one step further: automatically releasing design packages to manufacturers.
In practice, this means that when you tag a commit as v2.0.0 (e.g., after a successful prototype run), the pipeline could automatically:
- Notify your contract manufacturer via email
- Upload the Gerbers to their portal
- Create a formal release on GitHub with all assembly files attached
This is still a frontier for hardware, but early adopters are already doing it. The technology is ready; the main barrier is habit.
Final Thought
Hardware engineering has lagged behind software in automation, but the gap is closing. By applying CI/CD principles to PCB design, you can catch errors earlier, collaborate more cleanly, and deliver better boards faster – without adding costly tools or complex processes.
Start small. Automate one check at a time. And next time you open your PCB layout, remember: every commit is an opportunity to let a machine do the boring work for you.
This article is brought to you by AnyPCBA, a PCB manufacturer that loves automation and small‑to‑medium volumes. We support KiCad, Altium, and EasyEDA – and we‘re happy to receive Gerbers straight from your CI pipeline.
🌐 www.anypcba.com
Top comments (0)