Skip to content

16 add build the coretrace binary in the cicd for autonomous gui update#25

Merged
SizzleUnrlsd merged 6 commits into
mainfrom
16-add-build-the-coretrace-binary-in-the-cicd-for-autonomous-gui-update
Mar 26, 2026
Merged

16 add build the coretrace binary in the cicd for autonomous gui update#25
SizzleUnrlsd merged 6 commits into
mainfrom
16-add-build-the-coretrace-binary-in-the-cicd-for-autonomous-gui-update

Conversation

@SizzleUnrlsd
Copy link
Copy Markdown
Contributor

Summary

This PR improves the release packaging flow for ctrace and tightens the CMake integration of fetched dependencies.

The main goal is to make Linux release archives self-contained enough to run without relying on a matching host LLVM/Clang runtime layout, while also preventing fetched third-party projects from being built as part of the default target set.

Why

The previous release packaging flow archived the built binary directly, which made runtime resolution fragile when shared libraries were not available on the target machine.

Architecturally, the packaging responsibility is now moved closer to CMake installation rules instead of being hardcoded in the Docker packaging step:

  • CMake defines what the runtime layout should look like
  • the release Dockerfile installs and packages that layout
  • fetched dependencies are added with EXCLUDE_FROM_ALL so they do not pollute default builds unnecessarily

This keeps the build more generic and easier to evolve than manually copying a fixed list of runtime libraries.

Changes

CMake install/runtime packaging

  • raised the minimum CMake version to 3.21
  • added Linux-specific install rules for ctrace
  • configured INSTALL_RPATH so the installed binary resolves bundled libraries from ../lib
  • used install(RUNTIME_DEPENDENCY_SET ...) to collect runtime shared library dependencies during installation
  • installed the project config/ directory alongside the packaged binary

Release packaging

  • updated the release Docker image to install patchelf
  • switched release packaging from "copy the built binary" to cmake --install
  • patched bundled shared libraries so they resolve each other through local RPATH
  • added a runtime dependency validation step with ldd
  • kept README, LICENSE, archive generation, and checksum publication in the release artifact flow

FetchContent integration

  • replaced direct FetchContent_MakeAvailable(...) usage with:
    • FetchContent_GetProperties(...)
    • FetchContent_Populate(...)
    • add_subdirectory(... EXCLUDE_FROM_ALL)
  • applied this pattern to:
    • nlohmann_json
    • cpp-httplib
    • coretrace-logger
    • stack_analyzer

Impact

  • release archives now follow an install-tree layout instead of a flat "single binary at archive root" layout
  • Linux packaging is more robust against missing shared library resolution on target hosts
  • default builds stay more focused by avoiding unnecessary third-party default targets

Validation

  • CMake configure/build still produces ctrace
  • release packaging now validates shared library resolution during archive creation
  • no test files were modified

@shookapic

@SizzleUnrlsd SizzleUnrlsd self-assigned this Mar 26, 2026
@SizzleUnrlsd SizzleUnrlsd merged commit da3218e into main Mar 26, 2026
6 checks passed
@SizzleUnrlsd SizzleUnrlsd deleted the 16-add-build-the-coretrace-binary-in-the-cicd-for-autonomous-gui-update branch March 26, 2026 18:36
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.

Add: build the coretrace binary in the CICD for autonomous GUI update

1 participant