You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works fine on my Ubuntu 19.10 machine locally using the same Docker container, but I was frustrated that the output files were owned by root. When I added --user $(id -u):$(id -g) to my Docker command line to try and fix this, I got the same error that Github Actions reports above:
$ docker run --rm -it -v /home/X/Documents/programming/neotron-compute/Neotron-32-Hardware:/kicad-project --user $(id -u):$(id -g) productize/kicad-automation-scripts python -m kicad-automation.eeschema.schematic run_erc /kicad-project/neotron-32.sch /kicad-project/buildInitial recording window is set to:X:0 Y:0 Width:800 Height:600Adjusted recording window is set to:X:0 Y:4 Width:800 Height:592Your window manager appears to be UnknownInitializing...Output file: /kicad-project/build/run_erc_schematic_screencast-2.ogvCapturing!INFO:util.ui_automation:Waiting for Project Rescue Helper window...INFO:__main__:Focus main eeschema windowINFO:util.ui_automation:Waiting for eeschema window... tting down....Done.Written 3126 bytes(3126 of which were video data and 0 audio data)..Goodbye!Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/lib/python2.7/dist-packages/kicad-automation/eeschema/schematic.py", line 311, in <module> errors = eeschema_run_erc(schematic, output_dir, args.warnings_as_errors, args.junit_xml) File "/usr/lib/python2.7/dist-packages/kicad-automation/eeschema/schematic.py", line 227, in eeschema_run_erc wait_for_window('eeschema', '\[') File "/usr/lib/python2.7/dist-packages/kicad-automation/util/ui_automation.py", line 99, in wait_for_window raise RuntimeError('Timed out waiting for %s window' % name)RuntimeError: Timed out waiting for eeschema window
The text was updated successfully, but these errors were encountered:
I've had a closer look at it. What is causing the problem is this:
This dialog seems to be something that Kicad shows by default on first run, at least in this version of Kicad
It's possible to prevent this by putting this file under $HOME/.config/kicad. This project does that in Dockerfile-base, copying this file to /root/.config/kicad.
GitHub injects its own part of the filesystem in a container action under /github
GitHub also sets a bunch of environment variables, including HOME being now /github/home
Kicad starts and expects the aforementioned file under /github/home/.config/kicad, but it's not there, it's under /root/.config/kicad
Kicad shows the dialog and all our scripts hang
To mitigate, make the entry point look like something like this:
entrypoint: '/bin/sh'args:
- '-c'# GH actions set $HOME to a weird location and we have to move Kicad settings there first
- | mkdir -p $HOME/.config/kicad ; cp /root/.config/kicad/* $HOME/.config/kicad ; # run your script here
I found that if I tried to run this in a Github action, it fails with:
See https://github.com/Neotron-Compute/Neotron-32-Hardware/commit/6eb0311dab4a15e725fa6943566218a5896dd1e6/checks?check_suite_id=359554627.
It works fine on my Ubuntu 19.10 machine locally using the same Docker container, but I was frustrated that the output files were owned by root. When I added
--user $(id -u):$(id -g)
to my Docker command line to try and fix this, I got the same error that Github Actions reports above:The text was updated successfully, but these errors were encountered: