Flatpak manifest and workflow
- packaging/flatpak/io.github.openpu.OpenPU.yml: GNOME 51 runtime, with the gtkmm stack built from source (libsigc++ 3.6, cairomm 1.18, glibmm 2.90, pangomm 2.58, gtkmm 4.24) and nlohmann_json. Permissions: network, display, UDisks2 on the system bus, the download folder and the stick mount points. - Flatpak workflow: bundles for x86_64 and aarch64 in Flathub's GNOME container, attached to the release of a vX.Y.Z tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WDASLCiN764v685boRVYar
This commit is contained in:
1 parent
b7d60634dc
commit
b915667fba
2 files changed
+152
No files matched your search
@@ -0,0 +1,55 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Flatpak bundle for x86_64 and aarch64, built in Flathub's GNOME container. Runs when the
|
||||
# manifest changes, on demand, and on vX.Y.Z tags (the bundle is then attached to the release).
|
||||
name: Flatpak
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths: ["packaging/flatpak/**", ".github/workflows/flatpak.yml"]
|
||||
tags: ["v*"]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
flatpak:
|
||||
name: Flatpak ${{ matrix.arch }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- arch: x86_64
|
||||
runner: ubuntu-24.04
|
||||
- arch: aarch64
|
||||
runner: ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.runner }}
|
||||
container:
|
||||
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-51
|
||||
options: --privileged
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||
with:
|
||||
bundle: OpenPU-${{ matrix.arch }}.flatpak
|
||||
manifest-path: packaging/flatpak/io.github.openpu.OpenPU.yml
|
||||
arch: ${{ matrix.arch }}
|
||||
cache-key: flatpak-builder-${{ matrix.arch }}-${{ hashFiles('packaging/flatpak/*.yml') }}
|
||||
|
||||
- name: Attach to the release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
TAG: ${{ github.ref_name }}
|
||||
run: |
|
||||
git config --global --add safe.directory "$PWD"
|
||||
bundle="OpenPU-${TAG#v}-${{ matrix.arch }}.flatpak"
|
||||
mv "OpenPU-${{ matrix.arch }}.flatpak" "$bundle"
|
||||
gh release view "$TAG" >/dev/null 2>&1 ||
|
||||
gh release create "$TAG" --verify-tag --title "OpenPU ${TAG#v}" --notes-from-tag ||
|
||||
gh release view "$TAG" >/dev/null
|
||||
gh release upload "$TAG" "$bundle" --clobber
|
||||
@@ -0,0 +1,97 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Flatpak manifest. The GNOME runtime has GTK 4, curl and libarchive but not the C++ bindings,
|
||||
# so the gtkmm stack is built here (versions matching the runtime's GLib / GTK / Pango).
|
||||
#
|
||||
# flatpak-builder --user --install --force-clean build-flatpak packaging/flatpak/io.github.openpu.OpenPU.yml
|
||||
id: io.github.openpu.OpenPU
|
||||
runtime: org.gnome.Platform
|
||||
runtime-version: '51'
|
||||
sdk: org.gnome.Sdk
|
||||
command: openpu
|
||||
finish-args:
|
||||
- --share=network # Majestic API and downloads
|
||||
- --share=ipc
|
||||
- --socket=wayland
|
||||
- --socket=fallback-x11
|
||||
- --device=dri
|
||||
# Formatting, mounting and ejecting the USB stick go through UDisks2 (polkit asks the user).
|
||||
- --system-talk-name=org.freedesktop.UDisks2
|
||||
# Default download folder, and the mount points UDisks2 uses for the stick.
|
||||
- --filesystem=xdg-download
|
||||
- --filesystem=/media
|
||||
- --filesystem=/run/media
|
||||
cleanup:
|
||||
- /include
|
||||
- /lib/pkgconfig
|
||||
- /lib/cmake
|
||||
# configuration headers of the bindings (not the libraries themselves)
|
||||
- /lib/sigc++-3.0
|
||||
- /lib/cairomm-1.16
|
||||
- /lib/glibmm-2.68
|
||||
- /lib/giomm-2.68
|
||||
- /lib/pangomm-2.48
|
||||
- /lib/gtkmm-4.0
|
||||
- /share/pkgconfig
|
||||
- /share/doc
|
||||
- /share/devhelp
|
||||
- '*.la'
|
||||
- '*.a'
|
||||
modules:
|
||||
- name: nlohmann-json
|
||||
buildsystem: cmake-ninja
|
||||
config-opts:
|
||||
- -DJSON_BuildTests=OFF
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/nlohmann/json/releases/download/v3.12.0/json.tar.xz
|
||||
sha256: 42f6e95cad6ec532fd372391373363b62a14af6d771056dbfc86160e6dfff7aa
|
||||
|
||||
- name: libsigc++
|
||||
buildsystem: meson
|
||||
config-opts: [-Dbuild-documentation=false, -Dbuild-examples=false, -Dbuild-tests=false, -Dvalidation=false]
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://download.gnome.org/sources/libsigc++/3.6/libsigc++-3.6.0.tar.xz
|
||||
sha256: c3d23b37dfd6e39f2e09f091b77b1541fbfa17c4f0b6bf5c89baef7229080e17
|
||||
|
||||
- name: cairomm
|
||||
buildsystem: meson
|
||||
config-opts: [-Dbuild-documentation=false, -Dbuild-examples=false, -Dbuild-tests=false]
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://www.cairographics.org/releases/cairomm-1.18.0.tar.xz
|
||||
sha256: b81255394e3ea8e8aa887276d22afa8985fc8daef60692eb2407d23049f03cfb
|
||||
|
||||
- name: glibmm
|
||||
buildsystem: meson
|
||||
config-opts: [-Dbuild-documentation=false, -Dbuild-examples=false]
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://download.gnome.org/sources/glibmm/2.90/glibmm-2.90.0.tar.xz
|
||||
sha256: e2efa45643f16b9fea2d6299f2f403d672eaeacddf0ff7f8094e1af9b0f5980b
|
||||
|
||||
- name: pangomm
|
||||
buildsystem: meson
|
||||
config-opts: [-Dbuild-documentation=false]
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://download.gnome.org/sources/pangomm/2.58/pangomm-2.58.0.tar.xz
|
||||
sha256: 217514c1a65035c2fce6e69e33b0d92bafa2594cc474e995a4473441b10f3a33
|
||||
|
||||
- name: gtkmm
|
||||
buildsystem: meson
|
||||
config-opts: [-Dbuild-documentation=false, -Dbuild-demos=false, -Dbuild-tests=false]
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://download.gnome.org/sources/gtkmm/4.24/gtkmm-4.24.0.tar.xz
|
||||
sha256: 7fd9cea356e7d3b74bf7d2a51d7e0e6763f3f9f1cddc5e77c8b0b5b7fa9d5e5a
|
||||
|
||||
- name: openpu
|
||||
buildsystem: cmake-ninja
|
||||
config-opts:
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DOPENPU_UI_GTK=ON
|
||||
- -DOPENPU_BUILD_TESTS=OFF
|
||||
sources:
|
||||
- type: dir
|
||||
path: ../..
|
||||
Reference in new issue
Block a user