Code Monkey home page Code Monkey logo

kicad_auto's Introduction

kicad_auto

Docker image for KiCad automation scripts suitable for CI/CD

The main objetive is to use it as a base for KiCad automation in CI/CD environments.

The images are uploaded to Docker Hub and GitHub: KiCad 5, KiCad 6, KiCad 7, KiCad 8 and Old compatibility names,

This image is based on kicad_debian and adds some automation tools to it:

  • KiBot generate gerbers, drill, position files, etc.
  • KiAuto runs DRC/ERC, prints schematics, PCB, etc.
  • KiBoM generates HTML and CSV BoMs
  • InteractiveHtmlBom generates interactive HTML BoMs
  • KiCost generates BoMs with prices
  • KiCad Git filters helps to reduce unneeded commits for KiCad files when using git
  • KiDiff a tool to see differences between PCBs and schematics, can be used as git plugin
  • KiKit stencil and panelization tools

The relation between the packages that contains the images is as depicted in the following image:

Layers

Here are some of the available images:

KiCad 5

Name KiBot KiCad Debian KiAuto KiBoM iBoM KiCost DK plug PcbDraw KiDiff
setsoft/kicad_auto:10.3-5.1.5 0.2.4 5.1.5 10.3 1.3.1 1.6.3 2.3.1 -- -- -- --
setsoft/kicad_auto:10.4-5.1.6 0.7.0 5.1.6 10.4 1.4.2 1.8.0 2.3.3 -- -- 0.6.0-2 --
ghcr.io/inti-cmnb/kicad5_auto:1.2.0 1.2.0 5.1.9 10.4 1.6.15 1.8.0 2.5.0 1.1.10 0.1.1 0.9.0-3 --
ghcr.io/inti-cmnb/kicad5_auto:1.3.0 1.3.0 5.1.9 11.5 2.0.6 1.8.0-2 2.5.0 1.1.12 0.1.2 0.9.0-4 2.4.2
ghcr.io/inti-cmnb/kicad5_auto:1.4.0 1.4.0 5.1.9 11.5 2.0.6 1.8.0-3 2.5.0-2 1.1.15 0.1.2 0.9.0-5 2.4.3
ghcr.io/inti-cmnb/kicad5_auto:1.5.1 1.5.1 5.1.9 11.6 2.1.1 1.8.0-3 2.5.0-2 1.1.15 0.1.2 0.9.0-5 2.4.3
ghcr.io/inti-cmnb/kicad5_auto:1.6.0 1.6.0 5.1.9 11.6 2.2.1 1.8.0-3 2.5.0-3 1.1.15 0.1.2 -- 2.4.5
ghcr.io/inti-cmnb/kicad5_auto:1.6.1 1.6.1 5.1.9 11.6 2.2.1 1.8.0-3 2.5.0-3 1.1.15 0.1.2 -- 2.4.5
ghcr.io/inti-cmnb/kicad5_auto:1.6.2 1.6.2 5.1.9 11.6 2.2.6 1.9.0 2.6.0 1.1.17 0.1.2 -- 2.4.7
ghcr.io/inti-cmnb/kicad5_auto:1.6.3 1.6.3 5.1.9 11.6 2.2.8 1.9.1 2.8.1 1.1.18 0.1.2 -- 2.5.3
ghcr.io/inti-cmnb/kicad5_auto:1.6.4 1.6.4 5.1.9 11.6 2.3.0 1.9.1 2.8.1 1.1.18 0.1.2 -- 2.5.3
ghcr.io/inti-cmnb/kicad5_auto:1.6.5 1.6.5 5.1.9 11.6 2.3.1 1.9.1 2.9.0 1.1.18 0.1.3 -- 2.5.3

KiCad 6

Name KiBot KiCad Debian KiAuto KiBoM iBoM KiCost DK plug PcbDraw KiDiff KiKit
setsoft/kicad_auto:ki6.0.0_Ubuntu21.10 0.11.0 6.0.0 U21.10 1.6.5 1.8.0 2.4.1 1.1.15 0.1.2 0.9.0-1 -- --
ghcr.io/inti-cmnb/kicad6_auto:1.2.0 1.2.0 6.0.5 11.3 1.6.15 1.8.0-2 2.5.0 1.1.10 0.1.1 0.9.0-3 -- --
ghcr.io/inti-cmnb/kicad6_auto:1.3.0 1.3.0 6.0.7 11.5 2.0.6 1.8.0-2 2.5.0 1.1.12 0.1.2 0.9.0-4 2.4.2 --
ghcr.io/inti-cmnb/kicad6_auto:1.5.1 1.5.1 6.0.10 11.6 2.1.1 1.8.0-3 2.5.0-2 1.1.15 0.1.2 0.9.0-5 2.4.3 1.2.0
ghcr.io/inti-cmnb/kicad6_auto:1.6.0 1.6.0 6.0.11 11.6 2.2.1 1.8.0-3 2.5.0-3 1.1.15 0.1.2 -- 2.4.5 1.3.0-5
ghcr.io/inti-cmnb/kicad6_auto:1.6.1 1.6.1 6.0.11 11.6 2.2.1 1.8.0-3 2.5.0-3 1.1.15 0.1.2 -- 2.4.5 1.3.0-5
ghcr.io/inti-cmnb/kicad6_auto:1.6.2 1.6.2 6.0.11 11.6 2.2.6 1.9.0 2.6.0 1.1.17 0.1.2 -- 2.4.7 1.3.0-7
ghcr.io/inti-cmnb/kicad6_auto:1.6.3 1.6.3 6.0.11 12.1 2.2.8 1.9.1 2.8.1 1.1.18 0.1.2 -- 2.5.3 1.4.0
ghcr.io/inti-cmnb/kicad6_auto:1.6.4 1.6.4 6.0.11 12.1 2.3.0 1.9.1 2.8.1 1.1.18 0.1.2 -- 2.5.3 1.5.1
ghcr.io/inti-cmnb/kicad6_auto:1.6.5 1.6.5 6.0.11 12.1 2.3.1 1.9.1 2.9.0 1.1.18 0.1.3 -- 2.5.3 1.5.1

KiCad 7

Name KiBot KiCad Debian KiAuto KiBoM iBoM KiCost DK plug KiDiff KiKit
ghcr.io/inti-cmnb/kicad7_auto:1.6.1 1.6.1 7.0.1.1 11.6 2.2.1 1.8.0-3 2.5.0-3 1.1.15 0.1.2 2.4.5 1.3.0-5
ghcr.io/inti-cmnb/kicad7_auto:1.6.2 1.6.2 7.0.5.1 11.6 2.2.6 1.9.0 2.6.0 1.1.17 0.1.2 2.4.7 1.3.0-7
ghcr.io/inti-cmnb/kicad7_auto:1.6.3 1.6.3 7.0.10 12.1 2.2.8 1.9.1 2.8.1 1.1.18 0.1.2 2.5.3 1.4.0
ghcr.io/inti-cmnb/kicad7_auto:1.6.4 1.6.4 7.0.11 12.1 2.3.0 1.9.1 2.9.0 1.1.18 0.1.2 2.5.3 1.5.1
ghcr.io/inti-cmnb/kicad7_auto:1.6.5 1.6.5 7.0.11 12.1 2.3.1 1.9.1 2.9.0 1.1.18 0.1.3 2.5.3 1.5.1

KiCad 8

Name KiBot KiCad Debian KiAuto KiBoM iBoM KiCost DK plug KiDiff KiKit
ghcr.io/inti-cmnb/kicad8_auto:1.6.4 1.6.4 8.0.1 sid 2.3.0 1.9.1 2.9.0 1.1.18 0.1.2 2.5.3 1.5.1
ghcr.io/inti-cmnb/kicad8_auto:1.6.5 1.6.5 8.0.1 sid 2.3.1 1.9.1 2.9.0 1.1.18 0.1.3 2.5.3 1.5.1

You can run it using a script like this:

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" \
    ghcr.io/inti-cmnb/kicad7_auto:1.6.4 /bin/bash -c "cd workdir/$SUBDIR; kibot"

kicad_auto's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kicad_auto's Issues

ERROR:Time-out waiting for eeschema, giving up

Running the following command:

export SUBDIR=kicad-ci-test-spora/pcb_main export WORKDIR=test-repos 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:latest /bin/bash -c "cd workdir/$SUBDIR; kiplot"

Produces:

ERROR:Output from command:

../src/common/stdpbase.cpp(62): assert "traits" failed in Get(): create wxApp before calling this
ERROR:Time-out waiting for eeschema, giving up (eeschema_do - eeschema_do:156)
(kibot.kibot.kiplot - kiplot.py:146)
ERROR:eeschema_do returned 10 (kibot.kibot.out_pdf_sch_print - out_pdf_sch_print.py:56)

I pulled the kicad_auto image and I am running https://github.com/INTI-CMNB/kicad-ci-test-spora

Environment: Debian 10 with XFCE4 desktop on Digital Ocean

Unrecognizeable error

I am getting this error, any ideas?

The CI code is here

2022-03-25T23:57:34.8950947Z WARNING:(W037) Field Datasheet of component J9 (USB_A Bottom Camera) contains extra spaces: ` ~` removing them. (kibot - v5_sch.py:1029)
2022-03-25T23:57:34.8952180Z WARNING:(W037) Field Datasheet of component J10 (USB_A AUX USB) contains extra spaces: ` ~` removing them. (kibot - v5_sch.py:1029)
2022-03-25T23:57:34.8953192Z WARNING:(W037) Field Datasheet of component J11 (USB_A Top Camera) contains extra spaces: ` ~` removing them. (kibot - v5_sch.py:1029)
2022-03-25T23:57:34.8959092Z WARNING:(W037) Field JLCPCB of component R20 (R_Small 5.1k) contains extra spaces: ` C27834` removing them. (kibot - v5_sch.py:1029)
2022-03-25T23:57:34.8960153Z WARNING:(W037) Field JLCPCB of component R22 (R_Small 5.1k) contains extra spaces: ` C27834` removing them. (kibot - v5_sch.py:1029)
2022-03-25T23:57:34.8961087Z WARNING:(W037) Field JLCPCB of component R28 (R_Small 120) contains extra spaces: ` C17437` removing them. (kibot - v5_sch.py:1029)
2022-03-25T23:57:34.8962600Z WARNING:(W037) Field LCSC of component R28 (R_Small 120) contains extra spaces: `C131390 ` removing them. (kibot - v5_sch.py:1029)
2022-03-25T23:57:34.8964586Z WARNING:(W037) Field Mouser of component U14 (MAX3078E) contains extra spaces: `700-MAX3078EESA ` removing them. (kibot - v5_sch.py:1029)
2022-03-25T23:57:34.8971425Z - Running the ERC
2022-03-25T23:57:46.5985840Z WARNING:(W058) Missing KiCad main config file /github/home/.config/kicad/6.0/kicad_common.json (eeschema_do - misc.py:177) (kibot - kiplot.py:152)
2022-03-25T23:57:46.5986505Z WARNING:(W058) Eeschema failed to start retrying ... (eeschema_do - eeschema_do:628) (kibot - kiplot.py:152)
2022-03-25T23:57:46.5991560Z - Updating BoM in XML format
2022-03-25T23:58:04.0717002Z - 'Interactive Bill of Materials' (ibom) [ibom]
2022-03-25T23:58:04.0757152Z WARNING:(W013) `G***` component in board, but not in schematic (kibot - kiplot.py:288)
2022-03-25T23:58:04.0786186Z WARNING:(W013) `svg2mod` component in board, but not in schematic (kibot - kiplot.py:288)
2022-03-25T23:58:04.0786772Z WARNING:(W013) `kibuzzard-61025CA6` component in board, but not in schematic (kibot - kiplot.py:288)
2022-03-25T23:58:04.0787300Z WARNING:(W013) `kibuzzard-61046E92` component in board, but not in schematic (kibot - kiplot.py:288)
2022-03-25T23:58:04.0787840Z WARNING:(W013) `kibuzzard-61046EDB` component in board, but not in schematic (kibot - kiplot.py:288)
2022-03-25T23:58:06.1998185Z - 'Bill of Materials' (bom) [bom]
2022-03-25T23:58:06.2585247Z - 'HTML BOM' (html_bom) [bom]
2022-03-25T23:58:06.3132118Z - 'Print schematic (PDF)' (print_sch) [pdf_sch_print]
2022-03-25T23:58:16.5660130Z ERROR:Eeschema created an error dialog, expect a fail (eeschema_do - eeschema_do:66) (kibot - kiplot.py:149)
2022-03-25T23:58:16.5661026Z ERROR:Eeschema failed to start or reported a fatal error (eeschema_do - eeschema_do:633) (kibot - kiplot.py:149)
2022-03-25T23:58:16.5661514Z ERROR:eeschema_do returned 10 (kibot - out_pdf_sch_print.py:73)
2022-03-25T23:58:16.7098333Z ##[error]Process completed with exit code 12.

Proper CI image for KiCAD 5?

We're holding off a little while longer before beginning our migration to KiCAD 6.

Which version of this package should I point to for a CI runner? The GitLab example seems to point to the KiCAD 6 image:

image:
  name: setsoft/kicad_auto:dev_k6

And throws some errors that appear to be associated with Kicad 6.0 config files.

Downloading artifacts
00:01
Running before_script and script
00:08
 $ [ -f quad_uart.sch ] && kibot -e quad_uart.sch -b quad_uart.kicad_pcb -c config.kibot.yaml print_sch
WARNING:(W008) Unable to find KiCad configuration file (/root/.config/kicad/6.0/kicad_common.json) (kibot - config.py:144)
WARNING:(W010) Unable to find KiCad 3D modules (kibot - config.py:300)
 ERROR:At line 1 of `/usr/share/kicad/symbols/Regulator_Linear.kicad_sym`: Missing library signature (kibot - kiplot.py:264) 
 ERROR:Line content: `(kicad_symbol_lib (version 20211014) (generator kicad_symbol_editor)` (kibot - kiplot.py:265)
Running after_script
Uploading artifacts for failed job
 Uploading artifacts...
 WARNING: Schematic_*.pdf: no matching files        
 ERROR: No files to upload                          
 ERROR: Job failed: command terminated with exit code 1

Add support for arm64 architecture

Can you add arm64 architecture image?
This would allow for easy deployment on Raspberry Pi boards an other ARM-based computers which begin to gain popularity.

ibom generation has broken

Something has changed in the last 3 days (time since last successful build using KiBot in GitHub Actions) that has broken ibom generation:

DEBUG:Doing Interactive BoM (kibot - out_ibom.py:141)
DEBUG:Running: ['generate_interactive_bom.py', '/github/workspace/gpwdev/gpwdev.kicad_pcb', '--dest-dir', '/github/workspace/output/gpwdev', '--no-browser', '--bom-view', 'left-right', '--checkboxes', 'Sourced,Placed', '--extra-data-file', '/github/workspace/gpwdev/gpwdev.xml', '--extra-fields', 'MPN,SPN', '--include-nets', '--include-tracks', '--layer-view', 'FB', '--name-format', 'ibom', '--sort-order', 'C,R,L,D,U,Y,X,F,SW,A,~,HS,CNN,J,P,NT,MH'] (kibot - out_ibom.py:176)
ERROR:Failed to create BoM, error 1 (kibot - out_ibom.py:184)
DEBUG:Output from command: Loading /github/workspace/gpwdev/gpwdev.kicad_pcb
Traceback (most recent call last):
  File "/usr/bin/generate_interactive_bom.py", line 71, in <module>
    ibom.main(parser, config, logger)
  File "/usr/lib/python3/dist-packages/InteractiveHtmlBom/core/ibom.py", line 331, in main
    pcbdata, components = parser.parse()
  File "/usr/lib/python3/dist-packages/InteractiveHtmlBom/ecad/kicad.py", line 716, in parse
    "fabrication": self.parse_drawings_on_layers(
  File "/usr/lib/python3/dist-packages/InteractiveHtmlBom/ecad/kicad.py", line 360, in parse_drawings_on_layers
    for drawing in self.parse_drawing(d[1]):
  File "/usr/lib/python3/dist-packages/InteractiveHtmlBom/ecad/kicad.py", line 325, in parse_drawing
    result.append(self.parse_dimension(d))
  File "/usr/lib/python3/dist-packages/InteractiveHtmlBom/ecad/kicad.py", line 296, in parse_dimension
    for s in d.GetShapes():
TypeError: 'SwigPyObject' object is not iterable
 (kibot - out_ibom.py:186)

There have been no changes to the gpwdev.kicad_pcb file since the last successful build.

KiCad 7 Docker images are not using the latest KiCad releases

When running kicad-cli version using ghcr.io/inti-cmnb/kicad7_auto:latest the version reported is 7.0.8 and the version reported by setsoft/kicad_auto:nightlyis even older (<9 months as it doesn't have kicad-cli available).

A recent commit to KiCad 7 added the ability to import Specctra SES files in headless mode through Python, which enables automated Freerouting workflows. It would be nice to have fresh images to play with.

PermissionError / Operation not permitted

So I created this simple Dockerfile:

FROM ghcr.io/inti-cmnb/kicad7_auto:1.6.3-2_k7.0.9_d12.1

WORKDIR /

Then executed docker build . -t test_builder and finally docker run --rm -v ${PWD}:/project test_builder kibot --quick-start --dry but the last command errors out:

Traceback (most recent call last):
  File "/usr/bin/kibot", line 33, in <module>
    sys.exit(load_entry_point('kibot==1.6.3', 'console_scripts', 'kibot')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/kibot/__main__.py", line 470, in main
    generate_examples(args.start, args.dry, args.type)
  File "/usr/lib/python3/dist-packages/kibot/kiplot.py", line 1048, in generate_examples
    for f in _walk(start_dir, 6):
  File "/usr/lib/python3/dist-packages/kibot/kiplot.py", line 981, in _walk
    yield from _walk(entry.path, depth)
  File "/usr/lib/python3/dist-packages/kibot/kiplot.py", line 981, in _walk
    yield from _walk(entry.path, depth)
  File "/usr/lib/python3/dist-packages/kibot/kiplot.py", line 981, in _walk
    yield from _walk(entry.path, depth)
  [Previous line repeated 2 more times]
  File "/usr/lib/python3/dist-packages/kibot/kiplot.py", line 980, in _walk
    if entry.is_dir() and depth > 0:
       ^^^^^^^^^^^^^^
PermissionError: [Errno 1] Operation not permitted: './proc/self/fd/5/map_files/400000-41f000'

No zip?

The container doesn't seem to include /usr/bin/zip. This makes it difficult to create custom Zip files of the build outputs in a pipeline.

(In my case I wanted to rename some of the outputs, but only when building a release against a pushed tag, and them zip them).

Would you be OK with a PR to add it?

KiCad and library version mismatch in 1.6.4

In the latest kicad_auto release, which is 1.6.4, the main KiCad version and the library versions are not the same.

$ docker run -it ghcr.io/inti-cmnb/kicad7_auto:1.6.4 /bin/bash
root@51b1fee6c322:/# apt list kicad*
Listing... Done
kicad-footprints/now 7.0.9-0~ubuntu23.04.1 all [installed,local]
kicad-git-filters/now 1.0.1-1 all [installed,local]
kicad-symbols/now 7.0.9-0~ubuntu23.04.1 all [installed,local]
kicad-templates/now 7.0.9-0~ubuntu23.04.1 all [installed,local]
kicad/now 7.0.10~ubuntu23.04.1 amd64 [installed,local]
root@51b1fee6c322:/# 

I would expect the library version to be the same as KiCad (7.0.10) and not 7.0.9

In my case, this causes incorrect ERC warnings that don't appear when ERC is run manually in KiCad.

e.g. WARNING:(lib_symbol_issues) Symbol 'Buzzer' has been modified in library 'Device'

kicad7_auto:latest and problems with kikit

kikit from kicad7_auto: latest complains as below:

Gtk-Message: 21:30:19.301: Failed to load module "canberra-gtk-module"

The same version of kikit (1.3.0-7) installed on the host processes the same set of files without any problem.

'kicad' Segmentation fault when not setting user to root

I am working on setting kibot up under windows.
The 'kibot" script is provided further below.

I installed VcXsrv . When in interactive mode, I can run kicost and I get the kicost UI from the docker VM, but when running kicad as a non-root user, I get a Segmentation fault . When setting user and group to root, I get the kicad UI.

I tried both dev and the release mentioned in the script.

I run make KIBOT=./kibot where kibot is in the current directory.

I tried the kibot_variants_arduprog demo project.
I always end up with an interactive shell, which may be my script (I am working on it).

The core issue is the Segmentation fault for a non-root user in the Docker VM.

Script (with root as user, not the current user name):

#!/bin/bash
#IMAGE=setsoft/kicad_auto:10.3-5.1.5
#IMAGE=setsoft/kicad_auto:dev
IMAGE=setsoft/kicad_auto:latest
export USER_ID=$(id -u)
export GROUP_ID=$(id -g)
# Using root on windows
USER_ID=0
group_ID=0
export WORKDIR=$(realpath "$(dirname $0)/..")
export SUBDIR=$(basename $0)
export WORKDIR=$(realpath "$(dirname $0)")
export SUBDIR=.
export DISPLAY=${DISPLAY:=0}
export HOMEDIR=$(realpath "$(dirname $0)/..")/kibot
if [ ${USER_ID} != 0 ] ; then
  export TGTHOMEDIR="/home/${USER}"
else
  export TGTHOMEDIR="/root"
fi

# Quote arguments
ARGS=""
for i in "$@" ; do
    ARGS=$ARGS" '"${i/\'/\\\'}"'"
done
#ARGS="$@"

# In case of windows batch
# for /f "delims=[] tokens=2" %%a in ('ping -4 -n 1 %ComputerName% ^| findstr [') do set NetworkIP=%%a
# echo Network IP: %NetworkIP
IP=$(ping -4 -n 1 ${COMPUTERNAME}|head -2|tail -1|perl -p -e 's/^.*?\[(.*?)\].*/$1/;')
DISPLAY=$IP:0.0

mkdir -p $HOMEDIR
WORKDIR=$(cygpath -w "$WORKDIR")
HOMEDIR=$(cygpath -w "$HOMEDIR")
#
# passwd & shadow not propagated on windows, using root user
#  --user $USER_ID:$GROUP_ID \
#ETC=$(cygpath -w "/etc")
#ETC=/etc
#    --volume="${ETC}/passwd:/etc/passwd:ro" \
#    --volume="${ETC}/shadow:/etc/shadow:ro" \
#    --volume="${ETC}/group:/etc/group:ro" \
#
#echo $ARGS
docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
    -v $WORKDIR:${TGTHOMEDIR}/workdir \
    --env NO_AT_BRIDGE=1 \
    --workdir="${TGTHOMEDIR}" \
    --volume="${HOMEDIR}/.config/kicad:${TGTHOMEDIR}/.config/kicad:rw" \
    --volume="${HOMEDIR}/.cache/kicad:${TGTHOMEDIR}/.cache/kicad:rw" \
    $IMAGE /bin/bash -c "cd workdir/$SUBDIR ; $ARGS"

If the above script is called './kicad_auto' then you can launch kicad using:

./kicad_auto kicad

It's not that complex to adapt that script to a windows bat script (quoting the arguments seems to be the hardest part).

eeschema_do Segmentation fault (core dumped) error

Running the following command:
eeschema_do run_erc <MY_SCHEMATIC> <MY_REPORT_FOLDER>
generates:
Segmentation fault (core dumped)

Running:
eeschema_do -h
works as expected

Running:
eeschema_do run_erc
generates the missing parameters error as expected.

The docker run command is:
$ docker run -t -d -u 1001:1001 -w /var/lib/jenkins/workspace/<MY_GITHUB_REPO> -v /var/lib/jenkins/workspace/<MY_GITHUB_REPO>:/var/lib/jenkins/workspace/<MY_GITHUB_REPO>:rw,z -v /var/lib/jenkins/workspace/<MY_GITHUB_REPO>@tmp:/var/lib/jenkins/workspace/<MY_GITHUB_REPO>@tmp:rw,z -e setsoft/kicad_auto:latest cat
(Repo info has been sanitized)

I am using Jenkins 2.303.2 with a declarative Jenkinsfile Pipeline, running docker on Ubuntu 20.04.

use new version of InteractiveHtmlBom

in docker image kicad7_auto_full:dab7a024aecb (latest at the time of writing this issue) is used plugin InteractiveHtmlBom version 2.7.0. This version has broken handling of kicad DNP field (configuration entry dnp_field: 'kicad_dnp' has no effect). This was fixed in later versions, it is working in v2.8.1. If I manually copy new version of plugin inside dunning docker image, configuration entry dnp_field: 'kicad_dnp' is working as expected.

Could you put new version of InteractiveHtmlBom to the docker image?

kidiff installation seems to be broken

Currently I use kicad8_auto:latest and my GitLab pipeline fails very early because the docker image seems to be broken.

I install into the docker some specific tools and get the following result:

$ apt install something_else
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 kidiff : Depends: kiauto but it is not installable
          Recommends: scour but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.