@@ -44,14 +44,12 @@ jobs:
44
44
arch : [x64, arm64]
45
45
runs-on : ubuntu-22.04 # < compile with oldest supported Ubuntu
46
46
steps :
47
- - name : Setup QEMU
48
- if : ${{ matrix.arch == 'arm64' }}
49
- uses : docker/setup-qemu-action@f30d974279f970cd3ed4ee3bcf1ff7795e271f00
47
+ - uses : actions/checkout@v4
48
+ - uses : ./.github/actions/setup-qemu
50
49
with :
51
- platforms : linux/arm64
50
+ arch : ${{ matrix.arch }}
52
51
- run : sudo apt-get update
53
52
- run : sudo apt-get install -y build-essential libglib2.0-dev libblkid-dev uuid-dev
54
- - uses : actions/checkout@v4
55
53
- uses : actions/setup-node@v4
56
54
with :
57
55
node-version : 18
@@ -71,17 +69,15 @@ jobs:
71
69
runs-on : ubuntu-24.04
72
70
steps :
73
71
- uses : actions/checkout@v4
74
- - uses : docker/setup-qemu-action@f30d974279f970cd3ed4ee3bcf1ff7795e271f00
75
- if : ${{ matrix.arch == 'arm64' }}
72
+ - uses : ./.github/actions/setup-qemu
76
73
with :
77
- platforms : linux/arm64
74
+ arch : ${{ matrix.arch }}
78
75
- run : |
79
76
docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch == 'x64' && 'amd64' || 'arm64' }} node:18-alpine -c "\
80
77
apk add build-base git python3 py3-setuptools util-linux-dev --update-cache && \
81
78
cd /tmp/project && \
82
79
npm ci && \
83
80
npm run prebuild"
84
-
85
81
- uses : actions/upload-artifact@v4
86
82
with :
87
83
name : prebuilds-linux-${{ matrix.arch }}-musl
@@ -118,17 +114,15 @@ jobs:
118
114
node-version : [18, 20, 22, 23]
119
115
runs-on : ${{ matrix.os }}
120
116
steps :
121
- - name : Setup QEMU
122
- if : ${{ matrix.arch == 'arm64' }}
123
- uses : docker/setup-qemu-action@f30d974279f970cd3ed4ee3bcf1ff7795e271f00
117
+ - uses : actions/checkout@v4
118
+ - uses : ./.github/actions/setup-qemu
124
119
with :
125
- platforms : linux/arm64
120
+ arch : ${{ matrix.arch }}
126
121
- run : sudo apt-get update
127
122
- run : sudo apt-get install -y libglib2.0-dev libblkid-dev uuid-dev
128
123
- uses : actions/setup-node@v4
129
124
with :
130
125
node-version : ${{ matrix.node-version }}
131
- - uses : actions/checkout@v4
132
126
- uses : actions/download-artifact@v4
133
127
with :
134
128
path : ./prebuilds
@@ -141,20 +135,18 @@ jobs:
141
135
strategy :
142
136
fail-fast : false
143
137
matrix :
144
- # my eyes can't discern arm64 from amd64
145
138
arch : [x64, arm64]
146
139
node-version : [18, 20, 22, 23]
147
140
runs-on : ubuntu-24.04
148
141
steps :
149
142
- uses : actions/checkout@v4
143
+ - uses : ./.github/actions/setup-qemu
144
+ with :
145
+ arch : ${{ matrix.arch }}
150
146
- uses : actions/download-artifact@v4
151
147
with :
152
148
path : ./prebuilds
153
149
merge-multiple : true
154
- - uses : docker/setup-qemu-action@f30d974279f970cd3ed4ee3bcf1ff7795e271f00
155
- if : ${{ matrix.arch == 'arm64' }}
156
- with :
157
- platforms : linux/arm64
158
150
- run : |
159
151
docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch == 'x64' && 'amd64' || 'arm64' }} node:${{ matrix.node-version }}-alpine -c "\
160
152
apk add util-linux-dev --update-cache && \
0 commit comments