@@ -130,7 +130,7 @@ jobs:
130
130
131
131
# TODO: cross-compile on arm64
132
132
package :
133
- name : Linux x86-64 build
133
+ name : x86-64 builds
134
134
needs : build
135
135
runs-on : ${{ matrix.os }}
136
136
strategy :
@@ -174,6 +174,59 @@ jobs:
174
174
name : release-packages
175
175
path : ./release-packages
176
176
177
+ package-arm64 :
178
+ name : Linux ARM64 cross-compile build
179
+ needs : build
180
+ runs-on : ubuntu-16.04
181
+ env :
182
+ AR : aarch64-linux-gnu-ar
183
+ CC : aarch64-linux-gnu-gcc
184
+ CXX : aarch64-linux-gnu-g++
185
+ LINK : aarch64-linux-gnu-g++
186
+ NPM_CONFIG_ARCH : arm64
187
+
188
+ steps :
189
+ - uses : actions/checkout@v2
190
+
191
+ - name : Install node.js v12
192
+ uses : actions/setup-node@v2
193
+ with :
194
+ node-version : " 12"
195
+
196
+ - name : Install nfpm
197
+ run : |
198
+ curl -sfL https://install.goreleaser.com/github.com/goreleaser/nfpm.sh | sh -s -- -b ~/.local/bin v2.3.1
199
+ echo "$HOME/.local/bin" >> $GITHUB_PATH
200
+
201
+ - name : Install cross-compiler
202
+ run : sudo apt install g++-aarch64-linux-gnu
203
+
204
+ - name : Download npm package
205
+ uses : actions/download-artifact@v2
206
+ with :
207
+ name : npm-package
208
+
209
+ - name : Decompress npm package
210
+ run : tar -xzf package.tar.gz
211
+
212
+ - name : Build standalone release
213
+ run : yarn release:standalone
214
+
215
+ - name : Replace node with arm64 equivalent
216
+ run : |
217
+ wget https://nodejs.org/dist/v12.18.4/node-v12.18.4-linux-arm64.tar.gz
218
+ tar -xzf node-v12.18.4-linux-arm64.tar.gz node-v12.18.4-linux-arm64/bin/node --strip-components=2
219
+ mv ./node ./release-standalone/lib/node
220
+
221
+ - name : Build packages with nfpm
222
+ run : yarn package arm64
223
+
224
+ - name : Upload release artifacts
225
+ uses : actions/upload-artifact@v2
226
+ with :
227
+ name : release-packages
228
+ path : ./release-packages
229
+
177
230
test-e2e :
178
231
name : End-to-end tests
179
232
needs : package
0 commit comments