AWS Codebuild buildspec.yml to compile an ESP32 project in PlatformIO

Interesting, PlatformIO doesn’t have docs for setting that up yet. Current docs. Can you file an issue in Issues · platformio/platformio-docs · GitHub for that?

If you look at the docs, every build process basically goes the same (example Github Actions):

  • spin up a Ubuntu/Mac/Windows machine
  • Checkout the project to compile
  • Install Python (e.g., 3.9)
  • Install the PlatformIO core (pip install --upgrade platformio)
  • Execute pio run in the project to compile.
  • (Optional: Cache PlatformIO and PIP for faster reinstall times next time)

It really doesn’t get simpler than that.

Other people have setup Docker containers that have PlatformIO preinstalled: New Docker Image.

Of course, using a rather simple Dockerfile, you could also fork from the official Python image, pip install platformio in there and be done.

I see 0 reason why one would need a graphical VSCode install in the CI. Use the PIO core standalone, that’s all you need to build stuff. (And upload. And test. And do code checks. And remote-upload and remote-test. The core has all the needed logic.)

1 Like