本帖最后由 taotieren 于 2023-2-14 11:05 编辑
适用于 CI/CD 的 KiCad 自动化脚本的 Docker 镜像
https://github.com/INTI-CMNB/kicad_auto
kicad_autoDocker image for KiCad automation scripts suitable for CI/CD 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"
|