Project Soon

Runner

Until just recently I found that I neglected the cross-compilation part of PixelMap to such degree that it stopped working. I already was using Jenkins 1 with three VMs of Linux, Windows and Mac respective, but they were rather difficult to handle as I had to manually go into each to make things work. As I had set up Forgejo, I decided to also set up a runner 2, which would automatically compile, test and release artifacts 3.

After setting up a VM with docker 4, I set up the runner as a general service, pointing at my Forgejo instance for requests. Reading some about how Forgejo handles actions from repositories 5, I wrote a workflow 6. But before pushing it, I had to create docker images that can actually build my projects. In addition, creating everything in beforehand will make the complete build much faster, as everything that is needed to build the projects will be available without having to fetch additional tools.

For Linux, it was quite easy, as it just required the regular node image, along with the tools I use when building in C++.

1
2
3
# syntax=docker/dockerfile:1
FROM node:20-bookworm
RUN apt-get update && apt-get install -y build-essential cmake libgtk-3-dev rpm jq

To make it easier for me to handle images, I create them in a development environment, and then upload them to a locally hosted docker registry 7, which the runner can fetch from. I later learned that Forgejo has their own registry 8, but I doubt I want to upload whole images to it.


  1. https://www.jenkins.io/ ↩︎

  2. https://forgejo.org/docs/latest/admin/runner-installation/ ↩︎

  3. https://forgejo.org/docs/next/user/actions/#artifacts ↩︎

  4. https://wiki.alpinelinux.org/wiki/Docker ↩︎

  5. https://docs.github.com/en/actions ↩︎

  6. https://forgejo.org/docs/v7.0/user/actions/ ↩︎

  7. https://docs.docker.com/get-started/docker-concepts/the-basics/what-is-a-registry/ ↩︎

  8. https://forgejo.org/docs/latest/user/packages/ ↩︎