Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed Dec 2, 2024
1 parent 03a6620 commit ecc3b02
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 191 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
name: Build

jobs:
host_tests:
macos_and_windows:
strategy:
matrix:
os: [macos-latest, windows-2019]
Expand All @@ -30,6 +30,14 @@ jobs:
run: npm install --loglevel verbose && npm run prebuild
shell: bash

# macOS arm64 builds are universal macOS binaries. We copy the arm64 build
# into the location that prebuild expects for a x64 build so we can
# install on both architectures.
- name: copy universal macos binary to platform specific binaries
if: ${{ matrix.os == 'macos-latest' }}
shell: bash
run: bash etc/make-macos-x64-build.sh

- id: upload
name: Upload prebuild
uses: actions/upload-artifact@v4
Expand All @@ -40,7 +48,7 @@ jobs:
retention-days: 1
compression-level: 0

container_tests_glibc:
glibc:
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -80,7 +88,7 @@ jobs:
retention-days: 1
compression-level: 0

container_tests_musl:
musl:
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ jobs:
- name: Copy sbom file to release assets
shell: bash
if: ${{ 'node-zstd' == '' }}
run: cp sbom.json ${{ env.S3_ASSETS }}/sbom.json
run: |
cp sbom.json ${{ env.S3_ASSETS }}/sbom.json
- name: Augment SBOM and copy to release assets
if: ${{ 'node-zstd' != '' }}
Expand Down
14 changes: 13 additions & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,19 @@
]
},
}
]
],
['ARCH=="arm64"', {
'xcode_settings': {
"OTHER_CFLAGS": [
"-arch x86_64",
"-arch arm64"
],
"OTHER_LDFLAGS": [
"-arch x86_64",
"-arch arm64"
]
}
}]
],
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ],
Expand Down
7 changes: 7 additions & 0 deletions etc/make-macos-x64-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! /bin/bash

package_version=$(cat package.json | jq -r '.version')
build_file=$(ls prebuilds/@mongodb-js)
x64_file=$(echo $build_file | sed -e s/x64/arm64/g)
echo $x64_file
cp prebuilds/@mongodb-js/$build_file prebuilds/@mongodb-js/$x64_file
198 changes: 14 additions & 184 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@mongodb-js/zstd": "^1.2.0",
"@mongodb-js/zstd": "^2.0.0-alpha.0",
"@typescript-eslint/eslint-plugin": "^8.11.0",
"@wasm-fmt/clang-format": "^19.1.3",
"chai": "^4.5.0",
Expand Down Expand Up @@ -55,4 +55,4 @@
]
},
"mongodb:zstd_version": "1.5.6"
}
}

0 comments on commit ecc3b02

Please sign in to comment.