Skip to content

ci: switch to lukka/get-cmake to resolve GitHub API rate limits#7232

Merged
hkaiser merged 5 commits intoTheHPXProject:masterfrom
arpittkhandelwal:fix/github-actions-cmake-setup
Apr 29, 2026
Merged

ci: switch to lukka/get-cmake to resolve GitHub API rate limits#7232
hkaiser merged 5 commits intoTheHPXProject:masterfrom
arpittkhandelwal:fix/github-actions-cmake-setup

Conversation

@arpittkhandelwal
Copy link
Copy Markdown
Contributor

@arpittkhandelwal arpittkhandelwal commented Apr 29, 2026

This PR replaces the deprecated jwlawson/actions-setup-cmake with lukka/get-cmake@v4.3.0 across all relevant GitHub Action workflows to stabilize the CI build process.

Summary of Changes:

  • Action Migration: Replaced jwlawson/actions-setup-cmake@v2.2 with lukka/get-cmake@v4.3.0 in 12 workflow files.
  • Precise Version Pinning: Pinned the action to the exact latest release tag @v4.3.0 to ensure deterministic builds and resolve previous version resolution errors.
  • Cleanup: Removed the redundant github-api-token: ${{ secrets.GITHUB_TOKEN }} block from all workflows.

Rationale:

  • Reliability: The previous action frequently failed with "Error: Unable to find version matching" because it hit GitHub API rate limits during version discovery. lukka/get-cmake is a more robust alternative that avoids this issue.
  • Security & Stability: Pinning to a specific release tag prevents unexpected behavior changes and ensures the CI environment remains consistent.
  • Log Hygiene: lukka/get-cmake does not recognize the github-api-token input. Removing it prevents "unexpected input" warnings in the CI logs, keeping the job summaries clean.
  • Focused Fix: This PR is now strictly isolated to CI infrastructure updates. Unrelated changes to the C++20 modules build configuration have been reverted as requested.

Copilot AI review requested due to automatic review settings April 29, 2026 03:39
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 29, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the repository’s GitHub Actions CI workflows to avoid GitHub API rate limits encountered by the deprecated jwlawson/actions-setup-cmake action by switching workflows to lukka/get-cmake.

Changes:

  • Replaced jwlawson/actions-setup-cmake@v2.2 with lukka/get-cmake@latest in the affected workflows.
  • Removed the github-api-token: ${{ secrets.GITHUB_TOKEN }} input previously passed to the deprecated action.
  • Applied the update across Windows CI workflows and the CodeQL workflow.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
.github/workflows/windows_release_static.yml Switch CMake setup action used by Windows release static CI job.
.github/workflows/windows_release_gcc_mingw.yml Switch CMake setup action used by MinGW release CI job.
.github/workflows/windows_release_2022.yml Switch CMake setup action used by VS2022 release CI job.
.github/workflows/windows_debug_vs2022_tracy.yml Switch CMake setup action used by VS2022 Tracy debug CI job.
.github/workflows/windows_debug_vs2022_modules.yml Switch CMake setup action used by VS2022 C++20 modules debug CI job.
.github/workflows/windows_debug_vs2022_local_runtime.yml Switch CMake setup action used by VS2022 local runtime debug CI job.
.github/workflows/windows_debug_vs2022_fetch_hwloc.yml Switch CMake setup action used by VS2022 debug job (HWLOC fetch).
.github/workflows/windows_debug_vs2022_fetch_boost.yml Switch CMake setup action used by VS2022 debug job (Boost fetch).
.github/workflows/windows_debug_vs2022.yml Switch CMake setup action used by baseline VS2022 debug CI job.
.github/workflows/windows_clang_release.yml Switch CMake setup action used by ClangCL release CI job.
.github/workflows/windows_clang_debug.yml Switch CMake setup action used by ClangCL debug CI job.
.github/workflows/codeql.yml Switch CMake setup action used by CodeQL analysis workflow.

Comment thread .github/workflows/windows_release_gcc_mingw.yml Outdated
Comment thread .github/workflows/windows_release_2022.yml Outdated
Comment thread .github/workflows/windows_debug_vs2022_tracy.yml Outdated
Comment thread .github/workflows/windows_debug_vs2022_modules.yml Outdated
Comment thread .github/workflows/windows_debug_vs2022_local_runtime.yml Outdated
Comment thread .github/workflows/windows_clang_release.yml Outdated
Comment thread .github/workflows/windows_release_static.yml Outdated
Comment thread .github/workflows/windows_debug_vs2022_fetch_boost.yml Outdated
Comment thread .github/workflows/windows_clang_debug.yml Outdated
Comment thread .github/workflows/codeql.yml Outdated
…le tracking

The C++20 modules CI build was failing with:
  fatal error: module 'HPX.Core' not found
    41 | import HPX.Core;

Root cause
----------
HPX_CXXModules.cmake had two conflicting systems active simultaneously:

1. libs/CMakeLists.txt uses FILE_SET CXX_MODULES (CMake 3.28+ native
   module support). CMake/Ninja automatically manage the BMI, writing it
   to CMakeFiles/<target>.dir/ and encoding the dependency in a
   .ninja_dyndep file.

2. hpx_configure_module_producer() was ALSO adding a manual
   -fmodule-output=$<TARGET_FILE_DIR:producer> flag, telling Clang to
   write the BMI to a second, different location.

3. hpx_configure_module_consumer() was then adding
   -fprebuilt-module-path pointing to that second location.

Because the two systems wrote and looked for the BMI in different
directories, consumers could not find HPX.Core.

Fix
---
Remove all manual -fmodule-output and -fprebuilt-module-path flags from
hpx_configure_module_producer() and hpx_configure_module_consumer().

CMake 3.29+ with FILE_SET CXX_MODULES and the Ninja generator handles
the full dependency chain automatically:
  - scans consumers (CXX_SCAN_FOR_MODULES ON) for 'import HPX.Core;'
  - resolves that to the hpx_core_module target's FILE_SET
  - ensures the BMI is built before any consumer that needs it
  - passes the correct -fmodule-output / -fmodule-file flags itself

For installed/external builds the CXX_MODULES_BMI DESTINATION in the
install() call (libs/CMakeLists.txt) exports the BMI location into
HPXInternalTargets.cmake, so downstream find_package(HPX) consumers
also get the correct paths automatically.

The INTERFACE_CXX_SCAN_FOR_MODULES ON property on the _if interface
targets is retained so the scanning requirement propagates to all
consumers. The -fuse-ld=lld / -Wl,--error-limit=0 flags for Clang
shared libraries and executables are also retained as Clang emits
DWARF-5 when compiling with C++20 modules.

Also removed the unused include(HPX_AddCompileFlag) since no
hpx_add_target_compile_option_if_available calls remain in this file.
@hkaiser
Copy link
Copy Markdown
Contributor

hkaiser commented Apr 29, 2026

Should we done something about the copilot comments?

@arpittkhandelwal
Copy link
Copy Markdown
Contributor Author

arpittkhandelwal commented Apr 29, 2026

Should we done something about the copilot comments?

I have updated all the workflows to pin lukka/get-cmake to @v4.3.0 and pushed the changes.

Copilot AI review requested due to automatic review settings April 29, 2026 18:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/codeql.yml
Comment thread cmake/HPX_CXXModules.cmake Outdated
Comment thread cmake/HPX_CXXModules.cmake Outdated
Copy link
Copy Markdown
Contributor

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@hkaiser hkaiser merged commit 472c3da into TheHPXProject:master Apr 29, 2026
75 of 84 checks passed
@hkaiser hkaiser added this to the 2.0.0 milestone Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants