mirror of
https://github.com/hanzoai/fsevents.git
synced 2026-09-24 16:59:25 +00:00
fix: build universal binary (arm64/apple silicon)
This commit is contained in:
@@ -2,7 +2,7 @@ name: Node CI
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macOS-latest
|
||||
runs-on: macOS-11.0
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [8, 10, 12, 14, 15]
|
||||
@@ -18,5 +18,10 @@ jobs:
|
||||
npm install
|
||||
npm run build --if-present
|
||||
npm test
|
||||
- name: ensure universal binary (arm64/x86_64)
|
||||
run: |
|
||||
file fsevents.node
|
||||
file fsevents.node | grep -q arm64 || (echo "arm64 binary not built"; exit 1)
|
||||
file fsevents.node | grep -q x86_64 || (echo "x86_64 binary not built"; exit 1)
|
||||
env:
|
||||
CI: true
|
||||
|
||||
+7
-1
@@ -5,9 +5,15 @@
|
||||
"target_name": "fsevents",
|
||||
"sources": [ "src/fsevents.c"],
|
||||
"xcode_settings": {
|
||||
"OTHER_CFLAGS": [
|
||||
"-arch x86_64",
|
||||
"-arch arm64"
|
||||
],
|
||||
"OTHER_LDFLAGS": [
|
||||
"-Wl,-bind_at_load",
|
||||
"-framework CoreFoundation -framework CoreServices"
|
||||
"-framework CoreFoundation -framework CoreServices",
|
||||
"-arch x86_64",
|
||||
"-arch arm64"
|
||||
]
|
||||
}
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user