Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
desktop: publish a native arm64 linux deb (#11356)
Maheswar Kumarad16046ce933
diff --git a/.github/workflows/desktop-app-clean-machine-ci.yml b/.github/workflows/desktop-app-clean-machine-ci.ymlindex b7f64a3b46e..3f8290a0463 100644--- a/.github/workflows/desktop-app-clean-machine-ci.yml+++ b/.github/workflows/desktop-app-clean-machine-ci.yml@@ -346,16 +346,17 @@ jobs:linux:# See the macOS job: a fork PR's token cannot list drafts, so skip rather than fail.if: github.event.pull_request.head.repo.fork != true- name: desktop linux ${{ matrix.kind }}- runs-on: ubuntu-22.04+ name: desktop linux ${{ matrix.kind }} ${{ matrix.arch }}+ runs-on: ${{ matrix.os }}timeout-minutes: 45continue-on-error: ${{ matrix.experimental }}strategy:fail-fast: falsematrix:include:- - {kind: deb, experimental: false}- - {kind: appimage, experimental: false}+ - {kind: deb, arch: x64, os: ubuntu-22.04, asset: Ubuntu.deb, experimental: false}+ - {kind: deb, arch: arm64, os: ubuntu-24.04-arm, asset: Ubuntu-ARM64.deb, experimental: false}+ - {kind: appimage, arch: x64, os: ubuntu-22.04, asset: Linux.AppImage, experimental: false}steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1@@ -363,16 +364,13 @@ jobs:persist-credentials: false- name: Download the shipped bundle+ id: downloadenv:GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}run: |mkdir -p dl logs- asset_suffix='.deb'- pat='*.deb'- if [ "${{ matrix.kind }}" = "appimage" ]; then- asset_suffix='.AppImage'- pat='*.AppImage'- fi+ asset_suffix='${{ matrix.asset }}'+ pat="*$asset_suffix"# See the macOS job. Loud on purpose: no matching bundle means nothing to prove.if [ -z "$REL_TAG" ]; thenreleases_json="$RUNNER_TEMP/desktop-releases.json"@@ -381,8 +379,15 @@ jobs:echo "::error::could not list desktop releases in $REL_REPO"exit 1fi- if ! REL_TAG="$(python3 .github/scripts/resolve-desktop-release.py \- --repo "$REL_REPO" --asset-suffix "$asset_suffix" < "$releases_json")"; then+ resolver_rc=0+ REL_TAG="$(python3 .github/scripts/resolve-desktop-release.py \+ --repo "$REL_REPO" --asset-suffix "$asset_suffix" < "$releases_json")" || resolver_rc=$?+ if [ "$resolver_rc" -ne 0 ]; then+ if [ "$resolver_rc" -eq 1 ] && [ "$asset_suffix" = 'Ubuntu-ARM64.deb' ]; then+ echo "::notice::no ARM64 release is available; package checks skipped"+ echo "unreleased=true" >> "$GITHUB_OUTPUT"+ exit 0+ fiecho "::error::no SemVer v... release with a $asset_suffix asset is visible in $REL_REPO"exit 1fi@@ -399,13 +404,14 @@ jobs:# maintainer scripts, so installing first let them see the image's toolchain. That# install needs no masked tool -- clean-machine-env.sh moves aside only $TOOLS, and# the current bundle ships a postrm and no install-time script.- if: ${{ github.event_name != 'workflow_dispatch' || inputs.strip_toolchain }}+ if: ${{ steps.download.outputs.unreleased != 'true' && (github.event_name != 'workflow_dispatch' || inputs.strip_toolchain) }}run: |bash .github/scripts/clean-machine-env.sh mask --removeset -a; . ./clean-machine.env; set +abash .github/scripts/clean-machine-assert.sh absent- name: Install with NO dev tooling, only runtime libs+ if: steps.download.outputs.unreleased != 'true'# The apt preamble below is bounded by the shared helper; the `.deb` install# after it deliberately is not, because whether that package resolves its own# dependencies is the question this job asks. A step budget bounds it anyway,@@ -481,7 +487,7 @@ jobs:# that adds git, cmake or a compiler to that list puts one back in /usr/bin after the# strip. Re-run `absent` here, before the bundled installer.- name: Re-assert the toolchain is still absent after the package install- if: ${{ github.event_name != 'workflow_dispatch' || inputs.strip_toolchain }}+ if: ${{ steps.download.outputs.unreleased != 'true' && (github.event_name != 'workflow_dispatch' || inputs.strip_toolchain) }}run: |set -a; . ./clean-machine.env; set +abash .github/scripts/clean-machine-assert.sh absent@@ -499,6 +505,7 @@ jobs:fi- name: Run the bundled installer, the path first launch takes+ if: steps.download.outputs.unreleased != 'true'run: |set -a; [ -f ./clean-machine.env ] && . ./clean-machine.env; set +aset -o pipefail@@ -537,6 +544,7 @@ jobs:"$PY" -c "import torch; print('torch', torch.__version__)"- name: Launch under Xvfb and prove it stays up+ if: steps.download.outputs.unreleased != 'true'env:# Without this a fatal X11 error is completely invisible. GTK3 registers# gdk_x_io_error() as its XSetIOErrorHandler, and that handler reports with@@ -575,7 +583,7 @@ jobs:fi- name: What did its own log say?- if: always()+ if: always() && steps.download.outputs.unreleased != 'true'run: |for f in "$UNSLOTH_STUDIO_HOME/tauri.log" "$HOME/.unsloth/studio/tauri.log"; do[ -f "$f" ] || continue@@ -625,7 +633,7 @@ jobs:if: always()uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1with:- name: desktop-linux-${{ matrix.kind }}+ name: desktop-linux-${{ matrix.kind }}-${{ matrix.arch }}path: logs/retention-days: 7if-no-files-found: warndiff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.ymlindex 12c65728740..488d3c08ade 100644--- a/.github/workflows/release-desktop.yml+++ b/.github/workflows/release-desktop.yml@@ -40,7 +40,8 @@ env:**macOS**: Download `Unsloth-Desktop-MacOS.dmg` (Apple Silicon).**Windows**: Download `Unsloth-Desktop-Windows.exe`, or `Unsloth-Desktop-Windows-ARM64.exe` on a Windows on ARM machine.- **Linux**: Download `Unsloth-Desktop-Ubuntu.deb` for Ubuntu/Debian. `.AppImage` is experimental.+ **Linux x64**: Download `Unsloth-Desktop-Ubuntu.deb` for Ubuntu/Debian. `.AppImage` is experimental.+ **Linux ARM64**: Download `Unsloth-Desktop-Ubuntu-ARM64.deb` for Ubuntu 24.04 or newer on aarch64, such as a DGX Spark. `Unsloth-Desktop-ARM64.app.tar.gz` is macOS-only.> Linux in-app updates cover `.deb` and AppImage installs. A `.deb` installed before in-app updates shipped needs one manual update first.> Linux AppImage can show a blank window on some Tauri/WebKitGTK + Wayland/Mesa stacks; use `.deb` when available.@@ -500,6 +501,10 @@ jobs:args: ''label: Linux (x64)artifact: linux-x64+ - platform: ubuntu-24.04-arm+ args: ''+ label: Linux (ARM64)+ artifact: linux-arm64- platform: windows-latestargs: ''label: Windows (x64)@@ -566,7 +571,7 @@ jobs:# ── Linux dependencies ──- name: Install Linux dependencies- if: matrix.platform == 'ubuntu-22.04'+ if: startsWith(matrix.artifact, 'linux-')# Bounded and retried through the shared helper: an unbounded apt step does# not fail, it spends the job's whole budget and is reported as "cancelled"# with no reason and every later step skipped. update and install go as one@@ -973,6 +978,18 @@ jobs:tauriScript: npx --prefix . tauriargs: -v --bundles deb,appimage+ - name: Build Linux ARM64 package+ id: build_linux_arm64+ if: matrix.platform == 'ubuntu-24.04-arm'+ uses: tauri-apps/tauri-action@84b9d35b5fc46c1e45415bdb6144030364f7ebc5+ env:+ TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}+ TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ''+ with:+ projectPath: studio+ tauriScript: npx --prefix . tauri+ args: -v --bundles deb+- name: Verify complete Linux AppImageif: matrix.platform == 'ubuntu-22.04'shell: bash@@ -1624,7 +1641,7 @@ jobs:- name: Stage release assetsshell: bashenv:- ARTIFACT_PATHS: ${{ steps.build_linux.outputs.artifactPaths || steps.build_macos.outputs.artifactPaths || steps.build_windows.outputs.artifactPaths }}+ ARTIFACT_PATHS: ${{ steps.build_linux.outputs.artifactPaths || steps.build_linux_arm64.outputs.artifactPaths || steps.build_macos.outputs.artifactPaths || steps.build_windows.outputs.artifactPaths }}# Both Windows legs emit a -setup.exe, and publish-release merges every# leg's artifact into one directory, so the two must not stage the same# name. x64 keeps the historical name; anything else would break every@@ -1660,6 +1677,15 @@ jobs:if os.environ.get('MATRIX_ARTIFACT') == 'windows-arm64'else f'{base_name}-Windows')+ # Both Linux legs bundle a deb and, since in-app Debian updates, its updater+ # signature. publish-release merges every leg's artifact into one directory, so+ # staging the arm64 pair under the x64 names would silently overwrite one with+ # the other and hand x64 users the wrong signature.+ deb_base = (+ f'{base_name}-Ubuntu-ARM64'+ if os.environ.get('MATRIX_ARTIFACT') == 'linux-arm64'+ else f'{base_name}-Ubuntu'+ )suffix_names = (('.app.tar.gz.sig', f'{base_name}-ARM64.app.tar.gz.sig'),('.app.tar.gz', f'{base_name}-ARM64.app.tar.gz'),@@ -1668,8 +1694,8 @@ jobs:('-setup.exe.sig', f'{windows_name}.exe.sig'),('-setup.exe', f'{windows_name}.exe'),('.dmg', f'{base_name}-MacOS.dmg'),- ('.deb.sig', f'{base_name}-Ubuntu.deb.sig'),- ('.deb', f'{base_name}-Ubuntu.deb'),+ ('.deb.sig', f'{deb_base}.deb.sig'),+ ('.deb', f'{deb_base}.deb'),)staged = []for raw_path in artifact_paths:@@ -1742,8 +1768,8 @@ jobs:run: |set -uo pipefail- # The three matrix legs, by their `name:` (Build <matrix.label>).- LEGS=('Build macOS (Apple Silicon)' 'Build Linux (x64)' 'Build Windows (x64)' 'Build Windows (ARM64)')+ # publishing requires every named matrix leg to finish successfully.+ LEGS=('Build macOS (Apple Silicon)' 'Build Linux (x64)' 'Build Linux (ARM64)' 'Build Windows (x64)' 'Build Windows (ARM64)')POLL=30DEADLINE=$(( $(date +%s) + 75 * 60 ))# Matrix job records appear with the run, so a leg still missing well@@ -1839,6 +1865,8 @@ jobs:f'{base_name}-Linux.AppImage.sig',f'{base_name}-Ubuntu.deb',f'{base_name}-Ubuntu.deb.sig',+ f'{base_name}-Ubuntu-ARM64.deb',+ f'{base_name}-Ubuntu-ARM64.deb.sig',f'{base_name}-Windows.exe',f'{base_name}-Windows.exe.sig',f'{base_name}-Windows-ARM64.exe',@@ -1958,7 +1986,10 @@ jobs:darwin = entry('.app.tar.gz.sig')linux = entry('.AppImage.sig')- debian = entry('.deb.sig')+ # Same full-name rule as the Windows pair below: both debs end in .deb.sig, and+ # -Ubuntu.deb.sig does not match -Ubuntu-ARM64.deb.sig under endswith.+ debian = entry('-Ubuntu.deb.sig')+ debian_arm64 = entry('-Ubuntu-ARM64.deb.sig')# Both Windows bundles end in .exe.sig, and exactly_one() refuses an ambiguous# match, so name them in full. -Windows.exe.sig does not match -Windows-ARM64.exe.sig# under endswith, which is what keeps the two entries distinct.@@ -1977,6 +2008,11 @@ jobs:'linux-x86_64': linux,'linux-x86_64-appimage': linux,'linux-x86_64-deb': debian,+ # Same reason as the Windows ARM64 pair: without these an arm64 deb+ # install finds no entry and never updates, or matches the x86_64 one+ # and installs an amd64 package over a native install.+ 'linux-aarch64': debian_arm64,+ 'linux-aarch64-deb': debian_arm64,'windows-x86_64': windows,'windows-x86_64-nsis': windows,# Tauri asks for {os}-{arch}; without these an ARM64 install either@@ -2074,6 +2110,7 @@ jobs:required_families = {'darwin-aarch64': False,'linux-x86_64': False,+ 'linux-aarch64': False,'windows-x86_64': False,'windows-aarch64': False,}@@ -2199,6 +2236,7 @@ jobs:'Unsloth-Desktop-MacOS.dmg','Unsloth-Desktop-Linux.AppImage','Unsloth-Desktop-Ubuntu.deb',+ 'Unsloth-Desktop-Ubuntu-ARM64.deb','Unsloth-Desktop-Windows.exe','Unsloth-Desktop-Windows-ARM64.exe',}diff --git a/README.md b/README.mdindex 14cd2c40d1a..c1bdd917571 100644--- a/README.md+++ b/README.md@@ -38,11 +38,15 @@ Download the native Unsloth Desktop app for your operating system:<td><a href='https://github.com/unslothai/unsloth/releases/latest/download/Unsloth-Desktop-MacOS.dmg'>Download</a></td></tr><tr>- <td><b>Linux / Ubuntu (deb)</b></td>+ <td><b>Linux x64 / Ubuntu (deb)</b></td><td><a href='https://github.com/unslothai/unsloth/releases/latest/download/Unsloth-Desktop-Ubuntu.deb'>Download</a></td></tr><tr>- <td><b>Linux (AppImage)</b></td>+ <td><b>Linux ARM64 / Ubuntu 24.04+ (deb)</b></td>+ <td><a href='https://github.com/unslothai/unsloth/releases/latest/download/Unsloth-Desktop-Ubuntu-ARM64.deb'>Download</a></td>+ </tr>+ <tr>+ <td><b>Linux x64 (AppImage)</b></td><td><a href='https://github.com/unslothai/unsloth/releases/latest/download/Unsloth-Desktop-Linux.AppImage'>Download</a></td></tr></table>@@ -123,11 +127,15 @@ Unsloth can be used in three ways: **[Unsloth Desktop](https://unsloth.ai/downlo<td><a href='https://github.com/unslothai/unsloth/releases/latest/download/Unsloth-Desktop-MacOS.dmg'>Download</a></td></tr><tr>- <td><b>Linux / Ubuntu (deb)</b></td>+ <td><b>Linux x64 / Ubuntu (deb)</b></td><td><a href='https://github.com/unslothai/unsloth/releases/latest/download/Unsloth-Desktop-Ubuntu.deb'>Download</a></td></tr><tr>- <td><b>Linux (AppImage)</b></td>+ <td><b>Linux ARM64 / Ubuntu 24.04+ (deb)</b></td>+ <td><a href='https://github.com/unslothai/unsloth/releases/latest/download/Unsloth-Desktop-Ubuntu-ARM64.deb'>Download</a></td>+ </tr>+ <tr>+ <td><b>Linux x64 (AppImage)</b></td><td><a href='https://github.com/unslothai/unsloth/releases/latest/download/Unsloth-Desktop-Linux.AppImage'>Download</a></td></tr><tr>diff --git a/tests/security/test_desktop_release_resolver.py b/tests/security/test_desktop_release_resolver.pyindex 397fd1045cd..49bf345734f 100644--- a/tests/security/test_desktop_release_resolver.py+++ b/tests/security/test_desktop_release_resolver.py@@ -5,8 +5,13 @@from __future__ import annotationsimport importlib.util+import os+import subprocessfrom pathlib import Path+import pytest+import yaml+REPO_ROOT = Path(__file__).resolve().parents[2]SCRIPT = REPO_ROOT / ".github" / "scripts" / "resolve-desktop-release.py"@@ -98,3 +103,74 @@ def test_the_resolver_keeps_looking_past_a_release_without_the_asset():assert _module().resolve_newest(releases, ".dmg", fetch) == "v0.1.528-beta"assert looked_up == ["v0.1.529-beta", "v0.1.528-beta"]+++ "suffix,mode,tag,returncode,unreleased",+ [+ ("Ubuntu-ARM64.deb", "absent", "", 0, True),+ ("Ubuntu.deb", "absent", "", 1, False),+ ("Linux.AppImage", "absent", "", 1, False),+ ("Ubuntu-ARM64.deb", "list-error", "", 1, False),+ ("Ubuntu-ARM64.deb", "view-error", "", 1, False),+ ("Ubuntu-ARM64.deb", "present", "", 0, False),+ ("Ubuntu-ARM64.deb", "absent", "v0.1.811-beta", 1, False),+ ("Ubuntu-ARM64.deb", "present", "v0.1.811-beta", 0, False),+ ],+)+def test_linux_download_skips_only_unreleased_arm64(+ tmp_path, suffix, mode, tag, returncode, unreleased+):+ workflow = yaml.safe_load(WORKFLOW.read_text())+ download = next(+ step+ for step in workflow["jobs"]["linux"]["steps"]+ if step.get("name") == "Download the shipped bundle"+ )+ script = tmp_path / ".github/scripts/resolve-desktop-release.py"+ script.parent.mkdir(parents = True)+ script.write_text(SCRIPT.read_text())+ fake_bin = tmp_path / "bin"+ fake_bin.mkdir()+ gh = fake_bin / "gh"+ gh.write_text("""#!/bin/sh+set -eu+case "$2" in+ list)+ [ "$MODE" != 'list-error' ] || exit 1+ printf '%s\n' '[{"tagName":"v0.1.811-beta","createdAt":"2026-09-20T00:00:00Z"}]'+ ;;+ view)+ [ "$MODE" != 'view-error' ] || exit 1+ if [ "$MODE" = 'present' ]; then+ printf '{"assets":[{"name":"Unsloth-Desktop-%s"}]}\n' "$SUFFIX"+ else+ printf '%s\n' '{"assets":[]}'+ fi+ ;;+ download) [ "$MODE" = 'present' ] ;;+ *) exit 2 ;;+esac+""")+ gh.chmod(0o755)+ output = tmp_path / "output"+ result = subprocess.run(+ ["bash", "-e", "-c", download["run"].replace("${{ matrix.asset }}", suffix)],+ cwd = tmp_path,+ env = {+ **os.environ,+ "PATH": f'{fake_bin}:{os.environ["PATH"]}',+ "MODE": mode,+ "SUFFIX": suffix,+ "REL_TAG": tag,+ "REL_REPO": "test/desktop",+ "RUNNER_TEMP": str(tmp_path),+ "GITHUB_ENV": str(tmp_path / "env"),+ "GITHUB_OUTPUT": str(output),+ },+ capture_output = True,+ text = True,+ check = False,+ )+ assert result.returncode == returncode, result.stdout + result.stderr+ assert (output.exists() and "unreleased=true" in output.read_text()) == unreleaseddiff --git a/tests/security/test_release_desktop_integrity.py b/tests/security/test_release_desktop_integrity.pyindex 41364b33b3c..de1222f1f9c 100644--- a/tests/security/test_release_desktop_integrity.py+++ b/tests/security/test_release_desktop_integrity.py@@ -3,8 +3,10 @@from __future__ import annotationsimport base64+import fnmatchimport jsonimport os+import shleximport subprocessfrom pathlib import Path@@ -160,6 +162,8 @@ def _stage_assets(tmp_path: Path) -> None:("Unsloth-Desktop-MacOS.dmg", b"disk image"),("Unsloth-Desktop-Ubuntu.deb", b"package"),("Unsloth-Desktop-Ubuntu.deb.sig", signature),+ ("Unsloth-Desktop-Ubuntu-ARM64.deb", b"arm64 package"),+ ("Unsloth-Desktop-Ubuntu-ARM64.deb.sig", signature),("Unsloth-Desktop-ARM64.app.tar.gz", b"mac updater"),("Unsloth-Desktop-ARM64.app.tar.gz.sig", signature),("Unsloth-Desktop-Linux.AppImage", b"linux updater"),@@ -178,11 +182,14 @@ def _run_create_release(*,invalid_signature = False,missing_debian_signature = False,+ missing_debian_arm64_signature = False,**kwargs,):_stage_assets(tmp_path)if missing_debian_signature:(tmp_path / "desktop-release-assets" / "Unsloth-Desktop-Ubuntu.deb.sig").unlink()+ if missing_debian_arm64_signature:+ (tmp_path / "desktop-release-assets" / "Unsloth-Desktop-Ubuntu-ARM64.deb.sig").unlink()if invalid_signature:(tmp_path / "desktop-release-assets" / "Unsloth-Desktop-Linux.AppImage.sig").write_text("Tauri signer diagnostic, not a signature\n", encoding = "utf-8"@@ -346,7 +353,70 @@ def test_linux_release_stages_the_debian_signature(tmp_path):def test_a_missing_debian_signature_prevents_manifest_publication(tmp_path):result, _ = _run_create_release(_workflow(), tmp_path, missing_debian_signature = True)assert result.returncode != 0- assert "Expected exactly one .deb.sig updater asset" in result.stderr+ # Named in full since the arm64 leg ships a .deb.sig too.+ assert "Expected exactly one -Ubuntu.deb.sig updater asset" in result.stderr+++def test_a_missing_debian_arm64_signature_prevents_manifest_publication(tmp_path):+ result, _ = _run_create_release(_workflow(), tmp_path, missing_debian_arm64_signature = True)+ assert result.returncode != 0+ assert "Expected exactly one -Ubuntu-ARM64.deb.sig updater asset" in result.stderr+++def test_the_two_linux_legs_never_stage_the_same_asset_name(tmp_path):+ """Both Linux legs bundle a deb and its signature.++ publish-release merges every leg's artifact into one flat directory, so a shared name+ is an overwrite rather than a clash: x64 users would get the arm64 signature and their+ in-app update would fail verification, with nothing red anywhere.+ """+ staged = {}+ for artifact, arch in (("linux-x64", "amd64"), ("linux-arm64", "arm64")):+ leg = tmp_path / artifact+ leg.mkdir()+ bundles = leg / "bundles"+ bundles.mkdir()+ files = []+ for suffix in ("deb", "deb.sig"):+ path = bundles / f"Unsloth_0.1.50_{arch}.{suffix}"+ path.write_text(f"{arch}.{suffix}", encoding = "utf-8")+ files.append(str(path))+ result, _ = _run_step(+ _workflow(),+ "build",+ "Stage release assets",+ leg,+ extra_env = {"ARTIFACT_PATHS": json.dumps(files), "MATRIX_ARTIFACT": artifact},+ )+ assert result.returncode == 0, result.stderr+ staged[artifact] = {+ path.name: path.read_text(encoding = "utf-8")+ for path in (leg / "desktop-release-assets").iterdir()+ }++ assert set(staged["linux-x64"]) == {+ "Unsloth-Desktop-Ubuntu.deb",+ "Unsloth-Desktop-Ubuntu.deb.sig",+ }+ assert set(staged["linux-arm64"]) == {+ "Unsloth-Desktop-Ubuntu-ARM64.deb",+ "Unsloth-Desktop-Ubuntu-ARM64.deb.sig",+ }+ assert not set(staged["linux-x64"]) & set(staged["linux-arm64"])+ assert staged["linux-arm64"]["Unsloth-Desktop-Ubuntu-ARM64.deb.sig"] == "arm64.deb.sig"+++def test_the_updater_manifest_points_linux_arm64_at_its_own_bundle(tmp_path):+ """An arm64 deb install must never be offered the amd64 package."""+ result, _ = _run_create_release(_workflow(), tmp_path)+ assert result.returncode == 0, result.stderr+ manifest = json.loads((tmp_path / "latest.json").read_text(encoding = "utf-8"))+ platforms = manifest["platforms"]+ for key in ("linux-aarch64", "linux-aarch64-deb"):+ assert platforms[key]["url"].endswith("Unsloth-Desktop-Ubuntu-ARM64.deb"), key+ for key in ("linux-x86_64", "linux-x86_64-appimage"):+ assert platforms[key]["url"].endswith("Unsloth-Desktop-Linux.AppImage"), key+ assert platforms["linux-x86_64-deb"]["url"].endswith("Unsloth-Desktop-Ubuntu.deb")def test_the_publish_sequence_never_rewrites_the_release_body(tmp_path):@@ -790,3 +860,93 @@ def test_asr_audit_events_are_reported_as_runner_activity_only():assert ("not attributable" in report or "not a finding against it" in report), "the ASR warning reads as a verdict on the bundle, which is never executed"+++def test_linux_arm64_deb_has_a_native_build_and_blocks_publication_on_failure():+ workflow = _workflow()+ legs = workflow["jobs"]["build"]["strategy"]["matrix"]["include"]+ arm64 = [leg for leg in legs if leg.get("artifact") == "linux-arm64"]+ assert len(arm64) == 1+ assert arm64[0]["platform"] == "ubuntu-24.04-arm"+ build = _step(workflow, "build", "Build Linux ARM64 package")+ assert build["if"] == "matrix.platform == 'ubuntu-24.04-arm'"+ assert build["with"]["args"] == "-v --bundles deb"+ assert "TAURI_SIGNING_PRIVATE_KEY" in build["env"]+ wait = _step(workflow, "publish-release", "Wait for the build matrix")["run"]+ assert f"'Build {arm64[0]['label']}'" in wait+++def test_linux_deb_architectures_stage_distinct_assets_and_validate_together(tmp_path):+ workflow = _workflow()+ _stage_assets(tmp_path)+ arm64_asset = tmp_path / "desktop-release-assets" / "Unsloth-Desktop-Ubuntu-ARM64.deb"+ arm64_asset.unlink(missing_ok = True)+ for artifact, arch, target in (+ ("linux-x64", "amd64", "Unsloth-Desktop-Ubuntu.deb"),+ ("linux-arm64", "arm64", "Unsloth-Desktop-Ubuntu-ARM64.deb"),+ ):+ source = tmp_path / f"Unsloth_0.1.50_{arch}.deb"+ source.write_bytes(arch.encode())+ destination = tmp_path / "desktop-release-assets" / target+ destination.unlink(missing_ok = True)+ result, _ = _run_step(+ workflow,+ "build",+ "Stage release assets",+ tmp_path,+ extra_env = {"ARTIFACT_PATHS": json.dumps([str(source)]), "MATRIX_ARTIFACT": artifact},+ )+ assert result.returncode == 0, result.stderr+ assert destination.read_bytes() == arch.encode()+ result, _ = _run_step(workflow, "publish-release", "Validate release asset set", tmp_path)+ assert result.returncode == 0, result.stderr+ arm64_asset.unlink()+ result, _ = _run_step(workflow, "publish-release", "Validate release asset set", tmp_path)+ assert result.returncode != 0+ assert "Unsloth-Desktop-Ubuntu-ARM64.deb" in result.stderr+++def test_linux_clean_machine_downloads_only_the_runner_architecture(tmp_path):+ workflow = yaml.safe_load(+ (REPO_ROOT / ".github/workflows/desktop-app-clean-machine-ci.yml").read_text()+ )+ job = workflow["jobs"]["linux"]+ assert job["runs-on"] == "${{ matrix.os }}"+ legs = job["strategy"]["matrix"]["include"]+ assert {leg["arch"] for leg in legs if leg["kind"] == "deb"} == {"x64", "arm64"}+ download = _step(workflow, "linux", "Download the shipped bundle")+ original = download["run"]+ for leg in legs:+ download["run"] = original.replace("${{ matrix.asset }}", leg["asset"])+ result, commands = _run_step(+ workflow,+ "linux",+ "Download the shipped bundle",+ tmp_path,+ target_has_desktop_assets = True,+ extra_env = {"REL_TAG": RELEASE_TAG, "REL_REPO": "unslothai/unsloth"},+ )+ assert result.returncode == 0, result.stderr+ expected = (+ "Unsloth-Desktop-Ubuntu-ARM64.deb"+ if leg["arch"] == "arm64"+ else (+ "Unsloth-Desktop-Ubuntu.deb"+ if leg["kind"] == "deb"+ else "Unsloth-Desktop-Linux.AppImage"+ )+ )+ command = next(+ command for command in commands if command.startswith("gh release download ")+ )+ arguments = shlex.split(command)+ pattern = arguments[arguments.index("--pattern") + 1]+ for prefix in ("Unsloth-Desktop-", "Unsloth-Desktop-0_1_803_beta-"):+ assets = [+ prefix + suffix for suffix in ("Ubuntu.deb", "Ubuntu-ARM64.deb", "Linux.AppImage")+ ]+ assert fnmatch.filter(assets, pattern) == [+ prefix + expected.removeprefix("Unsloth-Desktop-")+ ]+ if leg["arch"] == "arm64":+ assert leg["os"] == "ubuntu-24.04-arm"diff --git a/tests/security/test_release_desktop_permissions.py b/tests/security/test_release_desktop_permissions.pyindex ea7616b975b..fc43b2c0613 100644--- a/tests/security/test_release_desktop_permissions.py+++ b/tests/security/test_release_desktop_permissions.py@@ -81,7 +81,7 @@ def test_build_matrix_hands_off_assets_without_release_credentials():for step in build["steps"]if step.get("uses", "").startswith("tauri-apps/tauri-action@")]- assert len(tauri_steps) == 3+ assert len(tauri_steps) == 4for step in tauri_steps:assert "GITHUB_TOKEN" not in step.get("env", {})assert not {"releaseId", "tagName", "releaseName"} & step.get("with", {}).keys()diff --git a/tests/studio/test_tauri_branding_contract.py b/tests/studio/test_tauri_branding_contract.pyindex 5e58f476852..9506ca933d3 100644--- a/tests/studio/test_tauri_branding_contract.py+++ b/tests/studio/test_tauri_branding_contract.py@@ -184,6 +184,8 @@ def test_desktop_release_asset_names_are_human_readable() -> None:"Linux.AppImage.sig","Ubuntu.deb","Ubuntu.deb.sig",+ "Ubuntu-ARM64.deb",+ "Ubuntu-ARM64.deb.sig","Windows.exe","Windows.exe.sig","Windows-ARM64.exe",@@ -196,6 +198,7 @@ def test_desktop_release_asset_names_are_human_readable() -> None:"Unsloth-Desktop-MacOS.dmg","Unsloth-Desktop-Linux.AppImage","Unsloth-Desktop-Ubuntu.deb",+ "Unsloth-Desktop-Ubuntu-ARM64.deb","Unsloth-Desktop-Windows.exe","Unsloth-Desktop-Windows-ARM64.exe",):