Add experimental support for building Linux ARM64

Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
ayumi-signal 2026-05-13 10:21:25 -07:00 committed by GitHub
parent 00e5282361
commit 0ea3b1bbc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 29 additions and 6 deletions

View File

@ -525,7 +525,10 @@
},
"artifactName": "${name}_${version}_${arch}.${ext}",
"target": [
"deb"
{
"target": "deb",
"arch": "x64"
}
],
"icon": "build/icons/png",
"publish": [

View File

@ -7,7 +7,8 @@
# Env vars:
# SOURCE_DATE_EPOCH: Build timestamp override. Defaults to latest git commit or 1.
# SKIP_DOCKER_BUILD: To support docker build cache during actions.
# BUILD_TARGETS: Override build targets. Empty default results in deb.
# BUILD_TARGETS: Override build targets. Empty default results in deb. Comma separated list.
# BUILD_ARCH: Override build architectures. Empty default results in x64. Comma separated list.
# Examples:
# ./build.sh public
@ -54,4 +55,5 @@ docker run --rm \
-e PNPM_HOME=/tmp/.pnpm-home \
-e SOURCE_DATE_EPOCH=$source_date_epoch \
-e BUILD_TARGETS=$BUILD_TARGETS \
-e BUILD_ARCH=$BUILD_ARCH \
signal-desktop $1

View File

@ -66,8 +66,8 @@ else
exit 1
fi
if [ "${BUILD_TARGETS}" != "" ]; then
pnpm run prepare-linux-build $BUILD_TARGETS
if [ "${BUILD_TARGETS}" != "" ] || [ "${BUILD_ARCH}" != "" ]; then
pnpm run prepare-linux-build "$BUILD_TARGETS" "$BUILD_ARCH"
fi
pnpm run build-linux

View File

@ -6,8 +6,9 @@ import _ from 'lodash';
import packageJson from '../package.json' with { type: 'json' };
const TARGETS = new Set(['appimage', 'deb']);
const ARCHITECTURES = new Set(['arm64', 'x64']);
const targets = (process.argv[2] || '').split(',');
const targets = (process.argv[2] || 'deb').split(',');
if (
targets.length === 0 ||
!targets.every(target => TARGETS.has(target.toLowerCase()))
@ -18,11 +19,24 @@ if (
process.exit(1);
}
const archs = (process.argv[3] || 'x64').split(',');
if (
archs.length === 0 ||
!archs.every(arch => ARCHITECTURES.has(arch.toLowerCase()))
) {
console.error(
`Invalid linux architectures ${archs.join(', ')}. Valid options: ${[...ARCHITECTURES].join(', ')}`
);
process.exit(1);
}
console.log('prepare_linux_build: updating package.json');
// ------
_.set(packageJson, 'build.linux.target', targets);
const targetsWithArch = _.map(targets, target => ({ target, arch: archs }));
_.set(packageJson, 'build.linux.target', targetsWithArch);
// -------

View File

@ -997,6 +997,10 @@ function getUpdatesFileName(): string {
}
if (process.platform === 'linux') {
if (process.arch === 'arm64') {
return `${prefix}-linux-arm64.yml`;
}
return `${prefix}-linux.yml`;
}