mirror of
https://github.com/PancakeTAS/lsfg-vk.git
synced 2025-10-30 07:01:10 +00:00
test: packaging workflow
This commit is contained in:
parent
0eb012b04b
commit
32c6d2efe9
12 changed files with 155 additions and 5 deletions
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
|
@ -47,8 +47,8 @@ jobs:
|
|||
- name: Build lsfg-vk-ui with appimage.sh
|
||||
run: |
|
||||
pushd ui
|
||||
chmod +x appimage.sh
|
||||
./appimage.sh
|
||||
chmod +x ../scripts/build/appimage.sh
|
||||
../scripts/build/appimage.sh
|
||||
popd
|
||||
- name: Install lsfg-vk-ui
|
||||
run: |
|
||||
|
|
|
|||
2
.github/workflows/flatpak.yml
vendored
2
.github/workflows/flatpak.yml
vendored
|
|
@ -20,5 +20,5 @@ jobs:
|
|||
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||
with:
|
||||
bundle: "org.freedesktop.Platform.VulkanLayer.lsfg_vk_TEST_${{ matrix.version }}.flatpak"
|
||||
manifest-path: "flatpak/org.freedesktop.Platform.VulkanLayer.lsfgvk_${{ matrix.version }}.yml"
|
||||
manifest-path: "scripts/flatpak/org.freedesktop.Platform.VulkanLayer.lsfgvk_${{ matrix.version }}.yml"
|
||||
verbose: true
|
||||
|
|
|
|||
46
.github/workflows/package.yml
vendored
Normal file
46
.github/workflows/package.yml
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
name: (Test) Package lsfg-vk
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["(Test) Build lsfg-vk"]
|
||||
types:
|
||||
- completed
|
||||
branches: ["test/deploying"]
|
||||
|
||||
jobs:
|
||||
package:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
# prepare system
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Download lsfg-vk artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: lsfg-vk_TEST
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
run-id: ${{ github.event.workflow_run.id }}
|
||||
- name: Package lsfg-vk for various distros
|
||||
run: |
|
||||
export VERSION=$(grep -oP ' VERSION\s+\K[\d.]+' CMakeLists.txt)
|
||||
chmod +x scripts/package/package.sh
|
||||
./scripts/package/package.sh
|
||||
- name: Upload lsfg-vk for dpkg
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: lsfg-vk.dpkg_TEST
|
||||
path: |
|
||||
*.deb
|
||||
- name: Upload lsfg-vk for rpm
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: lsfg-vk.rpm_TEST
|
||||
path: |
|
||||
*.rpm
|
||||
- name: Upload lsfg-vk for alpm
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: lsfg-vk.alpm_TEST
|
||||
path: |
|
||||
*.zst
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
"name": "VK_LAYER_LS_frame_generation",
|
||||
"type": "GLOBAL",
|
||||
"api_version": "1.4.313",
|
||||
"library_path": "../../../lib/liblsfg-vk.so",
|
||||
"library_path": "liblsfg-vk.so",
|
||||
"implementation_version": "1",
|
||||
"description": "Lossless Scaling frame generation layer",
|
||||
"functions": {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ index ece2a5f..774a027 100644
|
|||
"name": "VK_LAYER_LS_frame_generation",
|
||||
"type": "GLOBAL",
|
||||
"api_version": "1.4.313",
|
||||
- "library_path": "../../../lib/liblsfg-vk.so",
|
||||
- "library_path": "liblsfg-vk.so",
|
||||
+ "library_path": "/usr/lib/extensions/vulkan/lsfgvk/lib/liblsfg-vk.so",
|
||||
"implementation_version": "1",
|
||||
"description": "Lossless Scaling frame generation layer",
|
||||
12
scripts/package/alpm.PKGINFO
Normal file
12
scripts/package/alpm.PKGINFO
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
pkgname = lsfg-vk
|
||||
pkgbase = lsfg-vk
|
||||
pkgver = ${VERSION}-1
|
||||
pkgdesc = "Lossless Scaling Frame Generation on Linux via DXVK/Vulkan"
|
||||
url = https://discord.gg/losslessscaling
|
||||
packager = "PancakeTAS <???>"
|
||||
arch = x86_64
|
||||
license = MIT
|
||||
depend = vulkan-icd-loader
|
||||
depend = libadwaita
|
||||
depend = gtk4
|
||||
depend = glibc
|
||||
12
scripts/package/dpkg.control
Normal file
12
scripts/package/dpkg.control
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Package: lsfg-vk
|
||||
Description: Lossless Scaling Frame Generation on Linux via DXVK/Vulkan
|
||||
Homepage: https://discord.gg/losslessscaling
|
||||
Maintainer: "PancakeTAS <???>"
|
||||
Version: ${VERSION}-1
|
||||
Architecture: amd64
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Depends: libc6 (>= 2.38-1),
|
||||
libvulkan1,
|
||||
libadwaita-1-0,
|
||||
libgtk-4-1
|
||||
51
scripts/package/package.sh
Executable file
51
scripts/package/package.sh
Executable file
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/sh
|
||||
if [ -z "$VERSION" ]; then
|
||||
echo "VERSION environment variable is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -eux
|
||||
|
||||
# build alpm package
|
||||
echo "Building ALPM package..."
|
||||
|
||||
mkdir -pv alpm
|
||||
envsubst < scripts/package/alpm.PKGINFO > alpm/.PKGINFO
|
||||
|
||||
mkdir -pv alpm/usr/{bin,lib,share/vulkan/implicit_layer.d}
|
||||
cp -v bin/lsfg-vk-ui alpm/usr/bin/lsfg-vk
|
||||
cp -v lib/liblsfg-vk.so alpm/usr/lib/liblsfg-vk.so
|
||||
cp -v share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json alpm/usr/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json
|
||||
|
||||
tar -cvzf "lsfg-vk-$VERSION.x86_64.tar.zst" -C alpm \
|
||||
.PKGINFO usr
|
||||
|
||||
# build dpkg package
|
||||
echo "Building DEB package..."
|
||||
|
||||
mkdir -pv deb/DEBIAN
|
||||
envsubst < scripts/package/dpkg.control > deb/DEBIAN/control
|
||||
|
||||
mkdir -pv deb/usr/{bin,lib,share/vulkan/implicit_layer.d}
|
||||
cp -v bin/lsfg-vk-ui deb/usr/bin/lsfg-vk-ui
|
||||
cp -v lib/liblsfg-vk.so deb/usr/lib/liblsfg-vk.so
|
||||
cp -v share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json deb/usr/share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json
|
||||
|
||||
dpkg-deb --root-owner-group --build deb "lsfg-vk-$VERSION.x86_64.deb"
|
||||
|
||||
# build rpm package
|
||||
echo "Building RPM package..."
|
||||
|
||||
mkdir -pv rpm
|
||||
envsubst < scripts/package/rpm.spec > rpm/lsfg-vk.spec
|
||||
|
||||
mkdir -pv rpm/SOURCES
|
||||
cp -v bin/lsfg-vk-ui rpm/SOURCES
|
||||
cp lib/liblsfg-vk.so rpm/SOURCES
|
||||
cp share/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json rpm/SOURCES
|
||||
|
||||
rpmbuild -bb rpm/lsfg-vk.spec --define "_topdir $(pwd)/rpm"
|
||||
mv -v "rpm/RPMS/x86_64/lsfg-vk-$VERSION-1.x86_64.rpm" "lsfg-vk-$VERSION.x86_64.rpm"
|
||||
|
||||
# cleanup
|
||||
rm -rf alpm deb rpm
|
||||
29
scripts/package/rpm.spec
Normal file
29
scripts/package/rpm.spec
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
Name: lsfg-vk
|
||||
Summary: Lossless Scaling Frame Generation on Linux via DXVK/Vulkan
|
||||
Version: ${VERSION}
|
||||
Release: 1%{?dist}
|
||||
URL: https://discord.gg/losslessscaling
|
||||
Packager: "PancakeTAS <???>"
|
||||
License: MIT
|
||||
Group: Applications/System
|
||||
BuildArch: x86_64
|
||||
|
||||
Requires: glibc >= 2.38
|
||||
Requires: vulkan-loader
|
||||
Requires: libadwaita
|
||||
Requires: gtk4
|
||||
|
||||
%global __strip /bin/true
|
||||
|
||||
%description
|
||||
Lossless Scaling Frame Generation on Linux via DXVK/Vulkan.
|
||||
|
||||
%install
|
||||
install -Dm755 %{_sourcedir}/lsfg-vk-ui %{buildroot}%{_bindir}/lsfg-vk-ui
|
||||
install -Dm644 %{_sourcedir}/liblsfg-vk.so %{buildroot}%{_libdir}/liblsfg-vk.so
|
||||
install -Dm644 %{_sourcedir}/VkLayer_LS_frame_generation.json %{buildroot}%{_datadir}/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json
|
||||
|
||||
%files
|
||||
%{_bindir}/lsfg-vk-ui
|
||||
%{_libdir}/liblsfg-vk.so
|
||||
%{_datadir}/vulkan/implicit_layer.d/VkLayer_LS_frame_generation.json
|
||||
Loading…
Add table
Reference in a new issue