Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(NODE-6590): add build for x64 macos #45

Merged
merged 9 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
on:
nbbeeken marked this conversation as resolved.
Show resolved Hide resolved
pull_request:
branches: [main]
workflow_dispatch: {}
workflow_call: {}

Expand All @@ -10,7 +8,7 @@ jobs:
host_tests:
strategy:
matrix:
os: [macos-latest, windows-2019]
os: [macos-latest, windows-2019, macos-13]
nbbeeken marked this conversation as resolved.
Show resolved Hide resolved
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
host_tests:
strategy:
matrix:
os: [macos-latest, windows-2019]
os: [macos-latest, windows-2019, macos-13]
node: [16.20.1, 18.x, 20.x, 22.x]
fail-fast: false
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.0.0-alpha.1"
}
}
13 changes: 13 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@
]
},
}
],
['OS=="mac"', {
'xcode_settings': {
"OTHER_CFLAGS": [
"-arch x86_64",
"-arch arm64"
],
"OTHER_LDFLAGS": [
"-arch x86_64",
"-arch arm64"
]
}
}
]
],
'cflags!': [ '-fno-exceptions' ],
Expand Down
2 changes: 1 addition & 1 deletion etc/install-zstd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ build_zstd() {

nbbeeken marked this conversation as resolved.
Show resolved Hide resolved
# CMAKE_RC_FLAGS is a workaround for a bug in 1.5.6 that breaks compilation on windows.
# The fix is merged but not yet released. see https://github.com/facebook/zstd/issues/3999
cmake -DCMAKE_RC_FLAGS="$(pwd)/lib" -DZSTD_MULTITHREAD_SUPPORT=OFF -DZSTD_BUILD_SHARED=OFF .
cmake -DCMAKE_RC_FLAGS="$(pwd)/lib" -DZSTD_MULTITHREAD_SUPPORT=OFF -DZSTD_BUILD_SHARED=OFF -DCMAKE_OSX_ARCHITECTURES=x86_64;arm64 .
nbbeeken marked this conversation as resolved.
Show resolved Hide resolved
cmake --build .
}

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"node": ">= 16.20.1"
},
"scripts": {
"install": "prebuild-install --runtime napi || node-gyp rebuild",
"install": "prebuild-install --runtime napi || npm run clean-install",
"clean-install": "npm run install-zstd && npm run compile",
"compile": "node-gyp rebuild",
"test": "mocha test/index.test.js",
"install-zstd": "bash etc/install-zstd.sh",
Expand Down
Loading