Skip to content

ci: pin CMake on macOS weak-node-api tests - #375

Merged
kraenhansen merged 1 commit into
mainfrom
kh/pin-cmake-weak-node-api
Jul 17, 2026
Merged

ci: pin CMake on macOS weak-node-api tests#375
kraenhansen merged 1 commit into
mainfrom
kh/pin-cmake-weak-node-api

Conversation

@kraenhansen

Copy link
Copy Markdown
Collaborator

Why

Follow-up to #374. The weak-node-api-tests job runs cmake directly on macos-latest with no version pin, so it picks up the runner's default CMake 4.2.x instead of the project's pinned 4.1.2 — the same drift that broke the unit-tests job. This job runs on pushes to main, so leaving it unpinned keeps main at risk of going red.

What

  • Add a macOS-only jwlawson/actions-setup-cmake step to weak-node-api-tests, matching the unit-tests and test-macos jobs.

This PR is labeled weak-node-api so the otherwise main-only job runs here and validates the fix before merge.

Test plan

  • Weak Node-API tests (macos-latest) passes on this PR.

🤖 Generated with Claude Code

The weak-node-api-tests job invokes cmake directly on macos-latest with
no version pin, so it picks up the runner's default CMake 4.2.x instead
of the project's pinned 4.1.2 — the same drift that broke the unit-tests
job (#374). This job runs on pushes to main, so leaving it unpinned would
turn main red. Install the pinned version via jwlawson/actions-setup-cmake,
gated to macOS runners, matching the unit-tests and test-macos jobs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCN2h9xbyn4yhxfVZyMzAm
@kraenhansen

Copy link
Copy Markdown
CollaboratorAuthor

Temporary workaround. Proper fix (remove the HEADERS file set on the FRAMEWORK target so we don't need a CMake pin) tracked in #376.

@kraenhansen
kraenhansen merged commit 9e596c8 into mainJul 17, 2026
17 checks passed
@kraenhansen
kraenhansen deleted the kh/pin-cmake-weak-node-api branch July 17, 2026 20:28
kraenhansen added a commit that referenced this pull request Jul 18, 2026
These two jobs build the weak-node-api Apple framework via cmake-rn on
macos-latest but never pinned CMake, so they hit the same 4.2.x
FRAMEWORK-vs-HEADERS-file-set error that broke unit-tests (#374) and
weak-node-api-tests (#375):
CMake Error: The file set "HEADERS" is incompatible with the
"FRAMEWORK" target "weak-node-api".
test-ios fails downstream ("Expected an XCFramework at
weak-node-api/build/Release/weak-node-api.xcframework") because the
framework never builds. Both run on pushes to main, so they keep main
red. Pin CMake to the project's 4.1.2 on both, matching the other jobs.
Interim workaround; proper CMakeLists fix tracked in #376.
Claude-Session: https://claude.ai/code/session_01UCN2h9xbyn4yhxfVZyMzAm
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
kraenhansen pushed a commit that referenced this pull request Jul 19, 2026
CMake 4.2 rejects a `HEADERS` file set on a `FRAMEWORK` target, which
broke every macOS job that builds the weak-node-api framework:
CMake Error in CMakeLists.txt:
The file set "HEADERS", of type "HEADERS", is incompatible with the
"FRAMEWORK" target "weak-node-api".
The workaround pinned CMake to 4.1.2 on five macOS jobs (#374, #375,
#377, and the pre-existing test-macos pin). This fixes the root cause
instead.
On Apple, the public headers are shipped via the framework's
PUBLIC_HEADER property; other platforms use a HEADERS file set for
install packaging. The build-interface include directories that the
file set previously supplied to in-tree consumers (e.g. the C++ tests)
are now provided explicitly via target_include_directories, so both
branches build unchanged.
With the root cause fixed, revert the macOS CMake version pin from all
five jobs. CMAKE_VERSION is retained since it still selects the Android
SDK cmake package for test-android.
Closes#376
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Aq4PqMYq8cQTP9Lf43JiwH
kraenhansen added a commit that referenced this pull request Jul 19, 2026
* Split public header packaging between framework and file set
CMake 4.2 rejects a `HEADERS` file set on a `FRAMEWORK` target, which
broke every macOS job that builds the weak-node-api framework:
CMake Error in CMakeLists.txt:
The file set "HEADERS", of type "HEADERS", is incompatible with the
"FRAMEWORK" target "weak-node-api".
The workaround pinned CMake to 4.1.2 on five macOS jobs (#374, #375,
#377, and the pre-existing test-macos pin). This fixes the root cause
instead.
On Apple, the public headers are shipped via the framework's
PUBLIC_HEADER property; other platforms use a HEADERS file set for
install packaging. The build-interface include directories that the
file set previously supplied to in-tree consumers (e.g. the C++ tests)
are now provided explicitly via target_include_directories, so both
branches build unchanged.
With the root cause fixed, revert the macOS CMake version pin from all
five jobs. CMAKE_VERSION is retained since it still selects the Android
SDK cmake package for test-android.
Closes#376
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Aq4PqMYq8cQTP9Lf43JiwH
* ci: trigger CI with Apple/macOS/Ferric/weak-node-api labels
Empty commit to re-run the label-gated macOS jobs now that the labels
are applied, so the reverted CMake pin is validated on the runner's
default CMake.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Aq4PqMYq8cQTP9Lf43JiwH
---------
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for freeto 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.

1 participant

@kraenhansen