mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-28 09:08:54 -04:00
feat(launcher): ship an AppImage on tagged releases (#12647)
* feat(launcher): package a Linux AppImage Ship the existing Fyne launcher as an additive release asset without bundling the server or changing its runtime downloader. Pin packaging tools and the type-2 runtime, preserve the caller environment, and document the native amd64 graphics requirements. Validate packaging contracts and wire extraction smoke checks into CI. Assisted-by: Codex:gpt-5 * fix(launcher): harden AppImage release checks PR builds must not receive repository write credentials. Isolate uploads in a gated job that consumes the tested artifact without checkout. Keep the existing release check and dependency on GoReleaser. A surviving process does not prove that the UI event loop works. Require observable startup progress, reject initialization errors, and bound termination. Document the remaining limits without changing the launcher application. Add permission and smoke failure regressions. Assisted-by: nib:unknown * fix(launcher): install file for AppImage builds appimagetool fails after Go compilation when file is missing. Install it explicitly in CI and document the local build dependency. Check for it before compilation and cover the missing-command failure in tests. Assisted-by: nib:unknown --------- Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
1 parent
98467ef0c2
commit
33459f2e2a
10 files changed
+475
-3
No files matched your search
@@ -0,0 +1,73 @@
|
||||
name: Launcher AppImage
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
publish:
|
||||
type: boolean
|
||||
default: false
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'cmd/launcher/**'
|
||||
- 'pkg/**'
|
||||
- 'go.mod'
|
||||
- 'go.sum'
|
||||
- 'Makefile'
|
||||
- 'contrib/appimage/**'
|
||||
- '.github/workflows/launcher-appimage.yaml'
|
||||
- '.github/workflows/release.yaml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
appimage:
|
||||
# Native CGO build; glibc 2.35 is the supported minimum.
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- name: Install Fyne and validation dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential file pkg-config libgl1-mesa-dev xorg-dev libxkbcommon-dev desktop-file-utils xvfb xauth
|
||||
- name: Check packaging contracts
|
||||
run: make test-launcher-appimage
|
||||
- name: Build native amd64 AppImage
|
||||
run: make build-launcher-appimage APPIMAGE_ARCH=amd64
|
||||
- name: Extract and smoke without FUSE
|
||||
run: bash contrib/appimage/smoke.sh
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: launcher-appimage-x86_64
|
||||
path: |
|
||||
dist/LocalAI-Launcher-x86_64.AppImage
|
||||
dist/LocalAI-Launcher-x86_64.AppImage.sha256
|
||||
if-no-files-found: error
|
||||
|
||||
publish:
|
||||
needs: appimage
|
||||
if: inputs.publish && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
# Download only: never execute repository code with the write token.
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: launcher-appimage-x86_64
|
||||
path: dist
|
||||
- name: Attach to existing version release
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
# The caller waits for GoReleaser. Never create or replace its release.
|
||||
run: |
|
||||
gh release view "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY"
|
||||
gh release upload "$GITHUB_REF_NAME" dist/LocalAI-Launcher-x86_64.AppImage dist/LocalAI-Launcher-x86_64.AppImage.sha256 --clobber --repo "$GITHUB_REPOSITORY"
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.23
|
||||
go-version-file: go.mod
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v7
|
||||
with:
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.23
|
||||
go-version-file: go.mod
|
||||
- name: Import signing certificate
|
||||
env:
|
||||
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.23
|
||||
go-version-file: go.mod
|
||||
- name: Build launcher for Linux
|
||||
run: |
|
||||
sudo apt-get update
|
||||
@@ -79,3 +79,11 @@ jobs:
|
||||
uses: softprops/action-gh-release@v3
|
||||
with:
|
||||
files: ./local-ai-launcher-linux.tar.xz
|
||||
|
||||
launcher-appimage:
|
||||
needs: goreleaser
|
||||
permissions:
|
||||
contents: write
|
||||
uses: ./.github/workflows/launcher-appimage.yaml
|
||||
with:
|
||||
publish: true
|
||||
Reference in new issue
Block a user