From cd7bd167a2d079edff5fd74cb340c62291de3f16 Mon Sep 17 00:00:00 2001 From: DeaTh-G Date: Tue, 3 Feb 2026 18:43:28 +0100 Subject: [PATCH 1/2] add debug flatpak ci job type --- .github/workflows/validate.yml | 7 ++- ...dge_dev.unleashedrecomp-flatpak-debug.json | 48 +++++++++++++++++++ ..._dev.unleashedrecomp-flatpak-release.json} | 0 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 flatpak/io.github.hedge_dev.unleashedrecomp-flatpak-debug.json rename flatpak/{io.github.hedge_dev.unleashedrecomp.json => io.github.hedge_dev.unleashedrecomp-flatpak-release.json} (100%) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 5ee4a366..d0bc43d5 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -160,6 +160,9 @@ jobs: build-flatpak: name: Build Flatpak runs-on: ubuntu-24.04 + strategy: + matrix: + preset: ["flatpak-debug", "flatpak-release"] env: FLATPAK_ID: io.github.hedge_dev.unleashedrecomp @@ -185,7 +188,7 @@ jobs: uses: actions/cache@v4 with: path: /tmp/ccache - key: ccache-${{ runner.os }} + key: ccache-${{ runner.os }}-${{ matrix.preset }} - name: Prepare Project run: cp ./private/* ./UnleashedRecompLib/private @@ -198,7 +201,7 @@ jobs: run: | echo "commit_message=$(git log -1 --pretty=%s)" >> $GITHUB_ENV export CCACHE_DIR=/tmp/ccache - flatpak-builder --user --force-clean --install-deps-from=flathub --repo=repo --ccache builddir ./flatpak/${{ env.FLATPAK_ID }}.json + flatpak-builder --user --force-clean --install-deps-from=flathub --repo=repo --ccache builddir ./flatpak/${{ env.FLATPAK_ID }}-${{ matrix.preset }}.json flatpak build-bundle repo ./${{ env.FLATPAK_ID }}.flatpak ${{ env.FLATPAK_ID }} --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo - name: Upload Artifact diff --git a/flatpak/io.github.hedge_dev.unleashedrecomp-flatpak-debug.json b/flatpak/io.github.hedge_dev.unleashedrecomp-flatpak-debug.json new file mode 100644 index 00000000..6cea43d8 --- /dev/null +++ b/flatpak/io.github.hedge_dev.unleashedrecomp-flatpak-debug.json @@ -0,0 +1,48 @@ +{ + "id": "io.github.hedge_dev.unleashedrecomp", + "runtime": "org.freedesktop.Platform", + "runtime-version": "24.08", + "sdk": "org.freedesktop.Sdk", + "sdk-extensions" : [ "org.freedesktop.Sdk.Extension.llvm18" ], + "finish-args": [ + "--share=network", + "--socket=wayland", + "--socket=fallback-x11", + "--socket=pulseaudio", + "--device=all", + "--filesystem=host", + "--filesystem=/media", + "--filesystem=/run/media", + "--filesystem=/mnt" + ], + "modules": [ + { + "name": "UnleashedRecomp", + "buildsystem": "simple", + "build-commands": [ + "cmake --preset linux-debug -DUNLEASHED_RECOMP_FLATPAK=ON -DSDL2MIXER_VORBIS=VORBISFILE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache", + "cmake --build out/build/linux-debug --target UnleashedRecomp", + "mkdir -p /app/bin", + "cp out/build/linux-debug/UnleashedRecomp/UnleashedRecomp /app/bin/UnleashedRecomp", + "install -Dm644 UnleashedRecompResources/images/game_icon.png /app/share/icons/hicolor/128x128/apps/${FLATPAK_ID}.png", + "install -Dm644 flatpak/io.github.hedge_dev.unleashedrecomp.metainfo.xml /app/share/metainfo/${FLATPAK_ID}.metainfo.xml", + "install -Dm644 flatpak/io.github.hedge_dev.unleashedrecomp.desktop /app/share/applications/${FLATPAK_ID}.desktop" + ], + "sources": [ + { + "type": "dir", + "path": "../" + } + ], + "build-options": { + "no-debuginfo": true, + "strip": false, + "append-path": "/usr/lib/sdk/llvm18/bin", + "prepend-ld-library-path": "/usr/lib/sdk/llvm18/lib", + "build-args": [ + "--share=network" + ] + } + } + ] +} diff --git a/flatpak/io.github.hedge_dev.unleashedrecomp.json b/flatpak/io.github.hedge_dev.unleashedrecomp-flatpak-release.json similarity index 100% rename from flatpak/io.github.hedge_dev.unleashedrecomp.json rename to flatpak/io.github.hedge_dev.unleashedrecomp-flatpak-release.json From 9e2d1a920c16b090e1602d1a26c6c50ab1e7f659 Mon Sep 17 00:00:00 2001 From: DeaTh-G Date: Tue, 3 Feb 2026 19:12:38 +0100 Subject: [PATCH 2/2] differentiate debug and release artifacts for flatpaks --- .github/workflows/validate.yml | 4 ++-- ...=> io.github.hedge_dev.unleashedrecomp-Flatpak-Debug.json} | 0 ... io.github.hedge_dev.unleashedrecomp-Flatpak-Release.json} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename flatpak/{io.github.hedge_dev.unleashedrecomp-flatpak-debug.json => io.github.hedge_dev.unleashedrecomp-Flatpak-Debug.json} (100%) rename flatpak/{io.github.hedge_dev.unleashedrecomp-flatpak-release.json => io.github.hedge_dev.unleashedrecomp-Flatpak-Release.json} (100%) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index d0bc43d5..d609963e 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -162,7 +162,7 @@ jobs: runs-on: ubuntu-24.04 strategy: matrix: - preset: ["flatpak-debug", "flatpak-release"] + preset: ["Flatpak-Debug", "Flatpak-Release"] env: FLATPAK_ID: io.github.hedge_dev.unleashedrecomp @@ -207,7 +207,7 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: UnleashedRecomp-Flatpak + name: UnleashedRecomp-${{ matrix.preset }} path: ./${{ env.FLATPAK_ID }}.flatpak build-macos: name: Build macOS diff --git a/flatpak/io.github.hedge_dev.unleashedrecomp-flatpak-debug.json b/flatpak/io.github.hedge_dev.unleashedrecomp-Flatpak-Debug.json similarity index 100% rename from flatpak/io.github.hedge_dev.unleashedrecomp-flatpak-debug.json rename to flatpak/io.github.hedge_dev.unleashedrecomp-Flatpak-Debug.json diff --git a/flatpak/io.github.hedge_dev.unleashedrecomp-flatpak-release.json b/flatpak/io.github.hedge_dev.unleashedrecomp-Flatpak-Release.json similarity index 100% rename from flatpak/io.github.hedge_dev.unleashedrecomp-flatpak-release.json rename to flatpak/io.github.hedge_dev.unleashedrecomp-Flatpak-Release.json