

Kibom test marked
PCB設計の自動テスト CI/CD パイプライン(KiBot + ngspice + GitHub Actions)
- Copper layers
- 6
- Thickness
- 1.6 mm
- Parts
- 14
- Nets
- 28
- Pads
- 28
- Tracks, vias
- 0, 0
- Routed
- Not yet
- KiCad
- KiCad 8.99 (file 20240108)
- Created
- 28 Mar 2026
- Updated
- 30 Mar 2026
Overview
Kibom test marked is an open-source printed circuit board by zumizumi0625, from the zumizumi0625/PCB_Auto_test repository on GitHub. It is a 6-layer board with 14 parts on 28 nets.
Its parts include 10 resistors and 4 capacitors.
README
README.mdPCB Auto Test
KiCad で設計した基板を GitHub に push するだけで、回路のチェックとシミュレーションが自動で走る CI/CD パイプライン。
何ができるか
push / PR するだけで以下が全自動で実行される:
- DRC(基板ルールチェック) — 配線間隔、ビア径、シルク被りなどの違反を検出
- ERC(電気ルールチェック) — 未接続ピン、電源ショート、ネット名重複を検出
- SPICE シミュレーション — 回路の電気的動作を自動検証
- Discord 通知 — テスト結果をチャンネルに自動投稿
- 製造ファイル生成 — Gerber、BOM、PDF、3D レンダー
テストが失敗したら波形画像も自動生成されて、Artifacts からダウンロードできる。
クイックスタート(自分の基板で使う)
Step 1: ファイルをコピー
自分の KiCad リポジトリに以下の 4 ファイルをコピーする:
自分のリポジトリ/
├── .github/workflows/pcb-ci.yml ← ワークフロー
├── .kibot.yml ← KiBot設定
├── .drc-exclusions.json ← DRC/ERC除外設定
├── simulation/run_simulations.py ← テストランナー
├── tools/generate_spice_tests.py ← 自動テスト生成
└── tools/check_drc_erc.py ← DRC/ERC検証スクリプトStep 2: KiCad バージョンを設定
.github/workflows/pcb-ci.yml の冒頭で KiCad バージョンを指定する。2 箇所を揃えること:
# ワークフロー冒頭の env
env:
KICAD_IMAGE_TAG: ki9 # ki8, ki9 など
# KiBot アクションの uses タグ(env 変数は使えないので手動で合わせる)
uses: INTI-CMNB/KiBot@v2_k9 # ← KICAD_IMAGE_TAG に合わせて変更| KiCad バージョン | KICAD_IMAGE_TAG | KiBot タグ |
|---|---|---|
| KiCad 8 | ki8 | INTI-CMNB/KiBot@v2_k8 |
| KiCad 9 | ki9 | INTI-CMNB/KiBot@v2_k9 |
KiCad のバージョンが合っていないと
KiCad was unable to open this fileエラーになる。
Step 3: ワークフローを修正
.github/workflows/pcb-ci.yml の matrix.project を自分の基板ファイルに合わせる:
matrix:
project:
- name: my-board
board: hardware/my-board.kicad_pcb
schema: hardware/my-board.kicad_schスキーマティックの自動テスト生成のパスも合わせる:
- name: Auto-generate SPICE tests from schematics
run: |
for sch in hardware/**/*.kicad_sch; do
python3 tools/generate_spice_tests.py "$sch" || true
doneStep 4: Discord 通知を設定(任意)
- Discord チャンネル → 設定 → 連携サービス → ウェブフック → URL をコピー
- GitHub リポジトリ → Settings → Secrets →
DISCORD_WEBHOOK_URLに URL を追加
Step 5: push する
git add -A && git commit -m "CI追加" && git pushGitHub Actions が自動で走る。結果は Actions タブと Discord で確認できる。
DRC/ERC 検証
CI は KiCad の DRC(Design Rule Check)と ERC(Electrical Rules Check)を実行し、違反の重大度に応じて pass/fail を判定する。
| 重大度 | CI への影響 | 例 |
|---|---|---|
| Error | CI 失敗 | 未接続ピン、コートヤード重なり、配線間隔不足 |
| Warning | レポートのみ | シルク被り、推奨外のビア径 |
| Excluded | 無視 | .drc-exclusions.json で除外した違反 |
意図的な未接続ピンの扱い
マイコンの未使用ピンなど、意図的に接続しないピンがある場合は KiCad 上で No Connect(×)フラグを付ける のが推奨。これにより ERC 違反にならない。
除外設定(.drc-exclusions.json)
No Connect フラグでは対応できない場合、除外設定ファイルで特定の違反を CI 判定から除外できる:
{
"excluded_types": ["silk_edge_clearance"],
"excluded_descriptions": ["Pin unconnected.*NC"]
}excluded_types: 違反タイプ名で完全一致除外excluded_descriptions: 違反の説明文を正規表現でマッチして除外
自動テスト生成
KiCad のスキーマティック(.kicad_sch)を解析して SPICE テストを自動生成する。
python3 tools/generate_spice_tests.py my-board.kicad_sch
# → simulation/auto_my-board.spice が生成される自動検出されるもの:
| 検出対象 | テスト内容 |
|---|---|
電源ネット(+3V3, +5V 等) | 電圧値チェック |
| 抵抗分圧回路 | 出力電圧が理論値 ±5% 以内か |
| LED + 電流制限抵抗 | 電流が定格内か |
| 全抵抗の合計 | 消費電力概算 |
CI では push のたびに全スキーマティックからテストを自動生成してから実行する。新しい基板を追加するだけでテストが増える。
手書きの SPICE テスト
特定の回路に対して詳細なテストを書きたい場合は、simulation/ に .spice ファイルを置く。置くだけで自動的にテスト対象になる。
テストの書き方
.title My Circuit Test
* --- 回路定義 ---
V1 in 0 DC 5
R1 in out 10k
R2 out 0 10k
.control
op
* 測定
let vout = v(out)
echo "Vout: $&vout V"
* 結果書き出し(テストランナーがパースする)
echo "RESULT:vout=$&vout" > simulation_results.txt
* Pass/Fail 判定
let pass = 1
if $&vout < 2.4
echo "FAIL: Vout too low"
let pass = 0
end
if $&vout > 2.6ルール:
.controlブロック内でsimulation_results.txtにSTATUS:PASSかSTATUS:FAILを書くRESULT:key=value形式で測定値を記録するとレポートに表示される- 最後に必ず
quitを入れる
同梱テストの一覧
| ファイル | 内容 | 検証項目 |
|---|---|---|
example_rc_filter.spice | RC ローパスフィルタ | カットオフ周波数 |
example_voltage_divider.spice | 抵抗分圧 | DC 出力電圧 |
i2c_bus_integrity.spice | I2C バス | 立ち上がり時間、VOL、VOH |
spi_signal_integrity.spice | SPI バス | オーバーシュート、セットアップタイム |
fault_overvoltage.spice | 過電圧保護 | TVS クランプ動作 |
montecarlo_reliability.spice | 部品公差 | 50 回モンテカルロサンプリング |
board_integration.spice | 基板間接続 | ケーブル越し電圧ドロップ、I2C 品質 |
radiation_set.spice | 放射線 SET | 3 段階パルス注入での耐性 |
crystal_oscillator.spice | 水晶発振 | 発振確認、周波数精度 |
periodic_reset.spice | 定期リセット | パルス周期、パルス幅 |
power_budget.spice | 消費電力 | サブシステム別電流、バッテリ寿命 |
Discord 通知の内容
テスト成功時
✅ PCB CI — All Passed
`abc1234` feat: 電源回路修正
✅ KiCad DRC/ERC: success
✅ SPICE Simulation: success
SPICE: 11/11 passed
✅ example_rc_filter.spice
✅ i2c_bus_integrity.spice
...テスト失敗時
❌ PCB CI — Failures Detected
`abc1234` fix: 抵抗値変更
❌ SPICE Simulation: failure
SPICE: 9/11 passed
❌ i2c_bus_integrity.spice
rise_time_ns = 2.07e-06
vol = 0.014
❌ montecarlo_reliability.spice
vout_min = 2.15失敗時は波形画像も GitHub Actions の Artifacts からダウンロード可能。
ローカルでの実行
ngspice(SPICE シミュレーション)
# インストール
sudo apt install ngspice # Ubuntu/Debian
sudo pacman -S ngspice # Arch
brew install ngspice # macOS
# テスト実行
python3 simulation/run_simulations.pyKiBot(DRC/ERC)
# Docker で実行(推奨)
docker run --rm -v $(pwd):/workdir ghcr.io/inti-cmnb/kicad_auto_test:latest \
kibot -c .kibot.yml \
-b hardware/example/batteryPack.kicad_pcb \
-e hardware/example/batteryPack.kicad_sch
# pip で直接インストール
pip install kibot
kibot -c .kibot.yml -b my-board.kicad_pcb -e my-board.kicad_schディレクトリ構成
PCB_Auto_test/
├── .github/workflows/
│ └── pcb-ci.yml # CI ワークフロー
├── .kibot.yml # KiBot 設定
├── hardware/
│ └── example/ # テスト用 KiCad データ
├── simulation/
│ ├── run_simulations.py # テストランナー
│ ├── example_*.spice # 基本テスト
│ ├── i2c_bus_integrity.spice # I2C テスト
│ ├── spi_signal_integrity.spice
│ ├── fault_overvoltage.spice # 過電圧保護
│ ├── radiation_set.spice # 放射線耐性
│ ├── crystal_oscillator.spice # 水晶発振
│ ├── periodic_reset.spice # ウォッチドッグ
│ ├── board_integration.spice # 基板間接続
│ ├── power_budget.spice # 消費電力
│ ├── montecarlo_reliability.spice # モンテカルロ
│ └── auto_*.spice # 自動生成テスト
├── tools/
│ ├── generate_spice_tests.py # ネットリスト→SPICE 変換
│ └── check_drc_erc.py # DRC/ERC 検証スクリプト
├── .drc-exclusions.json # DRC/ERC 除外設定
└── docs/CI パイプラインの全体像
push / PR
│
├── KiCad DRC/ERC (KiBot + kicad-cli)
│ ├── DRC レポート (JSON) → 重大度別に判定
│ ├── ERC レポート (JSON) → 重大度別に判定
│ ├── Error あり → CI 失敗
│ ├── Gerber ファイル
│ ├── BOM (HTML/CSV)
│ └── PDF / 3D レンダー
│
├── SPICE Simulation (ngspice)
│ ├── 自動テスト生成 (.kicad_sch → .spice)
│ ├── 全 .spice 実行
│ ├── JSON レポート出力
│ └── 失敗時: 波形画像生成
│
└── Discord 通知
├── 成功: サマリー
└── 失敗: 測定値・エラー詳細使用ツール
ライセンス
hardware/example/ のテストデータは KiBot のテストスイートから取得(GPL-3.0)。
Parts
14| Qty | Value | Footprint | References |
|---|---|---|---|
| 5 | 10K | Resistor_SMD:R_0805_2012Metric | R1, R2, R3, R4, R5 |
| 2 | 4K7 | Resistor_SMD:R_0603_1608Metric | R9, R10 |
| 1 | 0.01uF | Capacitor_SMD:C_0603_1608Metric | C3 |
| 1 | 0.01uf | Capacitor_SMD:C_0603_1608Metric | C4 |
| 1 | 10n | Capacitor_SMD:C_0603_1608Metric | C2 |
| 1 | 10nF | Capacitor_SMD:C_0603_1608Metric | C1 |
| 1 | 4.7K | Resistor_SMD:R_0805_2012Metric | R8 |
| 1 | 4700 | Resistor_SMD:R_0805_2012Metric | R7 |
| 1 | 4K7 | Resistor_SMD:R_0805_2012Metric | R6 |
Similar boards
- 6 layers45 × 45 mm

- 6 layers55.4 × 42.9 mm

Aity kids-4-LED board
chatelao/aityRP2040_LED-PCB-und-Software
Dieses Projekt bietet ein einfaches 4-LED-Board an, das mit einem Seeed Studio XIAO RP2040 (oder einem kompatiblen XIAO-Modul) betrieben wird.
14 parts - 6 layers48.4 × 48.4 mm

- 6 layers22.4 × 58.2 mm

Tc2-sim usb pcb
TheCacophonyProject/thermal-camera-v2
tc2-panel.py uses KiKit to build the manufacturing panel from the individual board files.
13 partsCERN-OHL-W-2.0 - 6 layers51 × 46 mm

- 6 layers26 × 42.5 mm

Stdc14-to arm10+8pin
edwa-rd/swd-converter
STDC14 / MIPI10 / ARM10 / 4x2pin conversion board(s)
13 partsGPL-3.0 - 6 layers34 × 60 mm

Board d
Alfredapp-hash/Guardian_One
Nets listed on the optional .kicadpcb shell match this table.
13 parts - 6 layers44 × 50.8 mm

Questions
What parts does the Kibom test marked use?
14 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Kibom test marked KiCad files?
From the zumizumi0625/PCB_Auto_test repository on GitHub, at the commit this page was made from: the board is hardware/example/kibom-test-marked.kicad_pcb and its schematic hardware/example/batteryPack.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Kibom test marked design in my own project?
Its repository states no licence, so its author keeps all rights: ask zumizumi0625 before reusing the design.