feat(packaging): add self-contained AppImage build (x86_64 + aarch64) (#573)
* feat(packaging): add self-contained AppImage build Bundles the wheel plus PyGObject/GTK3/AppIndicator/IBus typelibs into a relocatable x86_64 AppImage via linuxdeploy + linuxdeploy-plugin-gtk, so users get a zero-install, no-sandbox-negotiation alternative alongside AUR/PyPI. Wired into nightly and tagged releases, plus a smoke-test job in the PR pipeline since AppImage/ELF bundling can't be verified on a macOS dev machine. * feat(packaging): add aarch64 AppImage builds Parameterizes build.sh on uname -m instead of hardcoding x86_64 (both linuxdeploy and appimagetool publish aarch64 continuous builds, and pywhispercpp ships manylinux_aarch64 wheels, so no from-source compile needed). Adds an arch matrix to the PR smoke-test job, and a second job in nightly.yml/release.yml that builds on GitHub's free ubuntu-24.04-arm hosted runner and attaches the aarch64 AppImage to the same release the x86_64 job already created.
This commit is contained in:
@@ -29,6 +29,21 @@ jobs:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
cache: 'pip'
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
portaudio19-dev \
|
||||
python3-dev \
|
||||
libgirepository1.0-dev \
|
||||
libgirepository-2.0-dev \
|
||||
pkg-config \
|
||||
libcairo2-dev \
|
||||
gobject-introspection \
|
||||
gir1.2-gtk-3.0 \
|
||||
gir1.2-appindicator3-0.1 \
|
||||
gir1.2-ibus-1.0
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
@@ -59,6 +74,11 @@ jobs:
|
||||
echo "Built packages:"
|
||||
ls -la dist/
|
||||
|
||||
- name: Build AppImage (x86_64)
|
||||
run: |
|
||||
bash packaging/appimage/build.sh dist/*.whl "${{ steps.get_version.outputs.VERSION }}" dist
|
||||
ls -la dist/*.AppImage
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@v2
|
||||
@@ -66,6 +86,7 @@ jobs:
|
||||
files: |
|
||||
dist/*.whl
|
||||
dist/*.tar.gz
|
||||
dist/*.AppImage
|
||||
generate_release_notes: true
|
||||
draft: false
|
||||
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
|
||||
@@ -103,9 +124,77 @@ jobs:
|
||||
yay -S vocalinux
|
||||
```
|
||||
|
||||
### AppImage (no install, no root)
|
||||
Download the `.AppImage` matching your CPU (`x86_64` or `aarch64`, the latter attached
|
||||
shortly after this release is published) below:
|
||||
```bash
|
||||
chmod +x Vocalinux-${{ steps.get_version.outputs.VERSION }}-x86_64.AppImage
|
||||
./Vocalinux-${{ steps.get_version.outputs.VERSION }}-x86_64.AppImage
|
||||
```
|
||||
Still requires `xdotool`/`wtype`/`ydotool` on the host for text injection, same as the PyPI path.
|
||||
|
||||
---
|
||||
See [CHANGELOG](https://github.com/jatinkrmalik/vocalinux/releases) for detailed changes.
|
||||
|
||||
build-appimage-arm64:
|
||||
name: Build and Attach AppImage (aarch64)
|
||||
needs: build-and-release
|
||||
runs-on: ubuntu-24.04-arm
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
cache: 'pip'
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
portaudio19-dev \
|
||||
python3-dev \
|
||||
libgirepository1.0-dev \
|
||||
libgirepository-2.0-dev \
|
||||
pkg-config \
|
||||
libcairo2-dev \
|
||||
gobject-introspection \
|
||||
gir1.2-gtk-3.0 \
|
||||
gir1.2-appindicator3-0.1 \
|
||||
gir1.2-ibus-1.0
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install build wheel setuptools
|
||||
|
||||
- name: Extract version from tag
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=${GITHUB_REF#refs/tags/v}
|
||||
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build package
|
||||
run: |
|
||||
python -m build
|
||||
ls -la dist/
|
||||
|
||||
- name: Build AppImage (aarch64)
|
||||
run: |
|
||||
bash packaging/appimage/build.sh dist/*.whl "${{ steps.get_version.outputs.VERSION }}" dist
|
||||
ls -la dist/*.AppImage
|
||||
|
||||
- name: Attach to release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release upload "${{ github.ref_name }}" \
|
||||
dist/*.AppImage \
|
||||
--repo ${{ github.repository }} \
|
||||
--clobber
|
||||
|
||||
publish-pypi:
|
||||
name: Publish to PyPI
|
||||
needs: build-and-release
|
||||
|
||||
Reference in New Issue
Block a user