Skip to content

Commit edaaf5e

Browse files
build universal binary
1 parent 5097e88 commit edaaf5e

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
host_tests:
1111
strategy:
1212
matrix:
13-
os: [macos-latest, windows-2019]
13+
os: [macos-latest, windows-2019, macos-13]
1414
fail-fast: false
1515
runs-on: ${{ matrix.os }}
1616
steps:

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
host_tests:
1212
strategy:
1313
matrix:
14-
os: [macos-latest, windows-2019]
14+
os: [macos-latest, windows-2019, macos-13]
1515
node: [16.20.1, 18.x, 20.x, 22.x]
1616
fail-fast: false
1717
runs-on: ${{ matrix.os }}

binding.gyp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,19 @@
3434
]
3535
},
3636
}
37+
],
38+
['OS=="mac"', {
39+
'xcode_settings': {
40+
"OTHER_CFLAGS": [
41+
"-arch x86_64",
42+
"-arch arm64"
43+
],
44+
"OTHER_LDFLAGS": [
45+
"-arch x86_64",
46+
"-arch arm64"
47+
]
48+
}
49+
}
3750
]
3851
],
3952
'cflags!': [ '-fno-exceptions' ],

etc/install-zstd.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ build_zstd() {
2020

2121
# CMAKE_RC_FLAGS is a workaround for a bug in 1.5.6 that breaks compilation on windows.
2222
# The fix is merged but not yet released. see https://github.com/facebook/zstd/issues/3999
23-
cmake -DCMAKE_RC_FLAGS="$(pwd)/lib" -DZSTD_MULTITHREAD_SUPPORT=OFF -DZSTD_BUILD_SHARED=OFF .
23+
cmake -DCMAKE_RC_FLAGS="$(pwd)/lib" -DZSTD_MULTITHREAD_SUPPORT=OFF -DZSTD_BUILD_SHARED=OFF -DCMAKE_OSX_ARCHITECTURES=x86_64;arm64 .
2424
cmake --build .
2525
}
2626

0 commit comments

Comments
 (0)