mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-28 17:18:49 -04:00
* 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>
74 lines
2.3 KiB
YAML
74 lines
2.3 KiB
YAML
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"
|