15
15
os :
16
16
- ubuntu-20.04
17
17
- windows-2019
18
- node_version :
19
- - 18
20
18
node_arch :
21
19
- x64
22
20
cpp_arch :
@@ -28,34 +26,30 @@ jobs:
28
26
29
27
include :
30
28
- os : windows-2019
31
- node_version : 18
32
29
node_arch : ia32
33
30
cpp_arch : amd64_x86
34
31
35
32
# - os: windows-2022
36
- # node_version: 18
37
33
# node_arch: x64
38
34
# arch: arm64
39
35
# cpp_arch: amd64_arm64
40
36
41
37
- os : macos-13
42
- node_version : 18
43
38
node_arch : x64
44
39
cpp_arch : x64
45
40
46
41
- os : macos-14
47
- node_version : 18
48
42
node_arch : arm64
49
43
cpp_arch : amd64_arm64
50
44
51
45
# Alpine
52
46
- os : ubuntu-22.04
53
47
docker : node:18-alpine
54
48
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
59
53
node_arch : x64
60
54
cpp_arch : x64
61
55
@@ -73,12 +67,12 @@ jobs:
73
67
with :
74
68
path : |
75
69
./node_modules/
76
- ./build/
70
+ ~/vcpkg
77
71
key :
78
72
# 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') }}"
80
74
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 }}-"
82
76
83
77
- name : Env map
84
78
run : |
@@ -93,21 +87,11 @@ jobs:
93
87
with :
94
88
vcvarsall : ${{ contains(matrix.os, 'windows') }}
95
89
cmake : true
90
+ ninja : true
96
91
python : true
92
+ vcpkg : true
97
93
architecture : ${{ matrix.cpp_arch }}
98
94
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
-
111
95
- name : Install Mac-OS x86_64 Dependencies
112
96
if : ${{ contains(matrix.os, 'macos') && matrix.node_arch == 'x64' }}
113
97
run : |
@@ -121,13 +105,52 @@ jobs:
121
105
echo "PATH=$PATH" >> $GITHUB_ENV
122
106
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
123
107
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
125
121
if : ${{ !matrix.docker }}
126
122
run : pnpm install
127
123
128
- - name : Prebuild
124
+ - name : Build JavaScript
129
125
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 }}
131
154
132
155
- name : Prebuild Docker
133
156
if : ${{ matrix.docker }}
@@ -140,8 +163,8 @@ jobs:
140
163
- name : Upload artifacts
141
164
uses : actions/upload-artifact@v4
142
165
with :
143
- path : ./prebuilds
144
- name : prebuilds -${{ strategy.job-index }}
166
+ path : ./build
167
+ name : build -${{ strategy.job-index }}
145
168
overwrite : true
146
169
147
170
- name : Lint
@@ -169,13 +192,13 @@ jobs:
169
192
pnpm install -g electron@latest
170
193
xvfb-run --auto-servernum pnpm run test.electron.main
171
194
continue-on-error : true
172
- merge-prebuilds :
195
+ merge-build :
173
196
runs-on : ubuntu-latest
174
197
needs : Build
175
198
steps :
176
199
- name : Merge Artifacts
177
200
uses : actions/upload-artifact/merge@v4
178
201
with :
179
- name : prebuilds
180
- pattern : prebuilds -*
202
+ name : build
203
+ pattern : build -*
181
204
delete-merged : true
0 commit comments