forked from Ryochan7/sc-controller
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(appimage): switch to appimage-builder
This commits introduces appimage-builder in favor of the hand-crafted shell script. It allows a stable build environment, up-to-date library versions and multi-platform builds.
- Loading branch information
1 parent
a0fd405
commit 61d9a40
Showing
5 changed files
with
141 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
name: Build and publish AppImages | ||
|
||
env: | ||
UBUNTU_RELEASE: jammy | ||
UBUNTU_PUBKEY: 871920D1991BC93C | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
@@ -16,6 +20,7 @@ jobs: | |
matrix: | ||
platform: | ||
- linux/amd64 | ||
- linux/arm64 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -34,16 +39,34 @@ jobs: | |
platforms: ${{ matrix.platform }} | ||
outputs: build | ||
build-args: | | ||
APPIMAGE_VERSION=${{ env.GITHUB_REF_SLUG }} | ||
REPO_OWNER=${{ env.GITHUB_REPOSITORY_OWNER }} | ||
UBUNTU_RELEASE | ||
- name: Prepare environment for building AppImage | ||
env: | ||
TARGET_PLATFORM: ${{ matrix.platform }} | ||
shell: bash | ||
run: | | ||
set -eua | ||
. build/.build-metadata.env | ||
rm build/.build-metadata.env | ||
APPIMAGE_SOURCE=build | ||
APPIMAGE_VERSION="${GITHUB_REF_SLUG}" | ||
APPIMAGE_APT_ARCH="${TARGETARCH}" | ||
APPIMAGE_APT_DISTRO="${UBUNTU_RELEASE}" | ||
APPIMAGE_APT_PUBKEY="${UBUNTU_PUBKEY}" | ||
APPIMAGE_ARCH="${TARGETMACHINE}" | ||
printenv | grep ^APPIMAGE_ >>"${GITHUB_ENV}" | ||
- name: Build AppImage | ||
uses: AppImageCrafters/[email protected] | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: appimages | ||
path: | | ||
./build/*.AppImage | ||
./build/*.AppImage.zsync | ||
./*.AppImage | ||
./*.AppImage.zsync | ||
if-no-files-found: error | ||
|
||
release: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
version: 1 | ||
|
||
script: | ||
- | | ||
mv "{{APPIMAGE_SOURCE}}" "${TARGET_APPDIR}" | ||
# Manual installation is required until fix of https://github.com/AppImageCrafters/build-appimage/issues/5 | ||
if ! command -v mksquashfs >/dev/null; then | ||
apt-get update && apt-get install -y --no-install-recommends squashfs-tools | ||
fi | ||
AppDir: | ||
app_info: | ||
id: org.ryochan7.sc-controller | ||
name: sc-controller | ||
version: "{{APPIMAGE_VERSION}}" | ||
icon: sc-controller | ||
exec: bin/bash | ||
exec_args: entrypoint $@ | ||
|
||
after_runtime: | | ||
source="${TARGET_APPDIR}/usr/share/applications/sc-controller.desktop" | ||
target="${TARGET_APPDIR}/org.ryochan7.sc-controller.desktop" | ||
sed -i -E '/^(Comment|Categories)=.*$/d' "${target}" | ||
grep -v -P '^(\[Desktop Entry\])|(Name|Exec|Type|Icon)=.*$' "${source}" >>"${target}" | ||
apt: | ||
arch: | ||
- "{{APPIMAGE_APT_ARCH}}" | ||
sources: | ||
- sourceline: deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ "{{APPIMAGE_APT_DISTRO}}" main universe | ||
key_url: "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{APPIMAGE_APT_PUBKEY}}" | ||
- sourceline: deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ "{{APPIMAGE_APT_DISTRO}}"-updates main universe | ||
- sourceline: deb [arch=amd64] http://security.ubuntu.com/ubuntu/ "{{APPIMAGE_APT_DISTRO}}"-security main universe | ||
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ "{{APPIMAGE_APT_DISTRO}}" main universe | ||
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ "{{APPIMAGE_APT_DISTRO}}"-updates main universe | ||
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ "{{APPIMAGE_APT_DISTRO}}"-security main universe | ||
include: | ||
- bash | ||
- gir1.2-rsvg-2.0 | ||
- libc-bin | ||
- libbluetooth3 | ||
- librsvg2-common | ||
- python3-gi-cairo | ||
- python3-evdev | ||
- python3-pylibacl | ||
- python3-vdf | ||
exclude: | ||
- 'gcc*' | ||
- 'libblkid*' | ||
- 'libc6*' | ||
- 'libdb*' | ||
- 'libgcc*' | ||
- 'libicu*' | ||
- 'libmount*' | ||
- 'libncurses*' | ||
- 'libreadline*' | ||
- 'libssl*' | ||
- 'libstdc*' | ||
- 'libtirpc*' | ||
- 'readline*' | ||
- '*crypt*' | ||
- '*krb*' | ||
- '*sqlite*' | ||
|
||
files: | ||
exclude: | ||
- usr/share/man | ||
- usr/share/doc | ||
- usr/share/gtk-doc | ||
- usr/share/local | ||
- usr/share/thumbnailers | ||
- usr/share/icu | ||
- usr/lib/*/glib-2.0 | ||
- usr/lib/*/gdk-pixbuf-2.0/*/loaders/libpixbufloader-[!s]*.so | ||
|
||
runtime: | ||
path_mappings: | ||
- '/sbin/ldconfig.real:${APPDIR}/sbin/ldconfig.real' | ||
env: | ||
PYTHONPATH: '${APPDIR}/usr/lib/python3/dist-packages:${PYTHONPATH}' | ||
GI_TYPELIB_PATH: '${APPDIR}/usr/lib/{{APPIMAGE_ARCH}}-linux-gnu/girepository-1.0' | ||
|
||
AppImage: | ||
arch: "{{APPIMAGE_ARCH}}" | ||
update-information: "gh-releases-zsync|Ryochan7|sc-controller|latest|sc-controller-*.glibc-{{APPIMAGE_ARCH}}.AppImage.zsync" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters