DietPi icon indicating copy to clipboard operation
DietPi copied to clipboard

how do I build a binary for DietPI in CI?

Open coderofsalvation opened this issue 3 years ago • 3 comments

Hi, I would like to build an AppImage (non-critical music sofware) which runs on DietPI. To build AppImage-binaries, I use CI (like travis/appveyor) for this. Basically I need to clone a repo, run cmake, and that's it. Is there a CI-file you can point me to, which I can use as a reference? Should I use qemu or something?

kind regards,

(and thanks for making/maintaining DietPI!)

coderofsalvation avatar Sep 08 '22 07:09 coderofsalvation

Hi, DietPi is based on Debian, so any binary built for that (or just Linux in general) should work. However, depending on the device you're running it on, you may have to build for the arm architecture instead of x86.

ravenclaw900 avatar Sep 08 '22 12:09 ravenclaw900

You can have a look into our CI build jobs and scripts, e.g. here for vaultwarden: https://github.com/MichaIng/DietPi/blob/master/.build/software/vaultwarden/container_build.bash

We host a set of container images for all supportes architectures and Debian versions, which we download, mount as loop device and "boot" via systemd-nspawn, in case QEMU emulated on the (x86_64) GitHub actions runner.

But a matching Debian Docker container would do as well, of course.

MichaIng avatar Sep 08 '22 16:09 MichaIng

thank you for that shellscript, I think it'll be a nice starting point (adding some dependencies etc) to build something inside dietpi.

coderofsalvation avatar Sep 11 '22 17:09 coderofsalvation

I'll mark this as closed. Feel free to reopen if required.

MichaIng avatar Nov 24 '22 12:11 MichaIng