Skip to main content
← Back to workflows

How to Use KiBot GitHub Action for Automating KiCad Outputs

INTI-CMNB/KiBot -
GitHub Action
v1.7.0
554
Contributors
Contributor - set-softContributor - johnbeardContributor - hkleen
Categories
CICUBE ANALYTICS INSIGHTS
Engineering Velocity: 25% Team Time Lost to CI Issues
View Platform →
3.5h
Time Saved/Dev/Week
40%
Faster Releases
Click for next insight
Usage
name: example

on:
push:
paths:
- '**.sch'
- '**.kicad_pcb'
pull_request:
paths:
- '**.sch'
- '**.kicad_pcb'

jobs:
example:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: INTI-CMNB/KiBot@v2
with:
# Required - kibot config file
config: config.kibot.yaml
# optional - prefix to output defined in config
dir: output
# optional - schematic file
schema: 'schematic.sch'
# optional - PCB design file
board: 'pcb.kicad_pcb'
- name: upload results
uses: actions/upload-artifact@v2
with:
name: output
path: output

KiBot logo

KiBot

KiCad automation utility


KiBot GitHub action, which allows for steps to be run automatically in generating fabrication and documentation files from KiCad projects. It significantly automates and integrates with CI/CD pipelines.

Integrating KiBot into our GitHub Actions workflow would substantially reduce manual effort toward generating KiCad outputs, ensuring consistency and saving time.

By automating the generation of outputs for KiCad projects using KiBot, we can further improve our CI/CD processes, making the electronic design files reliable and repeatable.

How to set up KiBot in your GitHub Actions?

Create a GitHub Workflow File

  • Add a new YAML file in your .github/workflows directory, for example, example.yml.
  • Define the workflow to trigger on push and pull_request events involving KiCad schematic (.sch) and PCB (.kicad_pcb) files.
name: example

on:
push:
paths:
- '**.sch'
- '**.kicad_pcb'
pull_request:
paths:
- '**.sch'
- '**.kicad_pcb'

jobs:
example:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: INTI-CMNB/KiBot@v2
with:
config: config.kibot.yaml
dir: output
schema: 'schematic.sch'
board: 'pcb.kicad_pcb'
- name: Upload results
uses: actions/upload-artifact@v2
with:
name: output
path: output

This workflow runs KiBot to generate outputs from your KiCad project files whenever changes are pushed or pull requests are made. It then uploads the generated files as artifacts.

How to configure KiBot settings?

Create a Configuration File

  • Add a config.kibot.yaml file in the root of your repository to define the parameters for the outputs you want KiBot to generate.

Example configuration:

version: 1
dbt-project-dir: my_dbt_project

This file sets the root directory for your dbt project, making the setup more flexible and avoiding repetitive path definitions in each hook.

How to set up additional configuration options?

Advanced Configuration

  • You can specify various optional parameters in the workflow file to fine-tune KiBot’s behavior.

Example with additional parameters:

- uses: INTI-CMNB/KiBot@v2
with:
additional_args: '--verbose'
cache3D: true
dir: output
install3D: true
quickstart: true
schema: 'schematic.sch'
skip: 'preflight'
targets: 'fabrication'
variant: 'default'
verbose: 2

These parameters enable features like 3D model caching, setting output directories, and controlling verbosity levels, among others.

This step ensures that the results generated by KiBot are stored as artifacts in GitHub, making them accessible for download and further use.