Skip to content

Commit 67b13c0

Browse files
committed
updating CI
1 parent 6fb961a commit 67b13c0

File tree

2 files changed

+134
-72
lines changed

2 files changed

+134
-72
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/workflows/build-all.yml

+69-72
Original file line numberDiff line numberDiff line change
@@ -9,94 +9,91 @@ env:
99
DOTNET_NOLOGO: 1
1010

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

21-
name: build ${{ matrix.os }}-electron-${{ matrix.electron }}
17+
name: build electron-29.0.0
2218
steps:
2319

2420
- name: Checkout code
2521
uses: actions/checkout@v4
26-
27-
- name: Setup env
28-
uses: ./.github/actions/setup-env
22+
23+
- name: Build Electron 29
24+
uses: ./.github/actions/setup-build
2925
with:
30-
electron: '${{ matrix.electron }}.0.0'
31-
os: ${{ matrix.os }}
26+
electron: 29
27+
os: ${{ runner.os }}
28+
29+
- name: Electron version
30+
shell: bash
31+
id: electron-version
32+
run: echo "electron=29.4.6" >> $GITHUB_OUTPUT
33+
34+
# - name: Setup env
35+
# uses: ./.github/actions/setup-env
36+
# with:
37+
# electron: '${{ matrix.electron }}.0.0'
38+
# os: ${{ runner.os }}
3239

33-
- name: install node-gyp
34-
run: npm i -g node-gyp
35-
36-
- name: Create release folder
37-
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"
41-
42-
- name: Cache node-gyp
43-
uses: actions/cache@v4
44-
env:
45-
cache-name: cache-node-gyp
46-
with:
47-
path: ~\AppData\Local\node-gyp\Cache
48-
key: '${{ matrix.electron }}.0.0'
40+
# - name: install node-gyp
41+
# run: npm i -g node-gyp
4942

50-
- name: Build ia32
51-
timeout-minutes: 30
52-
uses: ./.github/actions/build
53-
with:
54-
electron: ${{ matrix.electron }}
55-
arch: 'ia32'
43+
# - name: Create release folder
44+
# run: |
45+
# mkdir "release\ia32\${{ matrix.electron }}.0.0"
46+
# mkdir "release\x64\${{ matrix.electron }}.0.0"
47+
# mkdir "release\arm64\${{ matrix.electron }}.0.0"
5648

57-
- name: Build x64
58-
timeout-minutes: 30
59-
uses: ./.github/actions/build
60-
with:
61-
electron: ${{ matrix.electron }}
62-
arch: 'x64'
49+
# - name: Cache node-gyp
50+
# uses: actions/cache@v4
51+
# env:
52+
# cache-name: cache-node-gyp
53+
# with:
54+
# path: ~\AppData\Local\node-gyp\Cache
55+
# key: '${{ matrix.electron }}.0.0'
6356

64-
- name: Build arm64
65-
timeout-minutes: 30
66-
uses: ./.github/actions/build
67-
with:
68-
electron: ${{ matrix.electron }}
69-
arch: 'arm64'
70-
71-
- name: Upload artifacts
72-
uses: actions/upload-artifact@v4
73-
if: success()
74-
with:
75-
name: electron-edge-js-${{ matrix.electron }}.0.0
76-
path: |
77-
release
57+
# - name: Build ia32
58+
# timeout-minutes: 30
59+
# uses: ./.github/actions/build
60+
# with:
61+
# electron: ${{ matrix.electron }}
62+
# arch: 'ia32'
7863

79-
electron-versions:
80-
runs-on: ubuntu-22.04
81-
outputs:
82-
matrix: ${{ steps.electron-test-versions.outputs.matrix }}
64+
# - name: Build x64
65+
# timeout-minutes: 30
66+
# uses: ./.github/actions/build
67+
# with:
68+
# electron: ${{ matrix.electron }}
69+
# arch: 'x64'
8370

84-
needs: build
85-
name: electron-versions
86-
steps:
87-
- name: Electron versions
88-
shell: bash
89-
id: electron-test-versions
90-
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.6', 'os':'windows-2022'},{'electron':'33.2.1', 'os':'windows-2022'}]}" >> $GITHUB_OUTPUT
71+
# - name: Build arm64
72+
# timeout-minutes: 30
73+
# uses: ./.github/actions/build
74+
# with:
75+
# electron: ${{ matrix.electron }}
76+
# arch: 'arm64'
77+
78+
# - name: Upload artifacts
79+
# uses: actions/upload-artifact@v4
80+
# if: success()
81+
# with:
82+
# name: electron-edge-js-${{ matrix.electron }}.0.0
83+
# path: |
84+
# release
9185

92-
test:
86+
87+
test-29:
9388
strategy:
94-
matrix: ${{ fromJSON(needs.electron-versions.outputs.matrix) }}
89+
matrix:
90+
os: [windows-2022]
9591
runs-on: ${{ matrix.os }}
96-
needs: electron-versions
92+
needs: build-29
93+
9794
# fail-fast: false
9895

99-
name: test ${{ matrix.os }}-v${{ matrix.electron }}
96+
name: test ${{ matrix.os }}-v ${{needs.build-29.outputs.electron}}
10097
steps:
10198

10299
- name: Checkout code
@@ -105,7 +102,7 @@ jobs:
105102
- name: Test build
106103
uses: ./.github/actions/test-build
107104
with:
108-
electron: ${{ matrix.electron }}
105+
electron: ${{ needs.build-29.outputs.electron }}
109106
os: ${{ matrix.os }}
110107

111108

0 commit comments

Comments
 (0)