Skip to content

Commit bb39d31

Browse files
committed
add linux arm64 build
1 parent 63dd31f commit bb39d31

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

.github/workflows/rebuildElectron.yml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,41 @@ jobs:
1010
name: Rebuild docker
1111
strategy:
1212
fail-fast: false
13+
matrix:
14+
arch: [x64, arm64]
1315
runs-on: ubuntu-latest
1416
container: ubuntu:22.04
1517
steps:
1618
- name: Print Tag Ref
1719
run: echo ${{ github.ref }}
1820

19-
- name: Install Dependencies for Ubuntu
20-
run: apt update && apt install -y software-properties-common git wget build-essential clang python3 libkrb5-dev libc++-dev zlib1g-dev libssl-dev
21+
- name: Install Dependencies for Ubuntu (x64)
22+
if: matrix.arch == 'x64'
23+
run: |
24+
apt update
25+
apt install -y git curl python3 build-essential gcc g++
26+
27+
- name: Install Dependencies for Ubuntu (arm64)
28+
if: matrix.arch == 'arm64'
29+
run: |
30+
apt update
31+
32+
apt-get install -y git curl python3 build-essential
33+
34+
sed -i 's/^deb /deb [arch=amd64] /' /etc/apt/sources.list
35+
36+
dpkg --add-architecture arm64
37+
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse" > /etc/apt/sources.list.d/arm64-ports.list && \
38+
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse" >> /etc/apt/sources.list.d/arm64-ports.list && \
39+
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse" >> /etc/apt/sources.list.d/arm64-ports.list
40+
41+
apt-get update
42+
43+
apt install -y \
44+
libssl-dev libssl-dev:arm64 \
45+
libkrb5-dev libkrb5-dev:arm64 \
46+
libxml2 libxml2:arm64 \
47+
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
2148
env:
2249
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
2350

@@ -29,7 +56,6 @@ jobs:
2956
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
3057
with:
3158
node-version: 22
32-
architecture: ${{ matrix.arch }}
3359

3460
- run: git config --global --add safe.directory /__w/electron-npg-automator/electron-npg-automator
3561
- run: npm install
@@ -45,6 +71,7 @@ jobs:
4571
GYP_DEFINES: use_obsolete_asm=true
4672
electron_npg_automator_module: nodegit/nodegit
4773
electron_npg_automator_use_git_clone: true
74+
TARGET_ARCH: ${{ matrix.arch }}
4875
run: |
4976
node ci/build.js
5077
node ci/deploy.js

0 commit comments

Comments
 (0)