ci: add Gitea Action for Raspberry Pi ARM64 builds
Some checks failed
Build Raspberry Pi Binary / build-arm64 (push) Failing after 2m3s
Some checks failed
Build Raspberry Pi Binary / build-arm64 (push) Failing after 2m3s
This commit is contained in:
71
.gitea/workflows/build-pi.yaml
Normal file
71
.gitea/workflows/build-pi.yaml
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user