@@ -10,78 +10,76 @@ jobs:
1010 if : ${{ !contains(github.event.head_commit.message, '[skip build]') }}
1111 runs-on : ${{ matrix.os }}
1212 # prettier-ignore
13- name : ${{ matrix.os }}- ${{ matrix.node_arch }}- ${{ matrix.distro }}- ${{ matrix.platform }}
13+ name : ${{ matrix.os }} ${{ matrix.target_arch }} ${{ matrix.distro }} ${{ matrix.platform }}
1414 strategy :
1515 fail-fast : false
1616 matrix :
1717 os :
1818 - ubuntu-24.04
1919 - windows-2019
20+ - macos-13
2021 node_arch :
2122 - x64
2223 cpp_arch :
2324 - x64
25+ target_arch :
26+ - x64
2427 distro :
2528 - " "
26- native :
27- - true
28-
2929 include :
30+ # Windows x86
3031 - os : windows-2019
31- node_arch : ia32
32+ node_arch : x64
33+ target_arch : ia32
3234 cpp_arch : amd64_x86
33- native : true
3435
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
4138 node_arch : x64
42- cpp_arch : x64
43- native : true
39+ target_arch : arm64
40+ cpp_arch : amd64_arm64
4441
42+ # MacOS Arm64
4543 - os : macos-14
4644 node_arch : arm64
45+ target_arch : arm64
4746 cpp_arch : amd64_arm64
48- native : true
4947
50- # Ubuntu x64
48+ # Ubuntu 20.04 x64
5149 - os : ubuntu-24.04
5250 distro : ubuntu
5351 platform : linux/amd64
5452 node_arch : x64
53+ target_arch : x64
5554 cpp_arch : x64
56- native : false
5755
58- # Ubuntu Arm
56+ # Ubuntu 20.04 Arm64
5957 - os : ubuntu-24.04-arm
6058 distro : ubuntu
6159 platform : linux/arm64
6260 node_arch : arm64
61+ target_arch : arm64
6362 cpp_arch : arm64
64- native : false
6563
6664 # Musl Alpine
6765 - os : ubuntu-24.04
6866 distro : alpine
6967 platform : linux/amd64
7068 node_arch : x64
69+ target_arch : x64
7170 cpp_arch : x64
72- native : false
7371
7472 # Musl Alpine Arm
7573 - os : ubuntu-24.04-arm
7674 distro : alpine
7775 platform : linux/arm64
7876 node_arch : arm64
77+ target_arch : arm64
7978 cpp_arch : arm64
80- native : false
8179
8280 env :
8381 npm_config_arch : ${{ matrix.node_arch }}
84- npm_config_target_arch : ${{ matrix.node_arch }}
82+ npm_config_target_arch : ${{ matrix.target_arch }}
8583 setup_node_arch : ${{ matrix.node_arch }}
8684 steps :
8785 - uses : actions/checkout@v4
@@ -105,7 +103,7 @@ jobs:
105103 shell : bash
106104
107105 - name : Setup Cpp
108- if : ${{ matrix.native }}
106+ if : ${{ ! matrix.distro }}
109107 uses : aminya/setup-cpp@v1
110108 with :
111109 vcvarsall : ${{ contains(matrix.os, 'windows') }}
@@ -121,41 +119,36 @@ jobs:
121119 brew install gnutls autoconf automake libtool
122120
123121 - uses : pnpm/action-setup@v4
124- if : ${{ matrix.native }}
122+ if : ${{ ! matrix.distro }}
125123
126124 - name : Install Node 20
127- if : ${{ matrix.native }}
125+ if : ${{ ! matrix.distro }}
128126 uses : actions/setup-node@v4
129127 with :
130128 node-version : 20
131129 architecture : ${{ env.setup_node_arch }}
132130
133131 - name : Install and Build Native
134- if : ${{ matrix.native }}
132+ if : ${{ ! matrix.distro }}
135133 run : pnpm install
136134
137135 - name : Build JavaScript
138- if : ${{ matrix.native }}
136+ if : ${{ ! matrix.distro }}
139137 run : pnpm run build.js
140138
141139 - 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') }}
143141 uses : actions/setup-node@v4
144142 with :
145143 node-version : 12
146144 architecture : ${{ env.setup_node_arch }}
147145
148146 - name : Build Native
149- if : ${{ matrix.native && matrix.node_arch != 'ia32' }}
147+ if : ${{ ! matrix.distro }}
150148 run : npm run build.native
151149
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-
157150 - name : Use Node 20
158- if : ${{ matrix.native }}
151+ if : ${{ ! matrix.distro }}
159152 uses : actions/setup-node@v4
160153 with :
161154 node-version : 20
@@ -190,11 +183,11 @@ jobs:
190183 overwrite : true
191184
192185 - name : Lint
193- if : " ${{ contains(matrix.os, 'ubuntu') && matrix.native }}"
186+ if : " ${{ contains(matrix.os, 'ubuntu') && ! matrix.distro }}"
194187 run : pnpm run lint-test
195188
196189 - name : Test
197- if : ${{ matrix.native }}
190+ if : ${{ ! matrix.distro && !(matrix.os == 'windows-2022' && matrix.target_arch == 'arm64') }}
198191 uses : nick-fields/retry@v3
199192 with :
200193 timeout_minutes : 5
@@ -205,7 +198,7 @@ jobs:
205198 rm -rf ./tmp && mkdir -p ./tmp
206199
207200 - 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') }}"
209202 uses : nick-fields/retry@v3
210203 with :
211204 timeout_minutes : 5
@@ -215,7 +208,7 @@ jobs:
215208 continue-on-error : true
216209
217210 - name : Test Electron Linux
218- if : " ${{ contains(matrix.os, 'ubuntu') && matrix.native }}"
211+ if : " ${{ contains(matrix.os, 'ubuntu') && ! matrix.distro }}"
219212 uses : nick-fields/retry@v3
220213 with :
221214 timeout_minutes : 5
0 commit comments