Distributed compilation of esphome

Hello,

I’m looking for a way to distribute esphome firmware compilation against multiple hosts. I’m known that is possible for C/C++ code (eg. with distccd), but their is a way with esphome ?

Thanks !

Really? It’s not a big job. Hardly worth the bother.

When you host esphome on a RPI and you have more than 20 devices, compile a new firmware for each of them could take more than one hour of CPU time. I think I could clearly reduce this time by distributed the compilation with my laptop’s CPU more than 10 times powerful than an RPI4’s CPU! So, no, I think my question is legit.

Install esphome on the more powerful machine then.

Yes I do see the problem on a pi. Perhaps a search for distributed compilation on platformio would reveal results.

1 Like

I’m curious if a solution was ever found for this

No, I moved my ESPhome installation on a powerful host and I stopped to handle all upgrades. I also writed a python script to trigger all devices upgrades: I run it in a screen terminal. If you found a solution, I’m still interested! :slightly_smiling_face:

1 Like

I was also looking into this to be honest (this Thread popped up quite high in Google Search :grinning:).

I guess that, if distcc or similar is NOT possible, then I’d setup an automatic builder VM using esphome compile and put the resulting Firmware (and configuration etc) on a Shared Network Folder.

Then, instead of running esphome run I’ll just do esphome upload on another (with USB connected ESP32 Device), assuming that will work without re-triggering a compile.