硬汉嵌入式论坛

 找回密码
 立即注册
查看: 900|回复: 0
收起左侧

[KiCad] 适用于 CI/CD 的 KiCad 自动化脚本的 Docker 镜像

[复制链接]

49

主题

49

回帖

196

积分

初级会员

积分
196
发表于 2023-2-14 11:03:50 | 显示全部楼层 |阅读模式
本帖最后由 taotieren 于 2023-2-14 11:05 编辑

适用于 CI/CD 的 KiCad 自动化脚本的 Docker 镜像

https://github.com/INTI-CMNB/kicad_auto

kicad_auto
Docker image for KiCad automation scripts suitable for CI/CD
The main objetive is to use it as a base for [color=var(--color-accent-fg)]KiCad automation in CI/CD environments.
The images are uploaded to [color=var(--color-accent-fg)]Docker Hub and GitHub: [color=var(--color-accent-fg)]Compatibility names, [color=var(--color-accent-fg)]KiCad 5 and [color=var(--color-accent-fg)]KiCad 6.
This image is based on [color=var(--color-accent-fg)]setsoft/kicad_debian and adds some automation tools to it:
  • [color=var(--color-accent-fg)]KiBot generate gerbers, drill, position files, etc.
  • [color=var(--color-accent-fg)]KiAuto runs DRC/ERC, prints schematics, PCB, etc.
  • [color=var(--color-accent-fg)]KiBoM generates HTML and CSV BoMs
  • [color=var(--color-accent-fg)]InteractiveHtmlBom generates interactive HTML BoMs
  • [color=var(--color-accent-fg)]PcbDraw generates 2D renders of the PCB
  • [color=var(--color-accent-fg)]KiCost generates BoMs with prices
  • [color=var(--color-accent-fg)]KiCad Git filters helps to reduce unneeded commits for KiCad files when using git
  • [color=var(--color-accent-fg)]KiCad PCB diff a tool to see differences between PCBs, can be used as git plugin


[C] 纯文本查看 复制代码
export USER_ID=$(id -u)
export GROUP_ID=$(id -g)
export WORKDIR=RELATIVE_PATH_TO_KICAD_PROJECTS
export SUBDIR=SUBDIR_INSIDE_WORKDIR
docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
    -v $(pwd)/$WORKDIR:/home/$USER/workdir \
    --user $USER_ID:$GROUP_ID \
    --env NO_AT_BRIDGE=1 \
    --workdir="/home/$USER" \
    --volume="/etc/group:/etc/group:ro" \
    --volume="/home/$USER/.config/kicad:/home/$USER/.config/kicad:rw" \
    --volume="/home/$USER/.cache/kicad:/home/$USER/.cache/kicad:rw" \
    --volume="/etc/passwd:/etc/passwd:ro" \
    --volume="/etc/shadow:/etc/shadow:ro" \
    setsoft/kicad_auto:10.3-5.1.5 /bin/bash -c "cd workdir/$SUBDIR; kiplot"

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2024-5-3 12:14 , Processed in 0.250480 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表