ci: use pure python dependency management and eliminate apt package conflicts in runners
CI Test Suite / Run Component Tests & Pipeline Verification (push) Failing after 10s

This commit is contained in:
2026-09-25 22:29:08 +02:00
parent f7584320f9
commit 8c6d3f57f9
2 changed files with 32 additions and 30 deletions
+16 -16
View File
@@ -20,25 +20,25 @@ jobs:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install System Dependencies & Python - name: Install Dependencies
run: | run: |
if command -v apt-get >/dev/null 2>&1; then # 1. Ensure Python3 is present; try apt-get only if missing
export DEBIAN_FRONTEND=noninteractive if ! command -v python3 >/dev/null 2>&1; then
if [ -f /etc/apt/sources.list ]; then if command -v apt-get >/dev/null 2>&1; then
sed -i 's|deb.debian.org/debian-security bullseye-security|security.debian.org/debian-security bullseye-security|g' /etc/apt/sources.list 2>/dev/null || true export DEBIAN_FRONTEND=noninteractive
fi apt-get update -y || true
rm -rf /var/lib/apt/lists/* apt-get install -y --no-install-recommends python3 || true
apt-get update -y || apt-get update --fix-missing -y || true
apt-get install -y --no-install-recommends python3 python3-pip python3-venv curl || apt-get install -y --fix-missing python3 python3-pip python3-venv curl || true
fi
if ! command -v pip3 >/dev/null 2>&1 && ! python3 -m pip --version >/dev/null 2>&1; then
if command -v curl >/dev/null 2>&1; then
curl -sS https://bootstrap.pypa.io/get-pip.py | python3 || true
fi fi
fi fi
python3 -m pip install --upgrade pip --break-system-packages || python3 -m pip install --upgrade pip || true
python3 -m pip install -r compilation/requirements.txt --break-system-packages || python3 -m pip install -r compilation/requirements.txt || pip3 install -r compilation/requirements.txt
# 2. Bootstrap pip via ensurepip or get-pip.py
if ! python3 -m pip --version >/dev/null 2>&1; then
python3 -m ensurepip --default-pip 2>/dev/null || (python3 -c "import urllib.request; urllib.request.urlretrieve('https://bootstrap.pypa.io/get-pip.py', '/tmp/get-pip.py')" && python3 /tmp/get-pip.py --break-system-packages 2>/dev/null || python3 /tmp/get-pip.py 2>/dev/null || true)
fi
# 3. Upgrade pip and install project dependencies
python3 -m pip install --upgrade pip --break-system-packages 2>/dev/null || python3 -m pip install --upgrade pip 2>/dev/null || true
python3 -m pip install -r compilation/requirements.txt --break-system-packages 2>/dev/null || python3 -m pip install -r compilation/requirements.txt
- name: Verify Python Syntax - name: Verify Python Syntax
run: | run: |
@@ -64,7 +64,7 @@ jobs:
# 3. Poll Hermes health / report endpoint until server is listening # 3. Poll Hermes health / report endpoint until server is listening
READY=0 READY=0
for i in $(seq 1 20); do for i in $(seq 1 20); do
if curl -s http://127.0.0.1:8443/api/hermes/report >/dev/null 2>&1; then if python3 -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8443/api/hermes/report', timeout=1)" >/dev/null 2>&1; then
echo "[+] LOGAR Server is ready after ${i}s." echo "[+] LOGAR Server is ready after ${i}s."
READY=1 READY=1
break break
+16 -14
View File
@@ -21,22 +21,24 @@ jobs:
- name: Install Python and Build Dependencies - name: Install Python and Build Dependencies
run: | run: |
if command -v apt-get >/dev/null 2>&1; then # 1. Ensure Python3 is present; try apt-get only if missing
export DEBIAN_FRONTEND=noninteractive if ! command -v python3 >/dev/null 2>&1; then
if [ -f /etc/apt/sources.list ]; then if command -v apt-get >/dev/null 2>&1; then
sed -i 's|deb.debian.org/debian-security bullseye-security|security.debian.org/debian-security bullseye-security|g' /etc/apt/sources.list 2>/dev/null || true export DEBIAN_FRONTEND=noninteractive
fi apt-get update -y || true
rm -rf /var/lib/apt/lists/* apt-get install -y --no-install-recommends python3 || true
apt-get update -y || apt-get update --fix-missing -y || true
apt-get install -y --no-install-recommends python3 python3-pip python3-venv binutils zip curl || apt-get install -y --fix-missing python3 python3-pip python3-venv binutils zip curl || true
fi
if ! command -v pip3 >/dev/null 2>&1 && ! python3 -m pip --version >/dev/null 2>&1; then
if command -v curl >/dev/null 2>&1; then
curl -sS https://bootstrap.pypa.io/get-pip.py | python3 || true
fi fi
fi fi
python3 -m pip install --upgrade pip --break-system-packages || python3 -m pip install --upgrade pip || true
python3 -m pip install pyinstaller -r compilation/requirements.txt --break-system-packages || python3 -m pip install pyinstaller -r compilation/requirements.txt || pip3 install pyinstaller -r compilation/requirements.txt # 2. Bootstrap pip via ensurepip or get-pip.py
if ! python3 -m pip --version >/dev/null 2>&1; then
python3 -m ensurepip --default-pip 2>/dev/null || (python3 -c "import urllib.request; urllib.request.urlretrieve('https://bootstrap.pypa.io/get-pip.py', '/tmp/get-pip.py')" && python3 /tmp/get-pip.py --break-system-packages 2>/dev/null || python3 /tmp/get-pip.py 2>/dev/null || true)
fi
# 3. Upgrade pip and install pyinstaller + dependencies
python3 -m pip install --upgrade pip --break-system-packages 2>/dev/null || python3 -m pip install --upgrade pip 2>/dev/null || true
python3 -m pip install pyinstaller -r compilation/requirements.txt --break-system-packages 2>/dev/null || python3 -m pip install pyinstaller -r compilation/requirements.txt
- name: Compile Standalone Linux Binaries - name: Compile Standalone Linux Binaries