@@ -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 software-properties-common git wget build-essential clang python3 libkrb5-dev libc++-dev zlib1g-dev libssl-dev
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
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
@@ -39,12 +65,13 @@ jobs:
3965 node_pre_gyp_bucket : ${{ secrets.node_pre_gyp_bucket }}
4066 AWS_ACCESS_KEY_ID : ${{ secrets.node_pre_gyp_accessKeyId }}
4167 AWS_SECRET_ACCESS_KEY : ${{ secrets.node_pre_gyp_secretAccessKey }}
42- CC : clang
43- CXX : clang++
44- npm_config_clang : 1
68+ CC : ${{ matrix.arch == 'x64' && ' clang' || 'aarch64-linux-gnu-gcc' }}
69+ CXX : ${{ matrix.arch == 'x64' && ' clang++' || 'aarch64-linux-gnu-g++' }}
70+ npm_config_clang : ${{ matrix.arch == 'x64' && '1' || '0' }}
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