This is a small infrastructure change for us, but you can also follow this for your own projects, if you already use GitHub Actions to build your applications.
For some time, we have been using self-hosted real Raspberry Pi machines to build our releases (of Castle Game Engine, Castle Model Viewer and PasDoc) for Raspberry Pi. This includes 32-bit Raspberry Pi (with support also for older OS version, based on Debian bullseye) and 64-bit Raspberry Pi (with support for OS versions >= based on Debian bookworm).
However I was doing tests to see can we use GitHub-hosted Linux runners (thus, available for free, and maintained for us) to build our releases for Raspberry Pi. The idea is to run Raspberry Pi in a virtual machine (not only do cross-compilation to it) to be able to also run tests on it.
Turns out there’s a ready ARM runner GitHub Action that does exactly this. Examples of using this for Pascal applications:
- I’ve done testing can we use it reliably to build FPC + Castle Game Engine applications, which you can see in the repository michaliskambi/test-arm-runner-for-cge. The workflow file inside shows how to build CGE application for Raspberry Pi using this runner.
-
I adjusted PasDoc snapshots building to use it. See PasDoc workflow here.
-
See also Castle Game Engine workflow.
-
See also Castle Model Viewer workflow.
We have switched all our projects to building Raspberry Pi releases using this approach now.
Start the discussion at Castle Game Engine Forum