Some checks failed
Build Raspberry Pi Binary / build-arm64 (push) Failing after 2m3s
72 lines
2.3 KiB
YAML
72 lines
2.3 KiB
YAML
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
|