From e6a981e11eb505f3ee12dde90eb7bb9b2186521f Mon Sep 17 00:00:00 2001 From: Daniel Dybing Date: Wed, 14 Jan 2026 15:03:12 +0100 Subject: [PATCH] ci: add Gitea Action for Raspberry Pi ARM64 builds --- .gitea/workflows/build-pi.yaml | 71 ++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .gitea/workflows/build-pi.yaml diff --git a/.gitea/workflows/build-pi.yaml b/.gitea/workflows/build-pi.yaml new file mode 100644 index 0000000..a836e81 --- /dev/null +++ b/.gitea/workflows/build-pi.yaml @@ -0,0 +1,71 @@ +name: Build Raspberry Pi Binary +on: [push, workflow_dispatch] + +jobs: + build-arm64: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: linux/arm64 + + - name: Build in Docker (ARM64) + run: | + # Run the build inside a Python container emulating ARM64 + # We map the current directory to /app + docker run --rm --platform linux/arm64 \ + -v "${{ github.workspace }}:/app" \ + -w /app \ + python:3.11-bookworm \ + /bin/bash -c " + set -e + + # 1. Install System Dependencies required for PySide6/Qt linkage and PyInstaller + apt-get update && apt-get install -y --no-install-recommends \ + libgl1 \ + libegl1 \ + libxkbcommon-x11-0 \ + libdbus-1-3 \ + libfontconfig1 \ + binutils + + # 2. Install Python Dependencies + pip install --upgrade pip + pip install -r requirements.txt + + # 3. Run PyInstaller (Using command from build.sh) + echo 'Running PyInstaller...' + pyinstaller --name 'volvodisplay' \ + --onefile \ + --windowed \ + --clean \ + --noconfirm \ + --add-data 'main.qml:.' \ + --add-data 'TemperatureGauge.qml:.' \ + --exclude-module PySide6.QtWebEngineQuick \ + --exclude-module PySide6.QtWebEngineCore \ + --exclude-module PySide6.QtQuick3DSpatialAudio \ + main.py + + # 4. Copy config + cp config.json dist/ + + # 5. Fix permissions (Docker runs as root, we need to own the files to upload them) + chown -R $(id -u):$(id -g) dist + " + + - name: Upload Binary + uses: actions/upload-artifact@v3 + with: + name: volvodisplay-arm64 + path: dist/volvodisplay + + - name: Upload Config + uses: actions/upload-artifact@v3 + with: + name: config + path: dist/config.json