Build project with all platform versions

Hello everyone!

Lately, I’ve been trying to automate the build of a project where every platform version (ststm32@x.y.z) must be compiled, in case of error, re-build with other version.

I’ve thought of doing it through PIO CLI or github actions (already got all tags from repository on an env variable) but I’m stuck since can’t found how to iterate the platform to build.


You can crawl the possible versions from or Tags · platformio/platform-ststm32 · GitHub. With Github actions, you can use a matrix or some helper script.

I seem to be heading in the right direction but still foggy.

@maxgerhardt how would you select the platform for every iteration? I was thinking via a build flag or some CLI command that could help me, but can’t seem to figure how.

The platform has to be given in the platformio.ini as the platform = ststm32@x.y.z line, just like the documentation says.

@maxgerhardt is there any other possibility to access the platform to be built without modifying the platformio.ini inside the project? My thoughts were to build all the platforms on a “single click” (github action job, or python script).


See GitHub Actions — PlatformIO latest documentation, just put all to-be-tested platform versions in the matrix and issue a pio pkg install -g -p ststm32@<version> (docs) command before building, then you can hold platform = ststm32 in the platformio.ini constant.

Thank you very much @maxgerhardt for such thorough answer. Will be testing soon.