diff --git a/.gitea/workflows/package.yml b/.gitea/workflows/package.yml index 9af728a..63f4ac3 100644 --- a/.gitea/workflows/package.yml +++ b/.gitea/workflows/package.yml @@ -30,6 +30,26 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install the build dependencies + # makepkg runs with --nodeps below, so depends/makedepends are never + # installed by pacman: the Qt6 headers the build needs must already be + # on the runner. Idempotent, so a warm runner costs nothing. + run: | + set -euo pipefail + missing="" + for package in qt6-base cmake gcc make fakeroot; do + pacman -Q "$package" > /dev/null 2>&1 || missing="$missing $package" + done + if [ -z "$missing" ]; then + echo "All the build dependencies are already installed." + exit 0 + fi + if ! sudo -n pacman -S --needed --noconfirm $missing; then + echo "::error::could not install:$missing" + echo '::error::give the runner user passwordless sudo for pacman or preinstall these packages.' + exit 1 + fi + - name: Read the version file id: version run: |