Skip to content

Sample configuration for using Raspberry Pi's as Python Github Runners

License

Notifications You must be signed in to change notification settings

ThetomekK/raspberry-pi-python-github-runner

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Python self-hosted GitHub Runner for the Raspberry Pi

Python application on self-hosted Raspberry Pi

Raspberry Pi's can be used as low-configuration self-hosted GitHub Runners. They can do CI builds and tests, and also run periodic jobs using cron syntax:

pi@pi1 ~/actions-runner> ./run.sh

√ Connected to GitHub

2020-10-06 23:24:36Z: Listening for Jobs

This repo solves a problem: GitHub's default Python setup installs X86 binaries and doesn't work on ARM (Raspberry Pi). So, in the process of setting up a new Python app, I extracted this configuration.

Here's a typical Raspberry Pi runner log for this repo. Check out how much detail you get vs. running a simple cron job!

This repo is a minimal Python template application which runs several workflows:

It's also still compatible with MacOS and GitHub's cloud servers.

How to run this yourself

  1. Fork this repo
  2. In your new repo's Settings/Actions, click Add runner and add your Raspberry Pi as a Linux / ARM runner. GitHub's Docs for this
  3. Once the runner is listening for new tasks, make some kind of small commit in your forked repo. You should see tasks sent down to the Raspberry Pi both in the Runner's output and GitHub's Actions tab.

Compatible Pi's

Known working Known not working
Pi 4 Model B 4G RAM w/ Raspberry Pi OS Pi Zero W

These were tested on a Raspberry Pi 4 Model B with 4G RAM, running Raspberry Pi OS. I ran two runners on it simultaneously, and there was tons of RAM leftover. I suspect it'd do fine on a Pi with just 1G RAM.

But for some reason, GitHub's runner client won't run on a Pi Zero W (which has 512MB RAM). The config and run.sh scripts crash with Segmentation fault on startup. The error seems to be around the bin/Runner.Listener invocation. When I try that command on its own, I get “bin/Runner.Listener” terminated by signal SIGSEGV (Address boundary error). I suspect that low memory is the issue. RAM is also the only material difference between the Zero W and 4.

About

Sample configuration for using Raspberry Pi's as Python Github Runners

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%