Skip to content

Commit af92058

Browse files
authored
Merge pull request #717 from zeromq/build-manifest
feat: use build manifest to load compatible binaries
2 parents b8058fd + 55185f0 commit af92058

File tree

10 files changed

+525
-66
lines changed

10 files changed

+525
-66
lines changed

.github/workflows/CI.yml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ jobs:
115115
116116
- uses: pnpm/action-setup@v4
117117
if: ${{ matrix.native }}
118-
with:
119-
version: 9
120118

121119
- name: Install Node 20
122120
if: ${{ matrix.native }}
@@ -147,8 +145,7 @@ jobs:
147145
- name: Build Native Windows 32
148146
if: ${{ matrix.os == 'windows-2019' && matrix.node_arch == 'ia32' }}
149147
run:
150-
node ./node_modules/cmake-ts/build/main.js named-configs
151-
windows-x86
148+
node ./node_modules/cmake-ts/build/main.js named-configs windows-x86
152149

153150
- name: Use Node 20
154151
if: ${{ matrix.native }}
@@ -245,35 +242,31 @@ jobs:
245242
runs-on: ubuntu-latest
246243
needs: Build
247244
steps:
248-
- name: Merge Artifacts
249-
uses: actions/upload-artifact/merge@v4
250-
with:
251-
name: build
252-
pattern: build-*
253-
delete-merged: true
254-
255245
- uses: actions/checkout@v4
256246

257-
- name: Place build
258-
uses: actions/download-artifact@v4
259-
with:
260-
name: build
261-
path: ./build
262-
263247
- name: Install Node
264248
uses: actions/setup-node@v4
265249
with:
266250
node-version-file: "./.nvmrc"
267251

268252
- name: Install Pnpm
269253
uses: pnpm/action-setup@v4
254+
255+
- name: Download Artifacts
256+
uses: actions/download-artifact@v4
270257
with:
271-
version: 9
258+
pattern: build-*
259+
path: ./build-artifacts
272260

273-
- name: Pack Zeromq
261+
- name: Install Dependencies
262+
run: pnpm install
263+
264+
- name: Merge Artifacts
274265
run: |
275-
pnpm install
276-
pnpm pack
266+
pnpm exec tsx ./script/merge-artifacts.mts
267+
268+
- name: Pack Zeromq
269+
run: pnpm pack
277270

278271
- name: Upload Pack
279272
uses: actions/upload-artifact@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ compile_commands.json
2929

3030
/smoke-test-*
3131
/*.tgz
32+
/build-artifacts

lib/load-addon.js

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

lib/load-addon.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"homepage": "http://zeromq.github.io/zeromq.js/",
2121
"dependencies": {
22-
"cmake-ts": "^0.5.3",
22+
"cmake-ts": "^0.6.0",
2323
"node-addon-api": "^8.3.0"
2424
},
2525
"devDependencies": {
@@ -44,7 +44,8 @@
4444
"eslint-config-atomic": "^1.22.1",
4545
"eslint-plugin-prettier": "^5.2.1",
4646
"execa": "^9.5.2",
47-
"fs-extra": "^11.2.0",
47+
"fast-glob": "^3.3.3",
48+
"fs-extra": "^11.3.0",
4849
"gh-pages": "^6.2.0",
4950
"minify-all-cli": "^1.0.13",
5051
"mocha": "^11.0.1",
@@ -57,6 +58,7 @@
5758
"servor": "^4.0.2",
5859
"shx": "^0.3.4",
5960
"ts-node": "~10.9.2",
61+
"tsx": "^4.19.3",
6062
"typedoc": "^0.27.6",
6163
"typedoc-plugin-dt-links": "^1.1.6",
6264
"typedoc-plugin-include-example": "^2.0.2",
@@ -67,9 +69,9 @@
6769
"which": "^5.0.0"
6870
},
6971
"engines": {
70-
"node": ">= 12",
71-
"pnpm": ">= 9"
72+
"node": ">= 12"
7273
},
74+
"packageManager": "pnpm@10.6.5",
7375
"overrides": {
7476
"typescript": "~4.9.5",
7577
"node-gyp": "10.0.1"
@@ -81,7 +83,8 @@
8183
},
8284
"onlyBuiltDependencies": [
8385
"core-js",
84-
"electron"
86+
"electron",
87+
"esbuild"
8588
]
8689
},
8790
"files": [

0 commit comments

Comments
 (0)