Files
Louis Labeyrie b33eb0135d ci: add step to install and test package binaries
fixes: #7774

Signed-off-by: Louis Labeyrie <labeyrielouis@gmail.com>
2026-02-11 13:10:41 +00:00

50 lines
1.7 KiB
YAML

name: "Test Package"
description: "Installs the built package and verifies the installed binaries can run"
inputs:
like:
description: "Used only on linux distro type: debian, fedora, suse, arch"
required: false
default: ""
runs:
using: "composite"
steps:
- name: Test package
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
dmg=$(ls build/deskflow-*.dmg | head -1)
echo "Y" | hdiutil attach "$dmg" -nobrowse -mountpoint /tmp/deskflow-dmg
/tmp/deskflow-dmg/Deskflow.app/Contents/MacOS/deskflow-core --version
hdiutil detach /tmp/deskflow-dmg
elif [ "$RUNNER_OS" == "Windows" ]; then
7z x build/deskflow-*-portable.7z -otmp/deskflow-pkg
exe=$(find tmp/deskflow-pkg -name "deskflow-core.exe" -type f | head -1)
exe_dir=$(dirname "$exe")
pkg_root=$(dirname "$exe_dir")
export PATH="$exe_dir:$pkg_root:$pkg_root/lib:$PATH"
"$exe" --version
elif [ "$RUNNER_OS" == "Linux" ]; then
if [ "${{inputs.like}}" == "debian" ]; then
apt-get install -y ./build/deskflow-*.deb
elif [ "${{inputs.like}}" == "fedora" ]; then
dnf install -y build/deskflow-*.rpm
elif [ "${{inputs.like}}" == "suse" ]; then
zypper install -y --allow-unsigned-rpm build/deskflow-*.rpm
elif [ "${{inputs.like}}" == "arch" ]; then
pacman -U --noconfirm build/deskflow-*.pkg.tar.zst
else
echo "Unknown like: ${{inputs.like}}"
exit 1
fi
deskflow-core --version
else
echo "Unknown OS: $RUNNER_OS"
exit 1
fi