Skip to content

Commit b035b5d

Browse files
kraenhansenclaude
andauthored
Fix main CI: commit ferric Cargo.lock and pin macOS CMake (#374)
* ferric-example: commit Cargo.lock to pin the Rust toolchain deps CI resolved Rust dependencies fresh on every run because Cargo.lock was gitignored (a leftover from the initial `cargo new --lib` scaffolding in #43 — the stock library-crate convention). That let `napi-derive-backend` float to 5.1.2, which expands the `#[napi]` attribute macro into a broken `ctor` `unify_features` invocation ("expected `(`, found `]`"), failing the bootstrap build of every CI job that compiles ferric-example. ferric-example is a `crate-type = ["cdylib"]` that builds a final `.node` artifact, not a library published to crates.io, so committing Cargo.lock is the recommended practice — the direct analogue of package-lock.json. The committed lock pins napi-derive-backend 5.0.2 (last known-good). Verified with `cargo build --locked`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * ci: pin CMake on macOS unit tests The macos-latest runner now ships CMake 4.2.x, but the project pins CMAKE_VERSION 4.1.2 (matching the React Native template and the version used by the test-macos / Android SDK jobs). The unit-tests job did not pin CMake, so macOS builds picked up the incompatible runner default. Install the pinned version via jwlawson/actions-setup-cmake, mirroring the test-macos job, gated to macOS runners. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCN2h9xbyn4yhxfVZyMzAm --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 8421e88 commit b035b5d

3 files changed

Lines changed: 202 additions & 1 deletion

File tree

.github/workflows/check.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ jobs:
9292
with:
9393
packages: tools platform-tools ndk;${{ env.NDK_VERSION }}
9494
- run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi i686-linux-android aarch64-apple-ios-sim
95+
# macOS runners ship a newer CMake than the project supports; pin it to match the version used elsewhere in CI
96+
- name: Install compatible CMake version
97+
if: runner.os == 'macOS'
98+
uses: jwlawson/actions-setup-cmake@v2
99+
with:
100+
cmake-version: ${{ env.CMAKE_VERSION }}
95101
- run: npm ci
96102
- run: npm run bootstrap
97103
- run: npm test

packages/ferric-example/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/target
2-
Cargo.lock
32

43
/*.xcframework/
54
/*.apple.node/

packages/ferric-example/Cargo.lock

Lines changed: 196 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)