Skip to content

Commit c12c103

Browse files
ci: fix build/release CI (#148)
* fix gyp * Install setuptools * remove unnecessary setup python * fix release * remove deprecated runners * add macos-13 * add node 20 and 21 * switch from setuptools to latest npm * add apt update * fix job name * remove npm latest * chore: add in musl prebuilds for node 20/21 --------- Co-authored-by: Vlad Frangu <[email protected]>
1 parent 814e500 commit c12c103

File tree

2 files changed

+52
-42
lines changed

2 files changed

+52
-42
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ on:
99
branches:
1010
- '**'
1111
jobs:
12-
build_x86_64:
13-
name: Build x86_64
12+
build_x86_64_legacy_nodejs:
13+
name: Build x86_64 (legacy Node.js)
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
os: [macos-10.15, macos-11, macos-12, ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, windows-2019]
19-
node: [12, 13, 14, 15, 16, 17]
18+
os: [macos-11, macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
19+
node: [12, 13, 14, 15, 16, 17, 19]
2020
steps:
2121
- name: Checkout repository
2222
uses: actions/checkout@v3
@@ -26,20 +26,25 @@ jobs:
2626
with:
2727
node-version: ${{ matrix.node }}
2828

29+
- name: Setup python
30+
uses: actions/setup-python@v4
31+
with:
32+
python-version: '3.8'
33+
2934
- name: Install dependencies
3035
run: npm install --build-from-source
3136

3237
- name: Package prebuild
3338
run: npm run build
3439

35-
build_x86_64_node_ge_18:
36-
name: Build x86_64 node >= 18
40+
build_x86_64:
41+
name: Build x86_64
3742
runs-on: ${{ matrix.os }}
3843
strategy:
3944
fail-fast: false
4045
matrix:
41-
os: [macos-10.15, macos-11, macos-12, ubuntu-20.04, ubuntu-22.04, windows-2019]
42-
node: [18, 19]
46+
os: [macos-11, macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
47+
node: [18, 20, 21]
4348
steps:
4449
- name: Checkout repository
4550
uses: actions/checkout@v3
@@ -56,14 +61,14 @@ jobs:
5661
run: npm run build
5762

5863
build_musl_x86_64:
59-
name: Build x86_64(musl)
64+
name: Build x86_64 (musl)
6065
runs-on: ubuntu-latest
6166
container:
6267
image: node:${{ matrix.node }}-alpine
6368
strategy:
6469
fail-fast: false
6570
matrix:
66-
node: [12, 13, 14, 15, 16, 17, 18, 19]
71+
node: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21]
6772
steps:
6873
- name: Setup env with Node v${{ matrix.node }}
6974
run: |
@@ -79,14 +84,14 @@ jobs:
7984
- name: Package prebuild
8085
run: npm run build
8186

82-
build_aarch64:
83-
name: Prebuild aarch64
87+
build_aarch64_legacy_nodejs:
88+
name: Prebuild aarch64 (legacy Node.js)
8489
runs-on: ${{ matrix.os }}
8590
strategy:
8691
fail-fast: false
8792
matrix:
88-
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
89-
node: [12, 13, 14, 15, 16, 17]
93+
os: [ubuntu-20.04, ubuntu-22.04]
94+
node: [12, 13, 14, 15, 16, 17, 19]
9095
steps:
9196
- name: Checkout repository
9297
uses: actions/checkout@v3
@@ -101,17 +106,17 @@ jobs:
101106

102107
- name: Package prebuild
103108
run: |
104-
sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
109+
sudo apt update -y && sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
105110
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ npx node-pre-gyp --target_arch=arm64 configure build package
106111
107-
build_aarch64_node_ge_18:
108-
name: Prebuild aarch64 node >= 18
112+
build_aarch64:
113+
name: Prebuild aarch64
109114
runs-on: ${{ matrix.os }}
110115
strategy:
111116
fail-fast: false
112117
matrix:
113118
os: [ubuntu-20.04, ubuntu-22.04]
114-
node: [18, 19]
119+
node: [18, 20, 21]
115120
steps:
116121
- name: Checkout repository
117122
uses: actions/checkout@v3
@@ -126,18 +131,18 @@ jobs:
126131

127132
- name: Package prebuild
128133
run: |
129-
sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
134+
sudo apt update -y && sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
130135
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ npx node-pre-gyp --target_arch=arm64 configure build package
131136
132137
build_musl_aarch64:
133-
name: Prebuild aarch64(musl)
138+
name: Prebuild aarch64 (musl)
134139
runs-on: ubuntu-latest
135140
container:
136141
image: node:${{ matrix.node }}-alpine
137142
strategy:
138143
fail-fast: false
139144
matrix:
140-
node: [12, 13, 14, 15, 16, 17, 18, 19]
145+
node: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21]
141146
steps:
142147
- name: Setup env with Node v${{ matrix.node }}
143148
run: |

.github/workflows/release.yml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ on:
33
release:
44
types: [published]
55
jobs:
6-
build_x86_64:
7-
name: Prebuild x86_64
6+
build_x86_64_legacy_nodejs:
7+
name: Prebuild x86_64 (legacy Node.js)
88
runs-on: ${{ matrix.os }}
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
os: [macos-10.15, macos-11, macos-12, ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, windows-2019]
13-
node: [12, 13, 14, 15, 16, 17]
12+
os: [macos-11, macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
13+
node: [12, 13, 14, 15, 16, 17, 19]
1414
steps:
1515
- name: Checkout repository
1616
uses: actions/checkout@v3
@@ -20,6 +20,11 @@ jobs:
2020
with:
2121
node-version: ${{ matrix.node }}
2222

23+
- name: Setup python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.8'
27+
2328
- name: Install dependencies
2429
run: npm install --build-from-source
2530

@@ -33,14 +38,14 @@ jobs:
3338
with:
3439
path: 'build/stage/**/*.tar.gz'
3540

36-
build_x86_64_node_ge_18:
37-
name: Build x86_64 node >= 18
41+
build_x86_64:
42+
name: Prebuild x86_64
3843
runs-on: ${{ matrix.os }}
3944
strategy:
4045
fail-fast: false
4146
matrix:
42-
os: [macos-10.15, macos-11, macos-12, ubuntu-20.04, ubuntu-22.04, windows-2019]
43-
node: [18, 19]
47+
os: [macos-11, macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
48+
node: [18, 20, 21]
4449
steps:
4550
- name: Checkout repository
4651
uses: actions/checkout@v3
@@ -64,14 +69,14 @@ jobs:
6469
path: 'build/stage/**/*.tar.gz'
6570

6671
build_musl_x86_64:
67-
name: Prebuild x86_64(musl)
72+
name: Prebuild x86_64 (musl)
6873
runs-on: ubuntu-latest
6974
container:
7075
image: node:${{ matrix.node }}-alpine
7176
strategy:
7277
fail-fast: false
7378
matrix:
74-
node: [12, 13, 14, 15, 16, 17, 18, 19]
79+
node: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21]
7580
steps:
7681
- name: Setup env with Node v${{ matrix.node }}
7782
run: |
@@ -94,14 +99,14 @@ jobs:
9499
with:
95100
path: 'build/stage/**/*.tar.gz'
96101

97-
build_aarch64:
98-
name: Prebuild aarch64
102+
build_aarch64_legacy_nodejs:
103+
name: Prebuild aarch64 (legacy Node.js)
99104
runs-on: ${{ matrix.os }}
100105
strategy:
101106
fail-fast: false
102107
matrix:
103-
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
104-
node: [12, 13, 14, 15, 16, 17]
108+
os: [ubuntu-20.04, ubuntu-22.04]
109+
node: [12, 13, 14, 15, 16, 17, 19]
105110
steps:
106111
- name: Checkout repository
107112
uses: actions/checkout@v3
@@ -116,7 +121,7 @@ jobs:
116121

117122
- name: Package prebuild
118123
run: |
119-
sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
124+
sudo apt update -y && sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
120125
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ npx node-pre-gyp --target_arch=arm64 configure build package
121126
122127
- name: Upload prebuild asset
@@ -126,14 +131,14 @@ jobs:
126131
with:
127132
path: 'build/stage/**/*.tar.gz'
128133

129-
build_aarch64_node_ge_18:
130-
name: Prebuild aarch64 node >= 18
134+
build_aarch64:
135+
name: Prebuild aarch64
131136
runs-on: ${{ matrix.os }}
132137
strategy:
133138
fail-fast: false
134139
matrix:
135140
os: [ubuntu-20.04, ubuntu-22.04]
136-
node: [18, 19]
141+
node: [18, 20, 21]
137142
steps:
138143
- name: Checkout repository
139144
uses: actions/checkout@v3
@@ -148,7 +153,7 @@ jobs:
148153

149154
- name: Package prebuild
150155
run: |
151-
sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
156+
sudo apt update -y && sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
152157
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ npx node-pre-gyp --target_arch=arm64 configure build package
153158
154159
- name: Upload prebuild asset
@@ -159,14 +164,14 @@ jobs:
159164
path: 'build/stage/**/*.tar.gz'
160165

161166
build_musl_aarch64:
162-
name: Prebuild aarch64(musl)
167+
name: Prebuild aarch64 (musl)
163168
runs-on: ubuntu-latest
164169
container:
165170
image: node:${{ matrix.node }}-alpine
166171
strategy:
167172
fail-fast: false
168173
matrix:
169-
node: [12, 13, 14, 15, 16, 17, 18, 19]
174+
node: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21]
170175
steps:
171176
- name: Setup env with Node v${{ matrix.node }}
172177
run: |

0 commit comments

Comments
 (0)