@@ -10,78 +10,76 @@ jobs:
10
10
if : ${{ !contains(github.event.head_commit.message, '[skip build]') }}
11
11
runs-on : ${{ matrix.os }}
12
12
# prettier-ignore
13
- name : ${{ matrix.os }}- ${{ matrix.node_arch }}- ${{ matrix.distro }}- ${{ matrix.platform }}
13
+ name : ${{ matrix.os }} ${{ matrix.target_arch }} ${{ matrix.distro }} ${{ matrix.platform }}
14
14
strategy :
15
15
fail-fast : false
16
16
matrix :
17
17
os :
18
18
- ubuntu-24.04
19
19
- windows-2019
20
+ - macos-13
20
21
node_arch :
21
22
- x64
22
23
cpp_arch :
23
24
- x64
25
+ target_arch :
26
+ - x64
24
27
distro :
25
28
- " "
26
- native :
27
- - true
28
-
29
29
include :
30
+ # Windows x86
30
31
- os : windows-2019
31
- node_arch : ia32
32
+ node_arch : x64
33
+ target_arch : ia32
32
34
cpp_arch : amd64_x86
33
- native : true
34
35
35
- # - os: windows-2022
36
- # node_arch: x64
37
- # arch: arm64
38
- # cpp_arch: amd64_arm64
39
-
40
- - os : macos-13
36
+ # Windows Arm64
37
+ - os : windows-2022
41
38
node_arch : x64
42
- cpp_arch : x64
43
- native : true
39
+ target_arch : arm64
40
+ cpp_arch : amd64_arm64
44
41
42
+ # MacOS Arm64
45
43
- os : macos-14
46
44
node_arch : arm64
45
+ target_arch : arm64
47
46
cpp_arch : amd64_arm64
48
- native : true
49
47
50
- # Ubuntu x64
48
+ # Ubuntu 20.04 x64
51
49
- os : ubuntu-24.04
52
50
distro : ubuntu
53
51
platform : linux/amd64
54
52
node_arch : x64
53
+ target_arch : x64
55
54
cpp_arch : x64
56
- native : false
57
55
58
- # Ubuntu Arm
56
+ # Ubuntu 20.04 Arm64
59
57
- os : ubuntu-24.04-arm
60
58
distro : ubuntu
61
59
platform : linux/arm64
62
60
node_arch : arm64
61
+ target_arch : arm64
63
62
cpp_arch : arm64
64
- native : false
65
63
66
64
# Musl Alpine
67
65
- os : ubuntu-24.04
68
66
distro : alpine
69
67
platform : linux/amd64
70
68
node_arch : x64
69
+ target_arch : x64
71
70
cpp_arch : x64
72
- native : false
73
71
74
72
# Musl Alpine Arm
75
73
- os : ubuntu-24.04-arm
76
74
distro : alpine
77
75
platform : linux/arm64
78
76
node_arch : arm64
77
+ target_arch : arm64
79
78
cpp_arch : arm64
80
- native : false
81
79
82
80
env :
83
81
npm_config_arch : ${{ matrix.node_arch }}
84
- npm_config_target_arch : ${{ matrix.node_arch }}
82
+ npm_config_target_arch : ${{ matrix.target_arch }}
85
83
setup_node_arch : ${{ matrix.node_arch }}
86
84
steps :
87
85
- uses : actions/checkout@v4
@@ -105,7 +103,7 @@ jobs:
105
103
shell : bash
106
104
107
105
- name : Setup Cpp
108
- if : ${{ matrix.native }}
106
+ if : ${{ ! matrix.distro }}
109
107
uses : aminya/setup-cpp@v1
110
108
with :
111
109
vcvarsall : ${{ contains(matrix.os, 'windows') }}
@@ -121,41 +119,36 @@ jobs:
121
119
brew install gnutls autoconf automake libtool
122
120
123
121
- uses : pnpm/action-setup@v4
124
- if : ${{ matrix.native }}
122
+ if : ${{ ! matrix.distro }}
125
123
126
124
- name : Install Node 20
127
- if : ${{ matrix.native }}
125
+ if : ${{ ! matrix.distro }}
128
126
uses : actions/setup-node@v4
129
127
with :
130
128
node-version : 20
131
129
architecture : ${{ env.setup_node_arch }}
132
130
133
131
- name : Install and Build Native
134
- if : ${{ matrix.native }}
132
+ if : ${{ ! matrix.distro }}
135
133
run : pnpm install
136
134
137
135
- name : Build JavaScript
138
- if : ${{ matrix.native }}
136
+ if : ${{ ! matrix.distro }}
139
137
run : pnpm run build.js
140
138
141
139
- name : Install Node 12
142
- if : ${{ matrix.native && matrix.os != 'macos-14' }}
140
+ if : ${{ ! matrix.distro && matrix.os != 'macos-14' && !(matrix.os == 'windows-2022' && matrix.target_arch == 'arm64') }}
143
141
uses : actions/setup-node@v4
144
142
with :
145
143
node-version : 12
146
144
architecture : ${{ env.setup_node_arch }}
147
145
148
146
- name : Build Native
149
- if : ${{ matrix.native && matrix.node_arch != 'ia32' }}
147
+ if : ${{ ! matrix.distro }}
150
148
run : npm run build.native
151
149
152
- - name : Build Native Windows 32
153
- if : ${{ matrix.os == 'windows-2019' && matrix.node_arch == 'ia32' }}
154
- run :
155
- node --enable-source-maps ./node_modules/cmake-ts/build/main.js build --config win32-ia32-release
156
-
157
150
- name : Use Node 20
158
- if : ${{ matrix.native }}
151
+ if : ${{ ! matrix.distro }}
159
152
uses : actions/setup-node@v4
160
153
with :
161
154
node-version : 20
@@ -190,11 +183,11 @@ jobs:
190
183
overwrite : true
191
184
192
185
- name : Lint
193
- if : " ${{ contains(matrix.os, 'ubuntu') && matrix.native }}"
186
+ if : " ${{ contains(matrix.os, 'ubuntu') && ! matrix.distro }}"
194
187
run : pnpm run lint-test
195
188
196
189
- name : Test
197
- if : ${{ matrix.native }}
190
+ if : ${{ ! matrix.distro && !(matrix.os == 'windows-2022' && matrix.target_arch == 'arm64') }}
198
191
uses : nick-fields/retry@v3
199
192
with :
200
193
timeout_minutes : 5
@@ -205,7 +198,7 @@ jobs:
205
198
rm -rf ./tmp && mkdir -p ./tmp
206
199
207
200
- name : Test Electron Windows/MacOS
208
- if : " ${{ !contains(matrix.os, 'ubuntu') && matrix.native }}"
201
+ if : " ${{ !contains(matrix.os, 'ubuntu') && ! matrix.distro && !(matrix.os == 'windows-2022' && matrix.target_arch == 'arm64') }}"
209
202
uses : nick-fields/retry@v3
210
203
with :
211
204
timeout_minutes : 5
@@ -215,7 +208,7 @@ jobs:
215
208
continue-on-error : true
216
209
217
210
- name : Test Electron Linux
218
- if : " ${{ contains(matrix.os, 'ubuntu') && matrix.native }}"
211
+ if : " ${{ contains(matrix.os, 'ubuntu') && ! matrix.distro }}"
219
212
uses : nick-fields/retry@v3
220
213
with :
221
214
timeout_minutes : 5
0 commit comments