-
Notifications
You must be signed in to change notification settings - Fork 723
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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: | ||
|
@@ -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: | ||
|
@@ -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 | ||
|
@@ -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 | ||