Thanks for sharing your experience. This is on my backlog too. I actually tried to do a build once but mbed-tools had some features missing to automate the build back then. It’s a tough choice between Actions and Docker, on the one hand you have good integration with GitHub, on the other hand you have a more portable approach. I would actually prefer doing it using Docker due to portability, but as your experience shows it has many drawbacks…
Quick question regarding clang-format - recall one of your cmake repos, there was clang format following google style format. Is this own style or similar to what Mbed OS has (K&R with 2 exceptions) ?
I think Docker would be better if you run your own server, jenkins or something else. Then you have full control and you don’t care about the size of the image as you can cache it locally.
Same goes for development toolchains that you can share through a docker image to make sure the whole team uses the same software.
What I did not expect was the amount of stuff you need to install to actually build something on a fresh ubuntu:latest docker image. And don’t get me started with Alpine, I first tried that but it’s a nightmare…
You end up installing tens of packages, and the important ones often don’t have the version I’m actually using on my machine (I run macOS). For example cmake, you need to add the upstream deb repository. Same with the clang toolchain, gcc, etc.
Then you have python. Oh gosh, that’s heavy and something mbed absolutely needs. It makes me wish we can drop it for just building software and optionally install it for not important stuff like pretty table.
As we are using Github Actions and have no plan to change that, using their ubuntu:latest image was actually the easiest. You get many things for free, even homebrew/linuxbrew! So super easy to install new packages.
I think it’s us, the style is based on google with customization. Clang-format can flag issues with formatting and also has a way to fix the issues without breaking the code. It’s amazingly simple to use and we were able to format our whole codebase using that. You can of course exclude folders.