feat(tauri): build arm64 Linux desktop bundles

This commit is contained in:
Erwan Leboucher committed 2026-08-15 18:00:59 +02:00
1 parent 0a0b0ad599
commit ba242c9bf5
5 files changed
+45 -22

No files matched your search

+1 -1
View File
@@ -49,7 +49,7 @@ for (const sig of readdirSync(dir).filter((f) => f.endsWith('.sig'))) {
platforms['darwin-aarch64'] = entry;
platforms['darwin-x86_64'] = entry;
} else if (name.endsWith('.appimage')) {
platforms['linux-x86_64'] = entry;
platforms[name.includes('-linux-aarch64') ? 'linux-aarch64' : 'linux-x86_64'] = entry;
} else if (name.endsWith('-setup.exe') || name.endsWith('.nsis.zip')) {
platforms['windows-x86_64'] = entry;
windowsIsNsis = true;
+21 -11
View File
@@ -614,16 +614,25 @@ jobs:
# Nightlies use `--snapshot`, which packages without publishing.
linux:
name: Build Linux (CEF)
name: Build Linux ${{ matrix.arch }} (CEF)
needs: setup-release
runs-on: ubuntu-22.04
timeout-minutes: 60
runs-on: ${{ matrix.runner }}
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
runner: ubuntu-22.04
- arch: aarch64
runner: ubuntu-22.04-arm
permissions:
contents: write
id-token: write
attestations: write
artifact-metadata: write
env:
ARCH: ${{ matrix.arch }}
TAG: ${{ needs.setup-release.outputs.tag }}
VERSION: ${{ needs.setup-release.outputs.version }}
VITE_APP_VERSION: ${{ needs.setup-release.outputs.version }}
@@ -652,6 +661,7 @@ jobs:
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
workspaces: src-tauri
key: ${{ matrix.arch }}
- name: Stamp release version into tauri.conf.json
shell: bash
@@ -673,7 +683,7 @@ jobs:
src-tauri/target/release/sable "$DISPLAY_NAME" \
src-tauri/target/release/sable-updater
DEB="src-tauri/target/release/bundle/deb/Sable-${VERSION}-linux-x86_64.deb"
DEB="src-tauri/target/release/bundle/deb/Sable-${VERSION}-linux-${ARCH}.deb"
dpkg-deb --contents "$DEB" | grep 'etc/apparmor.d/sable$' >/dev/null
dpkg-deb --ctrl-tarfile "$DEB" | tar -t | grep -x './postinst' >/dev/null
dpkg-deb --ctrl-tarfile "$DEB" | tar -t | grep -x './prerm' >/dev/null
@@ -685,14 +695,14 @@ jobs:
src-tauri/target/release/cef-pkg/stage/share "$RELEASE_DIR/"
test -f "$RELEASE_DIR/runtime/CEF-LICENSE.txt"
tar -C "$RELEASE_DIR" -czf \
"src-tauri/target/release/bundle/Sable-${VERSION}-linux-x86_64.tar.gz" \
"src-tauri/target/release/bundle/Sable-${VERSION}-linux-${ARCH}.tar.gz" \
sable runtime share
- name: Sign the AppImage for the updater
if: ${{ env.TAURI_SIGNING_PRIVATE_KEY != '' }}
shell: bash
run: |
for f in src-tauri/target/release/bundle/appimage/Sable-*-linux-x86_64.AppImage; do
for f in src-tauri/target/release/bundle/appimage/Sable-*-linux-${ARCH}.AppImage; do
[ -e "$f" ] || continue
pnpm tauri signer sign "$f"
done
@@ -714,9 +724,9 @@ jobs:
run: |
for f in src-tauri/target/release/bundle/deb/Sable-*.deb \
src-tauri/target/release/bundle/rpm/Sable-*.rpm \
src-tauri/target/release/bundle/Sable-*-linux-x86_64.tar.gz \
src-tauri/target/release/bundle/appimage/Sable-*-linux-x86_64.AppImage \
src-tauri/target/release/bundle/appimage/Sable-*-linux-x86_64.AppImage.sig; do
src-tauri/target/release/bundle/Sable-*-linux-${ARCH}.tar.gz \
src-tauri/target/release/bundle/appimage/Sable-*-linux-${ARCH}.AppImage \
src-tauri/target/release/bundle/appimage/Sable-*-linux-${ARCH}.AppImage.sig; do
[ -e "$f" ] || continue
echo "Uploading $f"
gh release upload "$TAG" "$f" --clobber
@@ -725,7 +735,7 @@ jobs:
- name: Upload .deb as workflow artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: sable-linux-deb
name: sable-linux-deb-${{ matrix.arch }}
path: src-tauri/target/release/bundle/deb/Sable-*.deb
if-no-files-found: error
retention-days: 1
@@ -750,7 +760,7 @@ jobs:
- name: Download .deb artifact and compute checksum
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: sable-linux-deb
name: sable-linux-deb-x86_64
path: deb-artifact
- name: Compute checksum
+1 -1
View File
@@ -1,7 +1,7 @@
# yaml-language-server: $schema=https://nfpm.goreleaser.com/schema.json
name: sable
arch: amd64
arch: ${PKG_ARCH}
platform: linux
version: ${PKG_VERSION}
release: ${PKG_RELEASE}
+8 -2
View File
@@ -12,13 +12,19 @@ PROFILE="${1:-debug}"
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
DEST="${2:-$ROOT/src-tauri/target/$PROFILE}"
case "$(uname -m)" in
x86_64) CEF_ARCH=x86_64 ;;
aarch64 | arm64) CEF_ARCH=aarch64 ;;
*) echo "❌ unsupported architecture: $(uname -m)" >&2; exit 1 ;;
esac
# --target moves build-script output under target/<triple>/.
CEF_DIR="$(
find "$ROOT/src-tauri/target" -type d -name cef_linux_x86_64 \
find "$ROOT/src-tauri/target" -type d -name "cef_linux_$CEF_ARCH" \
-path "*/$PROFILE/build/*" -print -quit 2>/dev/null || true
)"
if [ -z "$CEF_DIR" ]; then
echo "❌ CEF dist not found under target/**/$PROFILE/build — build with --features cef first." >&2
echo "❌ cef_linux_$CEF_ARCH not found under target/**/$PROFILE/build — build with --features cef first." >&2
exit 1
fi
+14 -7
View File
@@ -19,6 +19,13 @@ if [[ "$VERSION" == *-* ]]; then
RPM_ITERATION="0.${PRERELEASE}"
fi
# ARCH is read by appimagetool.
case "$(uname -m)" in
x86_64) export ARCH=x86_64; NFPM_ARCH=amd64 ;;
aarch64 | arm64) export ARCH=aarch64; NFPM_ARCH=arm64 ;;
*) echo "unsupported architecture: $(uname -m)" >&2; exit 1 ;;
esac
STAGE="$ROOT/src-tauri/target/release"
OUT="$STAGE/bundle"
WORK="$STAGE/cef-pkg"
@@ -28,7 +35,7 @@ DISPLAY_NAME="${3:-}"
APPIMAGE_BIN_PATH="${4:-}"
if [ -z "$BIN_PATH" ]; then
for candidate in "$STAGE/Sable Nightly" "$STAGE/Sable" "$STAGE/sable" \
"$ROOT/src-tauri/target/x86_64-unknown-linux-gnu/release/sable"; do
"$ROOT/src-tauri/target/$ARCH-unknown-linux-gnu/release/sable"; do
[ -x "$candidate" ] || continue
BIN_PATH="$candidate"
break
@@ -111,10 +118,10 @@ EOF
chmod 755 "$PKGROOT/usr/bin/sable"
cp -a "$WORK/stage/share/." "$PKGROOT/usr/share/"
PKGROOT="$PKGROOT" PKG_VERSION="$DEB_VERSION" PKG_RELEASE=1 nfpm pkg -f nfpm.yaml -p deb \
-t "$OUT/deb/Sable-${VERSION}-linux-x86_64.deb"
PKGROOT="$PKGROOT" PKG_VERSION="$RPM_VERSION" PKG_RELEASE="$RPM_ITERATION" nfpm pkg -f nfpm.yaml -p rpm \
-t "$OUT/rpm/Sable-${VERSION}-linux-x86_64.rpm"
PKGROOT="$PKGROOT" PKG_ARCH="$NFPM_ARCH" PKG_VERSION="$DEB_VERSION" PKG_RELEASE=1 nfpm pkg -f nfpm.yaml -p deb \
-t "$OUT/deb/Sable-${VERSION}-linux-${ARCH}.deb"
PKGROOT="$PKGROOT" PKG_ARCH="$NFPM_ARCH" PKG_VERSION="$RPM_VERSION" PKG_RELEASE="$RPM_ITERATION" nfpm pkg -f nfpm.yaml -p rpm \
-t "$OUT/rpm/Sable-${VERSION}-linux-${ARCH}.rpm"
else
echo "nfpm not found" >&2
exit 1
@@ -130,7 +137,7 @@ exec "$HERE/usr/bin/sable" "$@"
EOF
chmod 755 "$APPDIR/AppRun"
APPIMAGE_EXTRACT_AND_RUN=1 ARCH=x86_64 "$APPIMAGETOOL_CMD" "$APPDIR" \
"$OUT/appimage/Sable-${VERSION}-linux-x86_64.AppImage"
APPIMAGE_EXTRACT_AND_RUN=1 "$APPIMAGETOOL_CMD" "$APPDIR" \
"$OUT/appimage/Sable-${VERSION}-linux-${ARCH}.AppImage"
echo "Packages in: $OUT"