ci: switch to lukka/get-cmake to resolve GitHub API rate limits#7232
Conversation
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
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.2withlukka/get-cmake@latestin 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. |
…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.
|
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. |
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:
jwlawson/actions-setup-cmake@v2.2withlukka/get-cmake@v4.3.0in 12 workflow files.@v4.3.0to ensure deterministic builds and resolve previous version resolution errors.github-api-token: ${{ secrets.GITHUB_TOKEN }}block from all workflows.Rationale:
lukka/get-cmakeis a more robust alternative that avoids this issue.lukka/get-cmakedoes not recognize thegithub-api-tokeninput. Removing it prevents "unexpected input" warnings in the CI logs, keeping the job summaries clean.