Skip to content

CI: test headless (--disable-gui) build - #4394

Open
grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:headless-ci
Open

CI: test headless (--disable-gui) build#4394
grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:headless-ci

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

Summary

#4364 added --disable-gui headless build support. If we support it, we should test it does not break. This PR adds a rip-headless CI job and fixes one gap the new test immediately caught.

CI job (rip-headless)

  • Installs a minimal dependency set with no X11, Tk, GTK or documentation tooling, so a regression that reintroduces a GUI dependency into the headless build fails at configure or build time instead of being masked by full build-deps.
  • Builds RIP with --disable-gui --disable-manpages --disable-build-documentation.
  • Asserts GUI artifacts are absent (axis, touchy, halshow, pyvcp, gladevcp, tcl/linuxcnc.so, ...) and core headless artifacts exist (linuxcncrsh, halcmd, halui, ...).
  • Runs the GUI-free test suites: tests/linuxcncrsh, tests/linuxcncrsh-tcp, tests/halui, tests/motion.

Build fix

  • fix headless support #4364 guarded the install rules for pyvcp/gladevcp behind BUILD_GUI but not the RIP build rules, so headless builds still produced bin/pyvcp and bin/gladevcp. Guarded USER_COMP_PY in src/hal/user_comps/Submakefile to match.

Test plan

  • Replicated the job end-to-end locally in an ubuntu:24.04 container with only the minimal deps installed: configure, build, artifact assertions, and all 9 headless tests pass.
  • The artifact assertion failed before the USER_COMP_PY fix (bin/pyvcp was still built) and passes after, confirming the check actually tests something.

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml Outdated
@grandixximo
grandixximo force-pushed the headless-ci branch 4 times, most recently from 2c3b488 to 4cc768d Compare August 17, 2026 03:35
@BsAtHome

Copy link
Copy Markdown
Contributor

You need to resolve the conflict. Also, maybe squash the commits.

keeps working.  The new rip-headless job configures with --disable-gui
--disable-manpages --disable-build-documentation using a minimal
dependency set without X11, Tk or GTK development packages, so a
regression that reintroduces a GUI dependency into the headless build
fails at configure or build time instead of being masked by full
build-deps.  After the build it asserts that GUI artifacts (axis,
touchy, halshow, pyvcp, ...) are absent and core headless artifacts
(linuxcncrsh, halcmd, halui, ...) exist, then runs the full test
suite.

Also included, all found by running the full suite on a headless
build:

- pyvcp and gladevcp were still built with --disable-gui (LinuxCNC#4364
  guarded only the install rules); guard USER_COMP_PY in
  hal/user_comps/Submakefile.
- preview_helpers.py moved from the GUI-gated gremlin directory to
  lib/python: it is a pure-Python helper needed by the GUI-free
  tests/interp_initcode test.
- Tests needing Tcl/GUI bits a headless build does not provide
  (pyvcp, twopass, twopass-personality, tclsh-extensions, tooledit,
  ui-smoke) get skip scripts, the mechanism the ui-smoke tests
  already use.  The ui-smoke skip helper now takes the GUI binary
  under test as an argument.
@grandixximo

Copy link
Copy Markdown
Contributor Author

Done and done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants