Skip to content

Commit 787e7ad

Browse files
committed
Verify dependency on weak-node-api framework
1 parent 182e22a commit 787e7ad

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

.github/workflows/check.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -276,17 +276,23 @@ jobs:
276276
- run: npx ferric --apple
277277
working-directory: packages/ferric-example
278278
- name: Inspect the structure of the prebuilt binary
279-
run: lipo -info ferric_example.apple.node/*/libferric_example.framework/libferric_example > lipo-info.txt
280-
working-directory: packages/ferric-example
281-
- name: Upload lipo info
279+
run: |
280+
lipo -info ferric_example.apple.node/*/libferric_example.framework/libferric_example > lipo-output.txt
281+
otool -L ferric_example.apple.node/*/libferric_example.framework/libferric_example > otool-output.txt
282+
- name: Upload lipo output
283+
uses: actions/upload-artifact@v4
284+
with:
285+
name: lipo-output
286+
path: packages/ferric-example/lipo-output.txt
287+
- name: Upload otool output
282288
uses: actions/upload-artifact@v4
283289
with:
284-
name: lipo-info
285-
path: packages/ferric-example/lipo-info.txt
290+
name: otool-output
291+
path: packages/ferric-example/otool-output.txt
286292
- name: Verify Apple triplet builds
287293
run: |
288294
# Create expected fixture content
289-
cat > expected-lipo-info.txt << 'EOF'
295+
cat > expected-lipo-output.txt << 'EOF'
290296
Architectures in the fat file: ferric_example.apple.node/ios-arm64_x86_64-simulator/libferric_example.framework/libferric_example are: x86_64 arm64
291297
Architectures in the fat file: ferric_example.apple.node/macos-arm64_x86_64/libferric_example.framework/libferric_example are: x86_64 arm64
292298
Architectures in the fat file: ferric_example.apple.node/tvos-arm64_x86_64-simulator/libferric_example.framework/libferric_example are: x86_64 arm64
@@ -296,5 +302,12 @@ jobs:
296302
Non-fat file: ferric_example.apple.node/xros-arm64/libferric_example.framework/libferric_example is architecture: arm64
297303
EOF
298304
# Compare with expected fixture (will fail if files differ)
299-
diff expected-lipo-info.txt lipo-info.txt
305+
diff expected-lipo-output.txt lipo-output.txt
306+
# Verify weak-node-api linking
307+
WEAK_NODE_API_COUNT=$(grep -c "@rpath/weak-node-api.framework/weak-node-api" otool-output.txt)
308+
if [ "$WEAK_NODE_API_COUNT" -ne 4 ]; then
309+
echo "Expected 4 occurrences of @rpath/weak-node-api.framework/weak-node-api, found $WEAK_NODE_API_COUNT"
310+
cat otool-output.txt
311+
exit 1
312+
fi
300313
working-directory: packages/ferric-example

0 commit comments

Comments
 (0)