Skip to content

Commit 42b3b14

Browse files
committed
feat: update GHA workflow with separate runner for arm64
1 parent 5e16653 commit 42b3b14

1 file changed

Lines changed: 35 additions & 8 deletions

File tree

.github/workflows/build-mainnet.yml

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@ on:
66
- master
77

88
jobs:
9-
build-and-deploy:
10-
name: Build and deploy
11-
runs-on: ubuntu-latest
12-
env:
13-
SSH_PORT: ${{ secrets.FILESERVER_SSH_PORT != '' && secrets.FILESERVER_SSH_PORT || '22' }}
9+
build:
10+
name: Build ${{ matrix.arch }}
11+
runs-on: ${{ matrix.runner }}
12+
strategy:
13+
matrix:
14+
include:
15+
- arch: x64
16+
runner: ubuntu-latest
17+
targets: node18-linux-x64,node18-macos-x64,node18-win-x64
18+
- arch: arm64
19+
runner: ubuntu-24.04-arm
20+
targets: node18-linux-arm64,node18-macos-arm64,node18-win-arm64
1421
steps:
1522
- name: Checkout code
1623
uses: actions/checkout@v4
@@ -28,14 +35,34 @@ jobs:
2835
run: npm run mainnet:build:src
2936

3037
- name: Build binaries
31-
run: |
32-
targets="node18-linux-x64,node18-linux-arm64,node18-macos-x64,node18-macos-arm64,node18-win-x64,node18-win-arm64"
33-
npx pkg out/src/main-mainnet.js -t $targets --output bin/edge
38+
run: npx pkg out/src/main-mainnet.js -t ${{ matrix.targets }} --output bin/edge
39+
40+
- name: Upload artifacts
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: binaries-${{ matrix.arch }}
44+
path: bin/
45+
46+
deploy:
47+
name: Deploy
48+
needs: build
49+
runs-on: ubuntu-latest
50+
env:
51+
SSH_PORT: ${{ secrets.FILESERVER_SSH_PORT != '' && secrets.FILESERVER_SSH_PORT || '22' }}
52+
steps:
53+
- name: Checkout code
54+
uses: actions/checkout@v4
3455

3556
- name: Get version
3657
id: version
3758
run: echo "version=$(node -p 'require("./package.json").version')" >> "$GITHUB_OUTPUT"
3859

60+
- name: Download all artifacts
61+
uses: actions/download-artifact@v4
62+
with:
63+
path: bin/
64+
merge-multiple: true
65+
3966
- name: Prepare artifacts
4067
env:
4168
VERSION: ${{ steps.version.outputs.version }}

0 commit comments

Comments
 (0)