ci: add flatpak builder

This commit is contained in:
Mitchell Hashimoto
2023-02-27 13:59:42 -08:00
parent e3e1e6c521
commit 533cfbc9b8
5 changed files with 14 additions and 6 deletions

View File

@ -1,5 +1,4 @@
on: on: [push]
workflow_dispatch: {}
name: Flatpak name: Flatpak
@ -11,7 +10,10 @@ jobs:
image: bilelmoussaoui/flatpak-github-actions:gnome-43 image: bilelmoussaoui/flatpak-github-actions:gnome-43
options: --privileged options: --privileged
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- uses: flatpak/flatpak-github-actions/flatpak-builder@v4 - uses: flatpak/flatpak-github-actions/flatpak-builder@v4
with: with:
bundle: ghostty.flatpak bundle: ghostty.flatpak

3
.gitmodules vendored
View File

@ -40,3 +40,6 @@
[submodule "vendor/libxev"] [submodule "vendor/libxev"]
path = vendor/libxev path = vendor/libxev
url = https://github.com/mitchellh/libxev.git url = https://github.com/mitchellh/libxev.git
[submodule "vendor/mach-sdk/sdk-linux-x86_64"]
path = vendor/mach-sdk/sdk-linux-x86_64
url = https://github.com/hexops/sdk-linux-x86_64.git

View File

@ -590,7 +590,11 @@ fn addDeps(
// get access to glib for dbus. // get access to glib for dbus.
if (flatpak) { if (flatpak) {
step.linkSystemLibrary("gtk4"); step.linkSystemLibrary("gtk4");
step.addLibraryPath("/usr/lib/aarch64-linux-gnu"); switch (step.target.getCpuArch()) {
.aarch64 => step.addLibraryPath("/usr/lib/aarch64-linux-gnu"),
.x86_64 => step.addLibraryPath("/usr/lib/x86_64-linux-gnu"),
else => @panic("unsupported flatpak target"),
}
} }
switch (app_runtime) { switch (app_runtime) {

View File

@ -2,8 +2,6 @@ app-id: com.mitchellh.ghostty
runtime: org.gnome.Platform runtime: org.gnome.Platform
runtime-version: '43' runtime-version: '43'
sdk: org.gnome.Sdk sdk: org.gnome.Sdk
platform-extensions:
- org.freedesktop.Platform.GL.default
default-branch: tip default-branch: tip
command: ghostty command: ghostty
build-options: build-options:

1
vendor/mach-sdk/sdk-linux-x86_64 vendored Submodule

@ -0,0 +1 @@
Subproject commit ebd1ce12e9abc152c7ed43afbcdb4b6e1c95be07