Skip to content

Added automatic build pipelines#3

Draft
florian-asche wants to merge 58 commits into
FutureProofHomes:developfrom
florian-asche:develop
Draft

Added automatic build pipelines#3
florian-asche wants to merge 58 commits into
FutureProofHomes:developfrom
florian-asche:develop

Conversation

@florian-asche

@florian-asche florian-asche commented May 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR introduces a complete automated CI/CD pipeline for the Satellite1-RPi project and restructures the repository to improve maintainability, packaging consistency, and release automation.

The changes focus on:

  • Automated GitHub Actions workflows
  • ARM-native and multi-architecture builds
  • Debian packaging improvements
  • Docker-based build standardization
  • Release automation
  • Project structure cleanup and documentation improvements

Main Changes

CI/CD & Build Automation

  • Added automated GitHub Actions workflows for:
    • rpi-kernel-fusb302
    • satellite1-rpi-setup
    • satellite1-rpi Python package
  • Added automated GitHub release creation
    • Tagged builds create releases
    • Branch builds create pre-releases
  • Added changelog generation workflows
  • Added conditional QEMU support for 32-bit builds
  • Switched ARM builds to native ubuntu-24.04-arm runners
  • Added APT package caching to significantly reduce build times

Packaging & Build System Improvements

  • Migrated Python package to a src/ layout
  • Improved setuptools configuration and package discovery
  • Added CLI entry points for satellite control and audio routing
  • Standardized Debian packaging structure
  • Moved packaging files into dedicated debian/ directories
  • Simplified .deb artifact handling
  • Renamed build output directory to out/
  • Improved Docker-based build workflows using docker buildx

Repository Cleanup & Refactoring

  • Reorganized repository structure by task/package
  • Moved Docker-related files into package-specific directories
  • Updated .gitignore for Python build artifacts
  • Removed obsolete files and cleanup leftovers

Documentation

  • Restructured the root README.md
  • Added package-specific README files
  • Added package status overview table
  • Improved documentation discoverability and repository navigation

Benefits

  • Faster and more reliable builds
  • Consistent release/version handling
  • Better maintainability for multi-package development
  • Improved support for ARM and Raspberry Pi targets
  • Cleaner repository structure
  • Easier onboarding for contributors

Notes

  • This PR is primarily infrastructure and build-system focused.
  • No major runtime feature changes are introduced.
  • Existing workflows and packaging paths may need downstream adjustments if external tooling relied on the old repository structure.

This adds the docker/setup-qemu-action to enable QEMU emulation, allowing the kernel to be built for multiple target architectures in the CI pipeline.
- Switch to ubuntu-24.04-arm runner for native ARM builds
- Add APT-cacher-ng proxy to cache package downloads
- Implement cache restoration and saving between builds
- Make QEMU setup conditional (only for 32bit builds)
- Add debug logging for cache operations

These changes significantly reduce build times by avoiding repeated
package downloads and leveraging cached packages across workflow runs.
The build workflow for satellite1-rpi-setup now uses ubuntu-24.04-arm runner to natively
build for ARM64 architecture, avoiding x86_64 emulation issues. APT caching is implemented
using apt-cacher-ng to cache downloaded packages between runs, significantly reducing
build time. The cache is persisted via actions/cache. QEMU is set up for 32-bit builds
when matrix.name is '32bit'. These changes align with the kernel build workflow updates
and improve overall build efficiency for ARM targets.
Add GitHub Release creation to kernel and setup build workflows.
Releases are created as full releases for tags and pre-releases
for branch builds. Added new workflows for release management and
changelog generation.
Introduce a new GitHub Actions workflow for building satellite1 RPi
Python components. Also disable automatic release note generation in
existing kernel and RPi setup workflows.
Remove the upload-artifact step from the satellite1 RPi Python build
workflow to streamline the CI process.
Initialize the docker directory for the satellite1 RPi component to support containerized builds.
Move debian packaging files from `satellite1-rpi/build/` to `satellite1-rpi/debian/` to follow standard project structure and improve organization.
Update the build process and project structure by:
- Adjusting `pyproject.toml` to use the current directory for package discovery.
- Modifying `Makefile` to correctly mount and set the working directory for Docker-based builds.
- Updating `.gitignore` to exclude Python build artifacts like `dist/`, `build/`, and wheels.
- Move all core logic from `satellite1-rpi/satellite1/` to `satellite1-rpi/src/satellite1/`.
Update pyproject.toml to support the new src-based directory structure by adjusting setuptools package discovery. Additionally, define project scripts to expose CLI entry points for satellite control and audio routing.
Inject SETUPTOOLS_SCM_PRETEND_VERSION into the docker build and
dpkg-buildpackage commands to ensure consistent versioning during
the build process.
Remove manual version passing from the Makefile and instead derive
the version directly from the Debian changelog within the debian/rules
file. This ensures that the build process uses the official Debian
versioning automatically.
Update the Makefile to copy the generated .deb files directly to the
output directory and ensure the wheelhouse files are correctly
positioned for the build process.
Refactor the root README.md to provide a high-level overview and package status table, and add individual README.md files to each sub-package to improve documentation discoverability and organization.
@florian-asche florian-asche added documentation Improvements or additions to documentation enhancement New feature or request labels May 15, 2026
Upgrade the entire software stack from Debian Bookworm to Debian Trixie.
This includes updating the custom Raspberry Pi kernel to the 6.18.y
branch, updating Dockerfiles for image building and package
construction, and updating all documentation and configuration files
to reflect the new OS version and kernel release.

- Update `image-builder` to use `debian:trixie` and `pi-gen` trixie branch
- Update `rpi-kernel-fusb302` to use `debian:trixie` and `rpi-6.18.y` kernel
- Update `satellite1-rpi-setup` with new Trixie-based Dockerfile
- Update kernel version references in `Makefile` and `README.md` files
- Update `README.md` to reflect Trixie as the target OS
…ncies

Add libdw-dev and python3 to the Dockerfile to support kernel build
processes and debugging symbol generation.
Update the Debian build process to abort immediately on recipe errors
and implement a fallback mechanism in the SDK post-installation script.

If the initial offline pip installation from the local wheelhouse
fails, the script will now attempt to resolve missing dependencies
via the online index.
Fix the spidev C-extension cross-compilation which was silently failing
in the x86_64 → arm64 Docker build, leaving the wheelhouse without
spidev and causing dpkg --install to fail with:

  ERROR: No matching distribution found for spidev>=3.6

Root causes:
1. .SHELLFLAGS := set -e; in debian/rules was broken syntax (replaces
   the -c flag, breaking multi-line recipe execution entirely).
   Using the standard  POSIX form -e -c.
2. The Docker builder images were missing linux-libc-dev:arm64, which
   provides the linux/spi/spidev.h kernel-userspace header that spidev's
   C extension needs when cross-compiling from x86_64 to arm64.
3. python3-dev:arm64 and SETUPTOOLS_USE_DISTUTILS=stdlib are added to
   ensure the Python headers are available and spidev's legacy setup.py
   (which uses the deprecated install_layout) works with modern
   setuptools.
4. postinst: the fallback from wheelhouse install (--no-index) to online
   pip install was already present from c8cef18; that path is retained as
   a secondary safety net.

Signed-off-by: Florian Asche <github@florian-asche.de>
Update spidev to version 3.8 and remove platform constraints from
RPi.GPIO to ensure compatibility with the updated build environment.
Update `requires-python` to specify a range compatible with the
recent OS upgrade, ensuring compatibility with Python 3.12 while
preventing potential issues with Python 3.13.
Update the base images for both bookworm and trixie Dockerfiles
from python:3.11-slim to python:3.12-slim to align with the updated
python version requirements.
Expand the supported python version range to include 3.11, ensuring
compatibility with environments that have not yet transitioned to 3.12.
Remove python3-venv, python3-pip, and related packaging tools from
the debian build Dockerfiles as they are no longer required for the
current build process.
Add python3-all, python3-setuptools, python3-wheel, and python3-setuptools-scm
to the packaging stack in the Bookworm and Trixie Dockerfiles to ensure
a complete build environment for python-based packages.
Ensure compatible versions of setuptools and setuptools-scm are installed
within the build virtual environment to support modern packaging features.
Split setuptools-scm installation and add --no-build-isolation to
pip wheel command to ensure consistent builds using the venv
environment. Added PYTHONPATH to include venv site-packages and
dist-packages during the wheelhouse creation process.
Update debian build rules to replace direct pip wheel execution with
the `python3 -m build` module. This simplifies the build process and
removes the need for manual PYTHONPATH manipulation. Added
`python3-setuptools-scm` to Build-Depends and included `build` in the
venv installation to support this transition.
Pass SETUPTOOLS_USE_DISTUTILS=stdlib to dh_auto_install to ensure
compatibility with the existing installation process during the
debian build lifecycle.
Introduce a dedicated build.env file to manage environment variables
used during the Debian packaging process.
Modify the build target to ensure both the generated .deb files and
the wheelhouse files are correctly copied to the output directory.
Include python3-setuptools-scm in the Dockerfiles for both bookworm
and trixie arm64 images to support version discovery during the
build process.
Update pyproject.toml to allow python versions greater than or equal to 3.11, removing the upper bound constraint of 3.13.
Update pydantic and pydantic-settings to newer versions to ensure compatibility and access to recent features/fixes.
Change pydantic dependency from a minimum version requirement to an exact version match to ensure environment consistency.
Update pydantic and pydantic-settings dependencies to allow for minor and patch version updates within the major version 2 range. This prevents dependency conflicts while maintaining compatibility.
Add missing commas to the pydantic dependency declarations to ensure valid TOML parsing.
Unset PIP_NO_INDEX during the retry attempt to allow the installer
to fetch missing dependencies from the online index if the local
wheelhouse installation fails.
…inst

Update the postinst script to not only reload the systemd daemon
but also enable and start the satellite1-init.service immediately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant