From 096553e4293f7fff66e4d33818e286ee0910cf4f Mon Sep 17 00:00:00 2001 From: BlackAngelTV Date: Sat, 29 Aug 2026 20:50:49 +0200 Subject: [PATCH] ci(tests): install dependencies via the host package manager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Host-mode runners execute jobs directly on the runner machine, so apt fails on non-Debian hosts. Detect pacman/apt/dnf so the test workflow runs on any Linux host, and pull in git as a safety net for checkout. 🤖 Generated with Codebuff Co-Authored-By: Codebuff --- .gitea/workflows/test.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index d094f74..d89020c 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -20,9 +20,23 @@ jobs: - name: Install dependencies run: | - sudo apt-get update - sudo apt-get install -y \ - cmake g++ make qt6-base-dev + # Host-mode runners execute jobs directly on the runner machine, so + # detect its package manager instead of hardcoding apt (which only + # exists on Debian/Ubuntu hosts). + if command -v pacman >/dev/null 2>&1; then + sudo pacman -S --noconfirm --needed \ + git cmake gcc make qt6-base + elif command -v apt-get >/dev/null 2>&1; then + sudo apt-get update + sudo apt-get install -y \ + git cmake g++ make qt6-base-dev + elif command -v dnf >/dev/null 2>&1; then + sudo dnf install -y \ + git cmake gcc-c++ make qt6-qtbase-devel + else + echo "Unsupported package manager: install git, cmake, a C++ compiler, make and Qt6 manually" >&2 + exit 1 + fi - name: Configure run: |