Skip to content

Restore full Linux desktop packaging#75

Merged
ianbruene merged 1 commit into
masterfrom
codex/restore-full-linux-cd-artifact-packaging
Jul 15, 2026
Merged

Restore full Linux desktop packaging#75
ianbruene merged 1 commit into
masterfrom
codex/restore-full-linux-cd-artifact-packaging

Conversation

@ianbruene

Copy link
Copy Markdown
Owner

Motivation

  • The Linux release artifact previously shipped only raw binaries and a README which is insufficient to run the MIQT/Qt GUI on a typical Linux machine, so the build must deliver a staged distribution that includes runtime libraries and Qt plugins.
  • The goal is to keep existing CI build behavior and mockgrbl integration unchanged while producing a self-checking runnable Linux distribution similar in spirit to the macOS and Windows artifacts.
  • The workflow should fail early if required runtime libs/plugins are missing to avoid publishing broken artifacts.

Description

  • Added scripts/package-linux-app.sh which accepts <ddgo-binary> <mockgrbl-binary> <output-dir>, recreates the output layout, copies ddgo/mockgrbl, discovers and copies ldd-resolved shared libraries into lib/, copies Qt plugin directories from qmake -query QT_INSTALL_PLUGINS (including platforms/libqxcb.so, xcbglintegrations, imageformats, styles, etc.), writes run-ddgo.sh, and writes README-artifact.txt while excluding core loader/glibc libs.
  • Added scripts/verify-linux-dist.sh which asserts the staged layout (ddgo, mockgrbl, run-ddgo.sh, non-empty lib/, plugins/platforms/libqxcb.so, README-artifact.txt), runs ldd checks for not found on ddgo and plugins/platforms/libqxcb.so (both with the bundled LD_LIBRARY_PATH/QT_PLUGIN_PATH), runs mockgrbl -h, and prints the final layout.
  • Updated .github/workflows/cd.yml build-linux job to install additional runtime packaging helpers (qtbase5-dev-tools, libxcb-*, file), build raw binaries into dist/build-linux, call scripts/package-linux-app.sh and scripts/verify-linux-dist.sh, then archive dist/DDGo-linux-amd64 as dist/DDGo-linux-amd64.tar.gz and upload artifact DDGo-linux-amd64.
  • Updated docs/RELEASING.md to document the new artifact layout and usage, the launcher behavior (LD_LIBRARY_PATH, QT_PLUGIN_PATH, QT_QPA_PLATFORM_PLUGIN_PATH), and the compatibility caveat that the artifact is built on ubuntu-latest and is not guaranteed portable to every distro.

Changed files: .github/workflows/cd.yml, docs/RELEASING.md, scripts/package-linux-app.sh, scripts/verify-linux-dist.sh.
Artifact layout produced and documented:

DDGo-linux-amd64/
  ddgo
  mockgrbl
  run-ddgo.sh
  lib/
  plugins/
    platforms/
      libqxcb.so
  README-artifact.txt

The runtime launcher is run-ddgo.sh which sets LD_LIBRARY_PATH="$ROOT/lib", QT_PLUGIN_PATH="$ROOT/plugins", and QT_QPA_PLATFORM_PLUGIN_PATH="$ROOT/plugins/platforms" before exec-ing ddgo.
Bundling strategy: ldd on ddgo and on copied Qt plugin .so files to collect non-system shared libraries into lib/, copy Qt plugin directories discovered via qmake, and intentionally exclude the dynamic loader and core glibc/libs (e.g. ld-linux*, libc, libpthread, libm, libdl, librt).

Testing

  • Script and YAML sanity checks passed: bash -n scripts/package-linux-app.sh scripts/verify-linux-dist.sh and the workflow YAML loaded successfully with a Ruby YAML parse check.
  • Unit/integration test runs passed: go test ./... succeeded and go test -tags serial ./internal/transport ./internal/ports ./internal/app ./internal/grbl succeeded.
  • Local build tooling checks passed: go build -o /tmp/mockgrbl ./cmd/mockgrbl succeeded and script files were made executable.
  • Packaging verification that exercises the full Qt plugin copy and ldd-based bundling was skipped locally because qmake/qmake-qt5 is not installed in this environment, but the GitHub Actions build-linux job installs qtbase5-dev-tools so full packaging/verification will run in CI.

Remaining limitations

  • The artifact is built on ubuntu-latest and bundles Qt/runtime libraries as provided by that runner, so compatibility with older or very different distributions is limited by the runner's glibc/system ABI and is not guaranteed portable to every Linux distro.
  • No GUI-launch smoke test was added because there is no guaranteed safe non-GUI --help path; verification stops at ldd/layout checks and running mockgrbl -h.

Codex Task

@ianbruene
ianbruene merged commit 5abfc46 into master Jul 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant