Skip to content

Commit c95e838

Browse files
committed
ci(mobile): build matrix-mt prebuilt for android+ios alongside the st one
test-android-sample.yml and test-ios-sample.yml only built @cpp.js/sample-lib-prebuilt-matrix (st), but `pnpm -r e2e:android`/ `pnpm run e2e:ios` recurse into every workspace and also run the e2e test for @cpp.js/sample-mobile-reactnative-cli-multithread. That mt sample's native.cpp does `#include <Matrix.h>`, which resolves via cppjs deps to matrix-mt's dist/prebuilt/<target>/include — never produced because the filter didn't match the -multithread package. Symptom on the last v2-new-samples Android run: cppjs-sample-mobile-reactnative-cli-multithread/src/native/native.cpp:2:10: fatal error: 'Matrix.h' file not found > Task :cpp.js_plugin-react-native:buildCMakeRelWithDebInfo[arm64-v8a] FAILED Switch the filter to a glob so pnpm picks up both: --filter=@cpp.js/sample-lib-prebuilt-matrix → --filter='@cpp.js/sample-lib-prebuilt-matrix*' Verified locally — `pnpm --filter='@cpp.js/sample-lib-prebuilt-matrix*' list` returns the st and mt packages. Both have build:android / build:ios scripts already (the cmake/source siblings have neither because they're inline libs).
1 parent 3425c1e commit c95e838

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/test-android-sample.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,14 @@ jobs:
4141
cache: 'pnpm'
4242
- name: Install dependencies
4343
run: pnpm install
44-
- name: Build cppjs-sample-lib-prebuilt-matrix
45-
run: pnpm --filter=@cpp.js/sample-lib-prebuilt-matrix run build:android
44+
- name: Build cppjs-sample-lib-prebuilt-matrix (st + mt)
45+
# Glob picks up both @cpp.js/sample-lib-prebuilt-matrix and the
46+
# -multithread variant. The mt sample-mobile-reactnative-cli's
47+
# native.cpp does `#include <Matrix.h>` which resolves to the
48+
# prebuilt artifacts under matrix-mt's dist/prebuilt/<target>/
49+
# — without this build the e2e:android step fails for the mt
50+
# sample with "fatal error: 'Matrix.h' file not found".
51+
run: pnpm --filter='@cpp.js/sample-lib-prebuilt-matrix*' run build:android
4652

4753
- name: Install Maestro
4854
run: |

.github/workflows/test-ios-sample.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,11 @@ jobs:
7575
echo "$HOME/.maestro/bin" >> $GITHUB_PATH
7676
- name: Restore cached bridge files
7777
run: cp -r ./cppjs-samples/cppjs-sample-mobile-reactnative-cli/ci/.cppjs ./cppjs-samples/cppjs-sample-mobile-reactnative-cli
78-
- name: Build cppjs-sample-lib-prebuilt-matrix
79-
run: pnpm --filter=@cpp.js/sample-lib-prebuilt-matrix run build:ios
78+
- name: Build cppjs-sample-lib-prebuilt-matrix (st + mt)
79+
# Same fix as test-android-sample.yml: glob also matches the
80+
# -multithread variant so the mt mobile sample's <Matrix.h>
81+
# resolves at native compile.
82+
run: pnpm --filter='@cpp.js/sample-lib-prebuilt-matrix*' run build:ios
8083
- name: Pod install
8184
run: cd cppjs-samples/cppjs-sample-mobile-reactnative-cli/ios && pod install && cd ../../../
8285
- name: E2E IOS

0 commit comments

Comments
 (0)