Skip to content

Commit

Permalink
CI: Build Flatpak
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Sep 2, 2023
1 parent 787109e commit 09ab628
Showing 1 changed file with 61 additions and 1 deletion.
62 changes: 61 additions & 1 deletion .github/workflows/rolling-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,59 @@ jobs:
path: "DuckStation-x64.AppImage"


linux-flatpak-build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install packages
shell: bash
run: scripts/flatpak/install-packages.sh

- name: Generate AppStream XML
run: |
scripts/flatpak/generate-metainfo.sh scripts/flatpak/org.duckstation.duckstation.metainfo.xml
cat scripts/flatpak/org.duckstation.duckstation.metainfo.xml
flatpak run org.freedesktop.appstream-glib validate .github/workflows/scripts/linux/flatpak/org.duckstation.duckstation.metainfo.xml
- name: Compile build
shell: bash
run: |
mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_NOGUI_FRONTEND=OFF -DBUILD_QT_FRONTEND=ON -DUSE_DRMKMS=OFF -DUSE_EGL=ON -DUSE_SDL2=ON -DUSE_WAYLAND=ON -DUSE_X11=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_PREFIX_PATH=$HOME/deps -DCMAKE_TOOLCHAIN_FILE=../scripts/clang-toolchain.cmake ..
cmake --build . --parallel
cd ..
scripts/make-appimage.sh $(realpath ./build) $(realpath .) $HOME/deps DuckStation-x64
- name: Build Flatpak
uses: flatpak/flatpak-github-actions/[email protected]
with:
bundle: duckstation-x64.flatpak
manifest-path: scripts/flatpak/org.duckstation.duckstation.json
arch: x86_64
build-bundle: true
verbose: true
#mirror-screenshots-url: https://dl.flathub.org/repo/screenshots
#branch: ${{ inputs.branch }}
branch: master
cache: true
restore-cache: true
cache-key: flatpak-x64-${{ hashFiles('.scripts/flatpak/**/*.json') }}

- name: Commit screenshots to OSTree
run: |
ostree commit --repo=repo --canonical-permissions --branch=screenshots/x86_64 flatpak_app/screenshots
- name: Upload Flatpak
uses: actions/upload-artifact@v1
with:
name: "linux-flatpak"
path: "duckstation-x64.flatpak"


macos-build:
runs-on: macos-11
steps:
Expand Down Expand Up @@ -283,7 +336,7 @@ jobs:


create-release:
needs: [windows-build, windows-arm64-build, linux-build, macos-build]
needs: [windows-build, windows-arm64-build, linux-build, linux-flatpak-build, macos-build]
runs-on: "ubuntu-20.04"
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
steps:
Expand All @@ -302,6 +355,11 @@ jobs:
with:
name: "linux-x64-appimage-qt"

- name: Download Flatpak Artifact
uses: actions/download-artifact@v1
with:
name: "linux-flatpak"

- name: Download MacOS Artifact
uses: actions/download-artifact@v1
with:
Expand All @@ -321,6 +379,7 @@ jobs:
windows-arm64/duckstation-windows-arm64-release.zip
windows-arm64/duckstation-windows-arm64-release-symbols.zip
linux-x64-appimage-qt/DuckStation-x64.AppImage
linux-flatpak/duckstation-x64.flatpak
macos/duckstation-mac-release.zip
- name: Create dev release
Expand All @@ -337,5 +396,6 @@ jobs:
windows-arm64/duckstation-windows-arm64-release.zip
windows-arm64/duckstation-windows-arm64-release-symbols.zip
linux-x64-appimage-qt/DuckStation-x64.AppImage
linux-flatpak/duckstation-x64.flatpak
macos/duckstation-mac-release.zip

0 comments on commit 09ab628

Please sign in to comment.