1515 os :
1616 - ubuntu-20.04
1717 - windows-2019
18- node_version :
19- - 18
2018 node_arch :
2119 - x64
2220 cpp_arch :
@@ -28,34 +26,30 @@ jobs:
2826
2927 include :
3028 - os : windows-2019
31- node_version : 18
3229 node_arch : ia32
3330 cpp_arch : amd64_x86
3431
3532 # - os: windows-2022
36- # node_version: 18
3733 # node_arch: x64
3834 # arch: arm64
3935 # cpp_arch: amd64_arm64
4036
4137 - os : macos-13
42- node_version : 18
4338 node_arch : x64
4439 cpp_arch : x64
4540
4641 - os : macos-14
47- node_version : 18
4842 node_arch : arm64
4943 cpp_arch : amd64_arm64
5044
5145 # Alpine
5246 - os : ubuntu-22.04
5347 docker : node:18-alpine
5448 docker_cmd :
55- apk add --no-cache pkgconfig curl tar python3 make gcc g++ cmake
56- musl-dev && npm i -g pnpm && pnpm install && pnpm run
57- build.prebuild
58- node_version : 18
49+ apk add --no-cache bash build-base curl git g++ make ninja-build
50+ pkgconfig unzip zip python3 tar cmake ninja musl-dev && cp
51+ /usr/lib/ninja- build/bin/ninja /usr/bin/ninja && npm i -g pnpm &&
52+ pnpm install && pnpm run build
5953 node_arch : x64
6054 cpp_arch : x64
6155
@@ -73,12 +67,12 @@ jobs:
7367 with :
7468 path : |
7569 ./node_modules/
76- ./build/
70+ ~/vcpkg
7771 key :
7872 # prettier-ignore
79- " cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch}}-ZMQ_DRAFT:${{env.npm_config_zmq_draft }}-Node:${{ matrix.node_version}}- ${{hashFiles('./package.json') }}"
73+ " cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch}}-ZMQ_DRAFT:${{env.npm_config_zmq_draft }}-${{hashFiles('./package.json') }}"
8074 restore-keys : |
81- "cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-ZMQ_DRAFT:${{ env.npm_config_zmq_draft }}-Node:${{ matrix.node_version }}- "
75+ "cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-ZMQ_DRAFT:${{ env.npm_config_zmq_draft }}-"
8276
8377 - name : Env map
8478 run : |
@@ -93,21 +87,11 @@ jobs:
9387 with :
9488 vcvarsall : ${{ contains(matrix.os, 'windows') }}
9589 cmake : true
90+ ninja : true
9691 python : true
92+ vcpkg : true
9793 architecture : ${{ matrix.cpp_arch }}
9894
99- - uses : pnpm/action-setup@v4
100- if : ${{ !matrix.docker }}
101- with :
102- version : 9
103-
104- - name : Install Node
105- if : ${{ !matrix.docker }}
106- uses : actions/setup-node@v4
107- with :
108- node-version : ${{ matrix.node_version }}
109- architecture : ${{ env.setup_node_arch }}
110-
11195 - name : Install Mac-OS x86_64 Dependencies
11296 if : ${{ contains(matrix.os, 'macos') && matrix.node_arch == 'x64' }}
11397 run : |
@@ -121,13 +105,52 @@ jobs:
121105 echo "PATH=$PATH" >> $GITHUB_ENV
122106 echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
123107
124- - name : Install Dependencies and Build
108+ - uses : pnpm/action-setup@v4
109+ if : ${{ !matrix.docker }}
110+ with :
111+ version : 9
112+
113+ - name : Install Node 20
114+ if : ${{ !matrix.docker }}
115+ uses : actions/setup-node@v4
116+ with :
117+ node-version : 20
118+ architecture : ${{ env.setup_node_arch }}
119+
120+ - name : Install Dependencies
125121 if : ${{ !matrix.docker }}
126122 run : pnpm install
127123
128- - name : Prebuild
124+ - name : Build JavaScript
129125 if : ${{ !matrix.docker }}
130- run : pnpm run build.prebuild
126+ run : pnpm run build.js
127+
128+ - name : Install Node 12
129+ if : ${{ !matrix.docker && matrix.os != 'macos-14' }}
130+ uses : actions/setup-node@v4
131+ with :
132+ node-version : 12
133+ architecture : ${{ env.setup_node_arch }}
134+
135+ - name : Build Native
136+ if :
137+ ${{ !matrix.docker && matrix.os != 'windows-2019' && matrix.node_arch
138+ != 'ia32' }}
139+ run : npm run build.native
140+
141+ - name : Build Native Windows 32
142+ if :
143+ ${{ !matrix.docker && matrix.os == 'windows-2019' && matrix.node_arch
144+ == 'ia32' }}
145+ run :
146+ node ./node_modules/cmake-ts/build/main.js named-configs windows-x86
147+
148+ - name : Use Node 20
149+ if : ${{ !matrix.docker }}
150+ uses : actions/setup-node@v4
151+ with :
152+ node-version : 20
153+ architecture : ${{ env.setup_node_arch }}
131154
132155 - name : Prebuild Docker
133156 if : ${{ matrix.docker }}
@@ -140,8 +163,8 @@ jobs:
140163 - name : Upload artifacts
141164 uses : actions/upload-artifact@v4
142165 with :
143- path : ./prebuilds
144- name : prebuilds -${{ strategy.job-index }}
166+ path : ./build
167+ name : build -${{ strategy.job-index }}
145168 overwrite : true
146169
147170 - name : Lint
@@ -169,13 +192,13 @@ jobs:
169192 pnpm install -g electron@latest
170193 xvfb-run --auto-servernum pnpm run test.electron.main
171194 continue-on-error : true
172- merge-prebuilds :
195+ merge-build :
173196 runs-on : ubuntu-latest
174197 needs : Build
175198 steps :
176199 - name : Merge Artifacts
177200 uses : actions/upload-artifact/merge@v4
178201 with :
179- name : prebuilds
180- pattern : prebuilds -*
202+ name : build
203+ pattern : build -*
181204 delete-merged : true
0 commit comments