cardonabits / haxo-hw

Haxophone, an electronic musical instrument that resembles a saxophone
Other
618 stars 19 forks source link

Design a proper image release pipeline #72

Closed jcard0na closed 8 months ago

jcard0na commented 8 months ago

At the moment, releasing images for the haxophone is very time consuming.

It involves building https://github.com/cardonabits/haxo-rs for each of the 4 supported targets (RPi3, RPi4, Zero and Zero2). As cross-compilation is not quite working, at the moment builds need to be done in actual hardware.

Then a blank Raspian OS image needs to be provisioned, that is, configured, service installed, etc. And then the image needs to be released to the world.

An experienced release engineer could probably automate this pipeline and make periodic releases. Anyone interested in helping here?

petermoz commented 8 months ago

Hi Javier, I spent longer on this than I'd like to admit, but I finally got a cross-compilation setup working for the RPi Zero :)

https://github.com/petermoz/haxo-rs/tree/cross/docker I've tested in on Linux and Mac M1, and both build images that run on my RPi Zero. There's a few things to fix before I open a pull request, but thought you might be interested to see it.

Of course this is only part of building an OS image, but we could consider using it to make binary releases just for the haxo-rs software.

jcard0na commented 8 months ago

Oh, @petermoz, this would be a fantastic contribution 😍 ! I failed to get this approach to work when I tried, even if I have experience using docker for cross compilation into other targets. There were some issues specific to the RPi that were throwing me off, but it looks like you're past that. Yeah! Happy to test/review when you tell me to do it. I guess the ultimate goal is to hook this up to Google Actions and kiss goodby to manual image releases... 🦾

petermoz commented 8 months ago

I failed to get this approach to work when I tried, even if I have experience using docker for cross compilation into other targets. There were some issues specific to the RPi that were throwing me off, but it looks like you're past that.

Yeah it was very painful, but I ended up piecing together a couple of different guides (references in the code) to get something that works. I've opened an MR on the haxo-rs repo.

jcard0na commented 8 months ago

We can open new issues for other targets and/or improvements, but I think we can call this DONE :heavy_check_mark:

image