MoonModules / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi! MoonModules adds features on top of upstream.
https://mm.kno.wled.ge
European Union Public License 1.2
228 stars 70 forks source link

Speed up builds by caching build_cache #66

Closed netmindz closed 1 year ago

netmindz commented 1 year ago

Caching of ~/.platformio broken as cache key does not reference the right file, so have state cache that doesn't get updates

Build cache is outside of the ~/.platformio directory, so all the code, including libraries being rebuild for every environment every build

softhack007 commented 1 year ago

Tasmota is putting the build cache inside the main source code folder, maybe that will work for us?

https://github.com/arendst/Tasmota/blob/be88e701d9e5e69d5aafa3c376b4233f3adbb727/platformio.ini#L21

netmindz commented 1 year ago

Tasmota is putting the build cache inside the main source code folder, maybe that will work for us?

https://github.com/arendst/Tasmota/blob/be88e701d9e5e69d5aafa3c376b4233f3adbb727/platformio.ini#L21

But it's also in their .gitignore so will have same impact from a CI perspective.

Might make more sense as location though for local dev. Just if I change would then need to add a third cache for CI unless I override with runtime arg to put it back where I've moved it to now

netmindz commented 1 year ago

Not perfect, but better than it was before so tempted to merge this and can always optimise later

blazoncek commented 1 year ago

FYI I've put mine to a scratch drive using softlink on the disk. Works well, but I do occasionally prune it.

netmindz commented 1 year ago

FYI I've put mine to a scratch drive using softlink on the disk. Works well, but I do occasionally prune it.

This is about the behaviour of CI, not regular local Dev. All filepaths are persistent locally unless they map to ramdisk or similar

softhack007 commented 1 year ago

Not perfect, but better than it was before so tempted to merge this and can always optimise later

@netmindz is this change good for both local dev and ci builds? If yes let's merge.

netmindz commented 1 year ago

Yeah works locally as well