@@ -27,62 +27,71 @@ jobs:
2727 - " "
2828 distro :
2929 - " "
30- native :
31- - true
32-
30+ vm :
31+ - false
32+ cross_compiling :
33+ - false
3334 include :
3435 - os : windows-2019
3536 node_arch : ia32
3637 node_target_arch : ia32
3738 cpp_arch : amd64_x86
38- native : true
39+ vm : false
40+ cross_compiling : true
3941
4042 - os : windows-2022
4143 node_arch : x64
4244 node_target_arch : arm64
4345 cpp_arch : amd64_arm64
44- native : true
46+ vm : false
47+ cross_compiling : true
4548
4649 - os : macos-13
4750 node_arch : x64
4851 node_target_arch : x64
4952 cpp_arch : x64
50- native : true
53+ vm : false
54+ cross_compiling : false
5155
5256 - os : macos-14
5357 node_arch : arm64
5458 node_target_arch : arm64
5559 cpp_arch : arm64
56- native : true
60+ vm : false
61+ cross_compiling : false
5762
5863 # Musl Alpine
5964 - os : ubuntu-24.04
6065 dockerfile : docker/alpine.dockerfile
6166 node_arch : x64
6267 node_target_arch : x64
6368 cpp_arch : x64
64- native : false
69+ vm : true
70+ cross_compiling : false
6571
6672 # Debian Arm
6773 - os : ubuntu-24.04
6874 distro : bookworm
6975 node_arch : arm64
7076 node_target_arch : arm64
7177 cpp_arch : arm64
72- native : false
78+ vm : true
79+ cross_compiling : false
7380
7481 # Musl Alpine Arm
7582 - os : ubuntu-24.04
7683 distro : alpine_latest
7784 node_arch : arm64
7885 node_target_arch : arm64
7986 cpp_arch : arm64
80- native : false
87+ vm : true
88+ cross_compiling : false
8189
8290 env :
8391 npm_config_arch : ${{ matrix.node_arch }}
8492 npm_config_target_arch : ${{ matrix.node_target_arch }}
8593 setup_node_arch : ${{ matrix.node_arch }}
94+ cross_compiling : ${{ matrix.cross_compiling }}
8695 steps :
8796 - uses : actions/checkout@v4
8897
@@ -105,7 +114,7 @@ jobs:
105114 shell : bash
106115
107116 - name : Setup Cpp
108- if : ${{ matrix.native }}
117+ if : ${{ ! matrix.vm }}
109118 uses : aminya/setup-cpp@master
110119 with :
111120 vcvarsall : ${{ contains(matrix.os, 'windows') }}
@@ -121,44 +130,38 @@ jobs:
121130 brew install gnutls autoconf automake libtool
122131
123132 - uses : pnpm/action-setup@v4
124- if : ${{ matrix.native }}
133+ if : ${{ ! matrix.vm }}
125134 with :
126135 version : 9
127136
128137 - name : Install Node 20
129- if : ${{ matrix.native }}
138+ if : ${{ ! matrix.vm }}
130139 uses : actions/setup-node@v4
131140 with :
132141 node-version : 20
133142 architecture : ${{ env.setup_node_arch }}
134143
135144 - name : Install and Build Native
136- if : ${{ matrix.native }}
145+ if : ${{ ! matrix.vm }}
137146 run : pnpm install
138147
139148 - name : Build JavaScript
140- if : ${{ matrix.native }}
149+ if : ${{ ! matrix.vm }}
141150 run : pnpm run build.js
142151
143152 - name : Install Node 10
144- if : ${{ matrix.native && matrix.os != 'macos-14' }}
153+ if : ${{ ! matrix.vm && matrix.os != 'macos-14' }}
145154 uses : actions/setup-node@v4
146155 with :
147156 node-version : 10
148157 architecture : ${{ env.setup_node_arch }}
149158
150- - name : Build Native
151- if : ${{ matrix.native && matrix.node_arch != 'ia32' }}
152- run : npm run build.native
153-
154- - name : Build Native Windows 32
155- if : ${{ matrix.os == 'windows-2019' && matrix.node_arch == 'ia32' }}
156- run :
157- node ./node_modules/@aminya/cmake-ts/build/main.js named-configs
158- windows-x86
159+ - name : Build Node 10 Native
160+ if : ${{ !matrix.vm }}
161+ run : node ./script/install.js
159162
160163 - name : Use Node 20
161- if : ${{ matrix.native }}
164+ if : ${{ ! matrix.vm }}
162165 uses : actions/setup-node@v4
163166 with :
164167 node-version : 20
@@ -210,11 +213,11 @@ jobs:
210213 overwrite : true
211214
212215 - name : Lint
213- if : " ${{ contains(matrix.os, 'ubuntu') && matrix.native }}"
216+ if : " ${{ !matrix.vm && contains(matrix.os, 'ubuntu') }}"
214217 run : pnpm run lint-test
215218
216219 - name : Test
217- if : ${{ matrix.native }}
220+ if : ${{ ! matrix.vm }}
218221 uses : nick-fields/retry@v3
219222 with :
220223 timeout_minutes : 5
@@ -225,7 +228,7 @@ jobs:
225228 rm -rf ./tmp && mkdir -p ./tmp
226229
227230 - name : Test Electron Windows/MacOS
228- if : " ${{ !contains(matrix.os, 'ubuntu') && matrix.native }}"
231+ if : " ${{ !matrix.vm && ! contains(matrix.os, 'ubuntu') }}"
229232 uses : nick-fields/retry@v3
230233 with :
231234 timeout_minutes : 5
@@ -235,7 +238,7 @@ jobs:
235238 continue-on-error : true
236239
237240 - name : Test Electron Linux
238- if : " ${{ contains(matrix.os, 'ubuntu') && matrix.native }}"
241+ if : " ${{ !matrix.vm && contains(matrix.os, 'ubuntu') }}"
239242 uses : nick-fields/retry@v3
240243 with :
241244 timeout_minutes : 5
0 commit comments