Skip to content

Commit ecc3b02

Browse files
asdf
1 parent 03a6620 commit ecc3b02

File tree

6 files changed

+49
-191
lines changed

6 files changed

+49
-191
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
name: Build
88

99
jobs:
10-
host_tests:
10+
macos_and_windows:
1111
strategy:
1212
matrix:
1313
os: [macos-latest, windows-2019]
@@ -30,6 +30,14 @@ jobs:
3030
run: npm install --loglevel verbose && npm run prebuild
3131
shell: bash
3232

33+
# macOS arm64 builds are universal macOS binaries. We copy the arm64 build
34+
# into the location that prebuild expects for a x64 build so we can
35+
# install on both architectures.
36+
- name: copy universal macos binary to platform specific binaries
37+
if: ${{ matrix.os == 'macos-latest' }}
38+
shell: bash
39+
run: bash etc/make-macos-x64-build.sh
40+
3341
- id: upload
3442
name: Upload prebuild
3543
uses: actions/upload-artifact@v4
@@ -40,7 +48,7 @@ jobs:
4048
retention-days: 1
4149
compression-level: 0
4250

43-
container_tests_glibc:
51+
glibc:
4452
runs-on: ubuntu-latest
4553
strategy:
4654
matrix:
@@ -80,7 +88,7 @@ jobs:
8088
retention-days: 1
8189
compression-level: 0
8290

83-
container_tests_musl:
91+
musl:
8492
runs-on: ubuntu-latest
8593
strategy:
8694
matrix:

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ jobs:
6161
- name: Copy sbom file to release assets
6262
shell: bash
6363
if: ${{ 'node-zstd' == '' }}
64-
run: cp sbom.json ${{ env.S3_ASSETS }}/sbom.json
64+
run: |
65+
cp sbom.json ${{ env.S3_ASSETS }}/sbom.json
6566
6667
- name: Augment SBOM and copy to release assets
6768
if: ${{ 'node-zstd' != '' }}

binding.gyp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,19 @@
3434
]
3535
},
3636
}
37-
]
37+
],
38+
['ARCH=="arm64"', {
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+
}]
3850
],
3951
'cflags!': [ '-fno-exceptions' ],
4052
'cflags_cc!': [ '-fno-exceptions' ],

etc/make-macos-x64-build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#! /bin/bash
2+
3+
package_version=$(cat package.json | jq -r '.version')
4+
build_file=$(ls prebuilds/@mongodb-js)
5+
x64_file=$(echo $build_file | sed -e s/x64/arm64/g)
6+
echo $x64_file
7+
cp prebuilds/@mongodb-js/$build_file prebuilds/@mongodb-js/$x64_file

package-lock.json

Lines changed: 14 additions & 184 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"license": "Apache-2.0",
2121
"devDependencies": {
22-
"@mongodb-js/zstd": "^1.2.0",
22+
"@mongodb-js/zstd": "^2.0.0-alpha.0",
2323
"@typescript-eslint/eslint-plugin": "^8.11.0",
2424
"@wasm-fmt/clang-format": "^19.1.3",
2525
"chai": "^4.5.0",
@@ -55,4 +55,4 @@
5555
]
5656
},
5757
"mongodb:zstd_version": "1.5.6"
58-
}
58+
}

0 commit comments

Comments
 (0)