Skip to content

Commit 8e39878

Browse files
committed
Add Linux arm64 to CI pipeline
1 parent 07a05f3 commit 8e39878

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,15 @@ jobs:
155155

156156
linux:
157157
needs: lint
158-
runs-on: ubuntu-22.04-8-cores
158+
runs-on: ${{ matrix.os }}
159159
timeout-minutes: 30
160-
160+
strategy:
161+
matrix:
162+
include:
163+
- os: ubuntu-22.04-8-cores
164+
arch: x64
165+
- os: ubuntu-22.04-arm64-4-cores
166+
arch: arm64
161167
steps:
162168
- run: lsb_release -a
163169
- run: uname -a
@@ -187,6 +193,19 @@ jobs:
187193
# path: ${{ env.SCCACHE_PATH }}
188194
# key: sccache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml', 'patches/**') }}
189195

196+
# Needed because electron-builder's bundled FPM doesn't support arm64
197+
- name: Install FPM (for packaging)
198+
if: ${{ matrix.os == 'ubuntu-22.04-arm64-4-cores' }}
199+
run: sudo gem install fpm
200+
201+
- name: Setup sccache
202+
uses: mozilla-actions/[email protected]
203+
- name: Restore sccache
204+
uses: actions/cache@v4
205+
with:
206+
path: ${{ env.SCCACHE_PATH }}
207+
key: sccache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml', 'patches/**') }}
208+
190209
- name: Install Desktop node_modules
191210
run: pnpm install
192211
env:
@@ -213,6 +232,7 @@ jobs:
213232
# CXX: sccache g++
214233
# SCCACHE_GHA_ENABLED: "true"
215234
DISABLE_INSPECT_FUSE: on
235+
USE_SYSTEM_FPM: ${{ matrix.os == 'ubuntu-22.04-arm64-4-cores' && 'true' || '' }}
216236
- name: Build without packaging .deb file
217237
run: pnpm run build:release --linux dir
218238
if: github.ref != 'refs/heads/main'
@@ -221,10 +241,11 @@ jobs:
221241
# CXX: sccache g++
222242
# SCCACHE_GHA_ENABLED: "true"
223243
DISABLE_INSPECT_FUSE: on
244+
USE_SYSTEM_FPM: ${{ matrix.os == 'ubuntu-22.04-arm64-4-cores' && 'true' || '' }}
224245

225246
- name: Upload installer size
226247
if: ${{ github.repository == 'signalapp/Signal-Desktop-Private' && github.ref == 'refs/heads/main' }}
227-
run: node ts/scripts/dd-installer-size.js linux
248+
run: node ts/scripts/dd-installer-size.js linux-${{ matrix.arch }}
228249
env:
229250
DD_API_KEY: ${{ secrets.DATADOG_API_KEY }}
230251

ts/scripts/dd-installer-size.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import { join } from 'node:path';
77
import { name as NAME, version as VERSION } from '../../package.json';
88

99
const SUPPORT_CONFIG = new Set([
10-
'linux',
10+
'linux-x64',
11+
'linux-arm64',
1112
'windows',
1213
'macos-arm64',
1314
'macos-x64',

ts/scripts/test-release.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ if (process.platform === 'darwin') {
3131
} else if (process.platform === 'win32') {
3232
archive = join('win-unpacked', 'resources', 'app.asar');
3333
exe = join('win-unpacked', `${packageJson.productName}.exe`);
34+
} else if (process.platform === 'linux' && process.arch !== 'x64') {
35+
archive = join(`linux-${process.arch}-unpacked`, 'resources', 'app.asar');
36+
exe = join(`linux-${process.arch}-unpacked`, packageJson.name);
3437
} else if (process.platform === 'linux') {
3538
archive = join('linux-unpacked', 'resources', 'app.asar');
3639
exe = join('linux-unpacked', packageJson.name);

0 commit comments

Comments
 (0)