I found that if I tried to run this in a Github action, it fails with:
/usr/bin/docker run --name productizekicadautomationscripts_49ea2b --label af96b4 --workdir /github/workspace --rm -e INPUT_ENTRYPOINT -e INPUT_ARGS -e HOME -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true --entrypoint "python" -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/Neotron-32-Hardware/Neotron-32-Hardware":"/github/workspace" productize/kicad-automation-scripts -m kicad-automation.eeschema.schematic run_erc /github/workspace/neotron-32.sch /github/workspace/erc
Initial recording window is set to:
X:0 Y:0 Width:800 Height:600
Adjusted recording window is set to:
X:0 Y:4 Width:800 Height:592
Your window manager appears to be Unknown
Initializing...
Output file: /github/workspace/erc/run_erc_schematic_screencast.ogv
Capturing!
INFO:util.ui_automation:Waiting for Project Rescue Helper window...
(eeschema:12): GLib-GObject-WARNING **: 23:58:22.530: invalid cast from 'GtkFileChooserButton' to 'GtkBin'
(eeschema:12): Gtk-CRITICAL **: 23:58:22.530: IA__gtk_bin_get_child: assertion 'GTK_IS_BIN (bin)' failed
(eeschema:12): Gtk-CRITICAL **: 23:58:22.530: IA__gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed
INFO:__main__:Focus main eeschema window
INFO:util.ui_automation:Waiting for eeschema window...
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:
$ 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/build
Initial recording window is set to:
X:0 Y:0 Width:800 Height:600
Adjusted recording window is set to:
X:0 Y:4 Width:800 Height:592
Your window manager appears to be Unknown
Initializing...
Output file: /kicad-project/build/run_erc_schematic_screencast-2.ogv
Capturing!
INFO:util.ui_automation:Waiting for Project Rescue Helper window...
INFO:__main__:Focus main eeschema window
INFO: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
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: