Add Flatpak CI
This commit is contained in:
parent
c0a9098bec
commit
f17f13786d
|
@ -0,0 +1,44 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
flatpak:
|
||||
name: Flatpak
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: bilelmoussaoui/flatpak-github-actions:gnome-45
|
||||
options: --privileged
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [x86_64, aarch64]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Swift dependencies
|
||||
run: |
|
||||
dnf -y install libadwaita-devel
|
||||
dnf -y install swiftlang
|
||||
- name: Install deps
|
||||
if: ${{ matrix.arch != 'x86_64' }}
|
||||
run: |
|
||||
dnf -y install docker
|
||||
- name: Set up QEMU
|
||||
if: ${{ matrix.arch != 'x86_64' }}
|
||||
id: qemu
|
||||
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
- name: SPM Flatpak Builder Tool
|
||||
run: |
|
||||
swift build -c release
|
||||
git clone https://github.com/flatpak/flatpak-builder-tools
|
||||
mv data/release-manifest/manifest.json io.github.AparokshaUI.AdwaitaTemplate.json
|
||||
swift flatpak-builder-tools/spm/flatpak-spm-generator.swift . .
|
||||
- name: Flatpak Builder
|
||||
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||
with:
|
||||
bundle: io.github.AparokshaUI.AdwaitaTemplate.flatpak
|
||||
manifest-path: io.github.AparokshaUI.AdwaitaTemplate.json
|
||||
cache-key: flatpak-builder-${{ github.sha }}
|
||||
arch: ${{ matrix.arch }}
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"app-id": "io.github.AparokshaUI.AdwaitaTemplate",
|
||||
"runtime": "org.gnome.Platform",
|
||||
"runtime-version": "46",
|
||||
"sdk": "org.gnome.Sdk",
|
||||
"sdk-extensions": [
|
||||
"org.freedesktop.Sdk.Extension.swift5"
|
||||
],
|
||||
"command": "AdwaitaTemplate",
|
||||
"finish-args": [
|
||||
"--share=ipc",
|
||||
"--socket=fallback-x11",
|
||||
"--device=dri",
|
||||
"--socket=wayland"
|
||||
],
|
||||
"build-options": {
|
||||
"append-path": "/usr/lib/sdk/swift5/bin",
|
||||
"prepend-ld-library-path": "/usr/lib/sdk/swift5/lib"
|
||||
},
|
||||
"cleanup": [
|
||||
"/include",
|
||||
"/lib/pkgconfig",
|
||||
"/man",
|
||||
"/share/doc",
|
||||
"/share/gtk-doc",
|
||||
"/share/man",
|
||||
"/share/pkgconfig",
|
||||
"*.la",
|
||||
"*.a"
|
||||
],
|
||||
"modules": [
|
||||
{
|
||||
"name": "AdwaitaTemplate",
|
||||
"builddir": true,
|
||||
"buildsystem": "simple",
|
||||
"sources": [
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"build-commands": [
|
||||
"./setup-offline.sh",
|
||||
"swift build -c release --static-swift-stdlib --skip-update",
|
||||
"strip .build/release/AdwaitaTemplate",
|
||||
"install -Dm755 .build/release/AdwaitaTemplate /app/bin/AdwaitaTemplate",
|
||||
"install -Dm644 data/io.github.AparokshaUI.AdwaitaTemplate.metainfo.xml $DESTDIR/app/share/metainfo/io.github.AparokshaUI.AdwaitaTemplate.metainfo.xml",
|
||||
"install -Dm644 data/io.github.AparokshaUI.AdwaitaTemplate.desktop $DESTDIR/app/share/applications/io.github.AparokshaUI.AdwaitaTemplate.desktop",
|
||||
"install -Dm644 data/icons/io.github.AparokshaUI.AdwaitaTemplate.svg $DESTDIR/app/share/icons/hicolor/scalable/apps/io.github.AparokshaUI.AdwaitaTemplate.svg",
|
||||
"install -Dm644 data/icons/io.github.AparokshaUI.AdwaitaTemplate-symbolic.svg $DESTDIR/app/share/icons/hicolor/symbolic/apps/io.github.AparokshaUI.AdwaitaTemplate-symbolic.svg"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue