Skip to content

Commit 520b544

Browse files
authored
Merge pull request #171 from agracio/master
merge from master
2 parents c986cb8 + a705875 commit 520b544

File tree

14 files changed

+811
-202
lines changed

14 files changed

+811
-202
lines changed
+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: 'Electron build'
2+
description: 'Electron build'
3+
inputs:
4+
electron:
5+
description: 'Electron version'
6+
required: true
7+
os:
8+
description: 'runs-on'
9+
required: false
10+
default: 'windows-2022'
11+
12+
runs:
13+
using: "composite"
14+
steps:
15+
16+
- name: Setup env
17+
uses: ./.github/actions/setup-env
18+
with:
19+
electron: '${{ inputs.electron }}.0.0'
20+
os: ${{ inputs.os }}
21+
22+
- name: install node-gyp
23+
shell: bash
24+
run: npm i -g node-gyp
25+
26+
- name: Create release folder
27+
shell: cmd
28+
run: |
29+
mkdir "release\ia32\${{ inputs.electron }}.0.0"
30+
mkdir "release\x64\${{ inputs.electron }}.0.0"
31+
mkdir "release\arm64\${{ inputs.electron }}.0.0"
32+
33+
- name: Cache node-gyp
34+
uses: actions/cache@v4
35+
env:
36+
cache-name: cache-node-gyp
37+
with:
38+
path: ~\AppData\Local\node-gyp\Cache
39+
key: '${{ inputs.electron }}.0.0'
40+
41+
- name: Build ia32
42+
uses: ./.github/actions/build
43+
with:
44+
electron: ${{ inputs.electron }}
45+
arch: 'ia32'
46+
47+
- name: Build x64
48+
uses: ./.github/actions/build
49+
with:
50+
electron: ${{ inputs.electron }}
51+
arch: 'x64'
52+
53+
- name: Build arm64
54+
uses: ./.github/actions/build
55+
with:
56+
electron: ${{ inputs.electron }}
57+
arch: 'arm64'
58+
59+
- name: Upload artifacts
60+
uses: actions/upload-artifact@v4
61+
if: success()
62+
with:
63+
name: electron-edge-js-${{ inputs.electron }}.0.0
64+
path: |
65+
release

.github/actions/create-test-report/action.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717
steps:
1818
- name: "Merge test files"
1919
shell: bash
20-
run: node tools/mergeTests.js
20+
run: node tools/mergeTests.js ${{ inputs.electron }}
2121

2222
- name: Read mochawesome.json
2323
uses: actions/github-script@v7
@@ -47,6 +47,7 @@ runs:
4747
path: |
4848
test/mochawesome-report/mochawesome.json
4949
test/mochawesome-report/mochawesome.html
50+
test/mochawesome-report/assets/
5051
5152
- name: Create test report
5253
uses: phoenix-actions/test-reporting@v15

.github/workflows/build-all.yml

+208-59
Original file line numberDiff line numberDiff line change
@@ -9,86 +9,236 @@ env:
99
DOTNET_NOLOGO: 1
1010

1111
jobs:
12-
build:
13-
runs-on: ${{ matrix.os }}
12+
13+
build-29:
14+
runs-on: windows-2022
15+
timeout-minutes: 20
1416
strategy:
15-
# fail-fast: false
16-
matrix:
17-
electron: [29, 30, 31, 32, 33]
18-
# electron: [32, 33]
19-
os: [windows-2022]
17+
fail-fast: false
18+
outputs:
19+
electron: ${{ steps.electron-version.outputs.electron }}
2020

21-
name: build ${{ matrix.os }}-electron-${{ matrix.electron }}
21+
name: build electron-29.0.0
2222
steps:
2323

2424
- name: Checkout code
2525
uses: actions/checkout@v4
26-
27-
- name: Setup env
28-
uses: ./.github/actions/setup-env
26+
27+
- name: Build Electron 29.0.0
28+
uses: ./.github/actions/build-electron
2929
with:
30-
electron: '${{ matrix.electron }}.0.0'
31-
os: ${{ matrix.os }}
32-
33-
- name: install node-gyp
34-
run: npm i -g node-gyp
30+
electron: 29
31+
os: ${{ runner.os }}
3532

36-
- name: Create release folder
33+
- name: Get latest Electron version for 29.0.0
34+
id: electron-version
35+
shell: bash
3736
run: |
38-
mkdir "release\ia32\${{ matrix.electron }}.0.0"
39-
mkdir "release\x64\${{ matrix.electron }}.0.0"
40-
mkdir "release\arm64\${{ matrix.electron }}.0.0"
37+
node tools/getVersion.js 29
38+
echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT
4139
42-
- name: Build ia32
43-
timeout-minutes: 30
44-
uses: ./.github/actions/build
45-
with:
46-
electron: ${{ matrix.electron }}
47-
arch: 'ia32'
40+
build-30:
41+
runs-on: windows-2022
42+
timeout-minutes: 20
43+
strategy:
44+
fail-fast: false
45+
outputs:
46+
electron: ${{ steps.electron-version.outputs.electron }}
47+
48+
name: build electron-30.0.0
49+
steps:
4850

49-
- name: Build x64
50-
timeout-minutes: 30
51-
uses: ./.github/actions/build
52-
with:
53-
electron: ${{ matrix.electron }}
54-
arch: 'x64'
51+
- name: Checkout code
52+
uses: actions/checkout@v4
5553

56-
- name: Build arm64
57-
timeout-minutes: 30
58-
uses: ./.github/actions/build
54+
- name: Build Electron 30.0.0
55+
uses: ./.github/actions/build-electron
5956
with:
60-
electron: ${{ matrix.electron }}
61-
arch: 'arm64'
62-
63-
- name: Upload artifacts
64-
uses: actions/upload-artifact@v4
65-
if: success()
57+
electron: 30
58+
os: ${{ runner.os }}
59+
60+
- name: Get latest Electron version for 30.0.0
61+
id: electron-version
62+
shell: bash
63+
run: |
64+
node tools/getVersion.js 30
65+
echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT
66+
67+
build-31:
68+
runs-on: windows-2022
69+
timeout-minutes: 20
70+
strategy:
71+
fail-fast: false
72+
outputs:
73+
electron: ${{ steps.electron-version.outputs.electron }}
74+
75+
name: build electron-31.0.0
76+
steps:
77+
78+
- name: Checkout code
79+
uses: actions/checkout@v4
80+
81+
- name: Build Electron 31.0.0
82+
uses: ./.github/actions/build-electron
6683
with:
67-
name: electron-edge-js-${{ matrix.electron }}.0.0
68-
path: |
69-
release
84+
electron: 31
85+
os: ${{ runner.os }}
7086

71-
electron-versions:
72-
runs-on: ubuntu-22.04
87+
- name: Get latest Electron version for 31.0.0
88+
id: electron-version
89+
shell: bash
90+
run: |
91+
node tools/getVersion.js 31
92+
echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT
93+
94+
build-32:
95+
runs-on: windows-2022
96+
timeout-minutes: 20
97+
strategy:
98+
fail-fast: false
7399
outputs:
74-
matrix: ${{ steps.electron-test-versions.outputs.matrix }}
100+
electron: ${{ steps.electron-version.outputs.electron }}
101+
102+
name: build electron-32.0.0
103+
steps:
75104

76-
needs: build
77-
name: electron-versions
105+
- name: Checkout code
106+
uses: actions/checkout@v4
107+
108+
- name: Build Electron 32.0.0
109+
uses: ./.github/actions/build-electron
110+
with:
111+
electron: 32
112+
os: ${{ runner.os }}
113+
114+
- name: Get latest Electron version for 32.0.0
115+
id: electron-version
116+
shell: bash
117+
run: |
118+
node tools/getVersion.js 32
119+
echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT
120+
121+
build-33:
122+
runs-on: windows-2022
123+
timeout-minutes: 20
124+
strategy:
125+
fail-fast: false
126+
outputs:
127+
electron: ${{ steps.electron-version.outputs.electron }}
128+
129+
name: build electron-33.0.0
78130
steps:
79-
- name: Electron versions
131+
132+
- name: Checkout code
133+
uses: actions/checkout@v4
134+
135+
- name: Build Electron 33.0.0
136+
uses: ./.github/actions/build-electron
137+
with:
138+
electron: 33
139+
os: ${{ runner.os }}
140+
141+
- name: Get latest Electron version for 33.0.0
142+
id: electron-version
80143
shell: bash
81-
id: electron-test-versions
82-
run: echo "matrix={'include':[{'electron':'29.4.6', 'os':'windows-2022'},{'electron':'30.5.1', 'os':'windows-2022'},{'electron':'31.7.5', 'os':'windows-2022'},{'electron':'32.2.5', 'os':'windows-2022'},{'electron':'33.2.0', 'os':'windows-2022'}]}" >> $GITHUB_OUTPUT
144+
run: |
145+
node tools/getVersion.js 33
146+
echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT
147+
148+
test-29:
149+
strategy:
150+
fail-fast: false
151+
matrix:
152+
os: [windows-2022]
153+
runs-on: ${{ matrix.os }}
154+
timeout-minutes: 10
155+
needs: build-29
156+
157+
name: test ${{ matrix.os }}-v${{needs.build-29.outputs.electron}}
158+
steps:
159+
160+
- name: Checkout code
161+
uses: actions/checkout@v4
162+
163+
- name: Test build
164+
uses: ./.github/actions/test-build
165+
with:
166+
electron: ${{ needs.build-29.outputs.electron }}
167+
os: ${{ matrix.os }}
168+
169+
test-30:
170+
strategy:
171+
fail-fast: false
172+
matrix:
173+
os: [windows-2022]
174+
runs-on: ${{ matrix.os }}
175+
timeout-minutes: 10
176+
needs: build-30
177+
178+
name: test ${{ matrix.os }}-v${{needs.build-30.outputs.electron}}
179+
steps:
180+
181+
- name: Checkout code
182+
uses: actions/checkout@v4
83183

84-
test:
184+
- name: Test build
185+
uses: ./.github/actions/test-build
186+
with:
187+
electron: ${{ needs.build-30.outputs.electron }}
188+
os: ${{ matrix.os }}
189+
190+
test-31:
191+
strategy:
192+
fail-fast: false
193+
matrix:
194+
os: [windows-2022]
195+
runs-on: ${{ matrix.os }}
196+
timeout-minutes: 10
197+
needs: build-31
198+
199+
name: test ${{ matrix.os }}-v${{needs.build-31.outputs.electron}}
200+
steps:
201+
202+
- name: Checkout code
203+
uses: actions/checkout@v4
204+
205+
- name: Test build
206+
uses: ./.github/actions/test-build
207+
with:
208+
electron: ${{ needs.build-31.outputs.electron }}
209+
os: ${{ matrix.os }}
210+
211+
test-32:
212+
strategy:
213+
fail-fast: false
214+
matrix:
215+
os: [windows-2022]
216+
runs-on: ${{ matrix.os }}
217+
timeout-minutes: 10
218+
needs: build-32
219+
220+
name: test ${{ matrix.os }}-v${{needs.build-32.outputs.electron}}
221+
steps:
222+
223+
- name: Checkout code
224+
uses: actions/checkout@v4
225+
226+
- name: Test build
227+
uses: ./.github/actions/test-build
228+
with:
229+
electron: ${{ needs.build-32.outputs.electron }}
230+
os: ${{ matrix.os }}
231+
232+
test-33:
85233
strategy:
86-
matrix: ${{ fromJSON(needs.electron-versions.outputs.matrix) }}
234+
fail-fast: false
235+
matrix:
236+
os: [windows-2022]
87237
runs-on: ${{ matrix.os }}
88-
needs: electron-versions
89-
# fail-fast: false
238+
timeout-minutes: 10
239+
needs: build-33
90240

91-
name: test ${{ matrix.os }}-v${{ matrix.electron }}
241+
name: test ${{ matrix.os }}-v${{needs.build-33.outputs.electron}}
92242
steps:
93243

94244
- name: Checkout code
@@ -97,7 +247,6 @@ jobs:
97247
- name: Test build
98248
uses: ./.github/actions/test-build
99249
with:
100-
electron: ${{ matrix.electron }}
250+
electron: ${{ needs.build-33.outputs.electron }}
101251
os: ${{ matrix.os }}
102252

103-

0 commit comments

Comments
 (0)