Skip to content

Refactor CI setup and some CMake updates#238

Merged
simogasp merged 9 commits into
developfrom
ci/presets
Jun 11, 2026
Merged

Refactor CI setup and some CMake updates#238
simogasp merged 9 commits into
developfrom
ci/presets

Conversation

@simogasp

@simogasp simogasp commented Jun 11, 2026

Copy link
Copy Markdown
Member

This pull request removes the previous CI pipeline for Windows (no cache, very slow as it has to build all dependencies every time) in favour of a new pipeline using CMake presets, vcpkg, and caching to speed up the building time. Like the previous pipeline, it does not support CUDA on Windows.

On cache it, the build time goes down from 1h to 8 mins.

Incidentally, it also introduces some minor CMake fixes and a temporary solution to support Eigen 5

Build system and dependency management modernization:

  • Added vcpkg.json to formally declare project dependencies for vcpkg, simplifying cross-platform dependency management. The vcpkg.json is based on the file of the official port of cctag on vcpkg.
  • Introduced CMakePresets.json with presets for building and testing in Debug/Release modes, both with and without vcpkg, enabling more reproducible and maintainable builds.

Continuous Integration (CI) improvements:

  • Added a new GitHub Actions workflow (.github/workflows/build_with_vcpkg_no_cuda.yml) to build and test the project on Windows using vcpkg, with CUDA disabled. This replaces the previous, more manual Windows build job.
  • Updated .github/workflows/continuous-integration.yml to ignore documentation-only changes, add permissions, and remove the legacy Windows build job in favor of the new vcpkg-based workflow. [1] [2] [3]

CMake and dependency version enforcement:

  • Updated CMakeLists.txt to use a minimum Eigen3 version (3.3.9) in any configuration instead of a different version for Windows. This is more maintainable.
  • Since Eigen versions older than 5 are strict in checking the version compatibility we cannot use the version range when finding Eigen. The current solution is to not ask for a version and check the found version with a clear error if the requirement is not met. This is also propagated to the Config file when CCTag is used as 3rd party [1] [2]

Target include directories cleanup:

  • Cleaned up how include directories are set for the CCTag target in both CUDA and non-CUDA builds, removing unnecessary and redundant includes as we are using targets. For one, this avoid CMake errors like
INTERFACE_INCLUDE_DIRECTORIES property contains path:

"D:/a/CCTag/CCTag/vcpkg_installed/x64-windows/include"

which is prefixed in the source directory.

[1] [2]

@simogasp simogasp added this to the v1.0.5 milestone Jun 11, 2026
@simogasp simogasp self-assigned this Jun 11, 2026
@simogasp simogasp added scope:build type:enhancement scope:ci build:windows anything related to the windows build refactoring refactoring of the code labels Jun 11, 2026
@codacy-production

codacy-production Bot commented Jun 11, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 2 high

Alerts:
⚠ 2 issues (≤ 0 issues of at least minor severity)

Results:
2 new issues

Category Results
Security 2 high

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a vcpkg.json manifest and CMakePresets.json to manage dependencies and build configurations, while updating Eigen3 version requirements and cleaning up CMake include directories. The feedback recommends correcting an invalid version constraint for boost-config and moving boost-test to an optional feature in vcpkg.json. Additionally, it is advised to make the Eigen3 version checks in CMakeLists.txt and cmake/Config.cmake.in more robust by falling back to EIGEN3_VERSION if Eigen3_VERSION is undefined.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread vcpkg.json
Comment thread vcpkg.json
"boost-serialization",
"boost-spirit",
"boost-stacktrace",
"boost-test",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

boost-test is only required for building and running the unit tests. Declaring it as a top-level mandatory dependency forces all consumers of the cctag library to download and build boost-test. Consider moving boost-test to an optional "tests" feature in vcpkg.json so that it is only built when tests are explicitly enabled.

Comment thread CMakeLists.txt
Comment on lines +239 to 241
if(Eigen3_VERSION VERSION_LESS CCTAG_EIGEN_REQUIRED_VERSION)
message(FATAL_ERROR "Eigen >= ${CCTAG_EIGEN_REQUIRED_VERSION} is required, found ${Eigen3_VERSION}")
endif()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

If Eigen3_VERSION is not set (which can happen with some older or alternative Find modules that set EIGEN3_VERSION or EIGEN3_VERSION_STRING instead), the VERSION_LESS comparison will compare an empty string, resulting in a false positive FATAL_ERROR even if a compatible Eigen3 version is present. To make this check robust, define a fallback variable that checks both Eigen3_VERSION and EIGEN3_VERSION before performing the comparison.

set(_Eigen3_version "${Eigen3_VERSION}")
if(NOT _Eigen3_version AND EIGEN3_VERSION)
  set(_Eigen3_version "${EIGEN3_VERSION}")
endif()
if(_Eigen3_version VERSION_LESS CCTAG_EIGEN_REQUIRED_VERSION)
  message(FATAL_ERROR "Eigen >= ${CCTAG_EIGEN_REQUIRED_VERSION} is required, found ${_Eigen3_version}")
endif()

Comment thread cmake/Config.cmake.in
Comment on lines +48 to +50
if(Eigen3_VERSION VERSION_LESS "@CCTAG_EIGEN_REQUIRED_VERSION@")
message(FATAL_ERROR "Eigen3 >= @CCTAG_EIGEN_REQUIRED_VERSION@ is required, found ${Eigen3_VERSION}")
endif()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the check in CMakeLists.txt, if Eigen3_VERSION is not set by the package finder (e.g., if it sets EIGEN3_VERSION instead), this check will fail with a false positive FATAL_ERROR. Using a fallback variable ensures robustness when CCTag is consumed as a third-party package.

set(_Eigen3_version "${Eigen3_VERSION}")
if(NOT _Eigen3_version AND EIGEN3_VERSION)
  set(_Eigen3_version "${EIGEN3_VERSION}")
endif()
if(_Eigen3_version VERSION_LESS "@CCTAG_EIGEN_REQUIRED_VERSION@")
	message(FATAL_ERROR "Eigen3 >= @CCTAG_EIGEN_REQUIRED_VERSION@ is required, found ${_Eigen3_version}")
endif()

@simogasp simogasp merged commit b0b8095 into develop Jun 11, 2026
18 of 21 checks passed
@simogasp simogasp deleted the ci/presets branch June 11, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build:windows anything related to the windows build refactoring refactoring of the code scope:build scope:ci type:enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant