Skip to content

Comments

Setup CI and CMake-based build system#135

Open
szalpal wants to merge 5 commits intodds-bridge:developfrom
szalpal:build-with-cmake
Open

Setup CI and CMake-based build system#135
szalpal wants to merge 5 commits intodds-bridge:developfrom
szalpal:build-with-cmake

Conversation

@szalpal
Copy link

@szalpal szalpal commented Feb 22, 2026

Summary

Hi! I came upon this project and I really like it. I'd like to use dds for one of my pet projects. Since I'll be adding some updates to dds, I figured I can contribute to parent repository. This is my first contribution here, please let me know about any comments you might have - I'd gladly explain everything.

I wanted to start from setting up a CI with github actions and creating more modern build system. This PR adds the CI and CMake routines. Additionally, I'm submitting 2 test fixes that I uncovered while setting up the CI. Please find everything in details below. All changes are properly split into commits, to make later maintenance robust.

Lastly, there are 2 sharp edges:

  1. Currently macOS and Windows builds had to be build with -Werror turned off, since there are many warnings in these builds. Hopefully we can resolve them later.
  2. I had to turn off tests for Windows build, since they fail. Unfortunately, I don't have a Windows system (nor do I know anything about it), therefore it's hard to me to fix those tests at this stage.

Setup CI and CMake-based build system

Adds a modern CMake build system alongside the existing platform-specific Makefiles, with CTest integration and GitHub Actions CI.

CMake build system (CMakeLists.txt)

  • Builds the dds shared/static library (alias dds::dds) with find_package support via cmake/ddsConfig.cmake.in
  • Supports all five threading backends (OpenMP, STL, Boost, GCD, WinAPI) as options, with platform-appropriate defaults applied automatically when none are explicitly selected
  • Exposes DDS_BUILD_TESTS and DDS_BUILD_EXAMPLES to build dtest and the 13 example programs
  • Enables LTO for Release builds, full warning flags, and linker hardening on Linux shared builds
  • DDS_WERROR option (default ON) controls -Werror//WX, making it easy to turn off for platforms with noisy compilers

CTest integration

  • test/CMakeLists.txt: 6 tests covering all five dtest solver modes (solve, calc, par, dealerpar, play) plus a GIB-format calc test
  • examples/CMakeLists.txt: 13 tests, one per example program
  • Both use FAIL_REGULAR_EXPRESSION to detect failures, since neither dtest nor the examples return a non-zero exit code on failure

GitHub Actions CI (.github/workflows/ci.yml)

Five jobs run in parallel on every push/PR to main and develop:

Job OS Library Threading
Linux GCC ubuntu-latest shared OpenMP + STL
Linux Clang ubuntu-latest shared OpenMP + STL
Linux GCC / Boost ubuntu-latest static Boost + STL
macOS macos-latest shared GCD + STL
Windows MSVC windows-latest static WinAPI + OpenMP + STL

macOS and Windows build with -DDDS_WERROR=OFF. Windows tests are currently skipped pending fixes.

Source fixes required for clean compilation

  • src/Moves.cpp: replaced two UTF-8 characters with ASCII equivalents (caused MSVC parse errors)
  • src/TransTableL.cpp: corrected array definition in function signature (ill-formed under strict compilers)

Signed-off-by: Michał Szołucha <michal@szolucha.eu>
Signed-off-by: Michał Szołucha <michal@szolucha.eu>
Signed-off-by: Michał Szołucha <michal@szolucha.eu>
Signed-off-by: Michał Szołucha <michal@szolucha.eu>
build.

Signed-off-by: Michał Szołucha <michal@szolucha.eu>
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.

1 participant