Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up builds by caching build_cache #66

Merged
merged 9 commits into from
Oct 7, 2023
Merged

Speed up builds by caching build_cache #66

merged 9 commits into from
Oct 7, 2023

Conversation

netmindz
Copy link
Collaborator

@netmindz netmindz commented Aug 14, 2023

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

@netmindz netmindz marked this pull request as ready for review August 14, 2023 20:57
@netmindz netmindz marked this pull request as draft August 14, 2023 21:15
@softhack007
Copy link
Collaborator

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
Copy link
Collaborator Author

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 netmindz marked this pull request as ready for review August 15, 2023 19:07
@netmindz
Copy link
Collaborator Author

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

@blazoncek
Copy link

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

@netmindz
Copy link
Collaborator Author

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
Copy link
Collaborator

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
Copy link
Collaborator Author

netmindz commented Oct 7, 2023

Yeah works locally as well

@softhack007 softhack007 merged commit 2a7767d into mdev Oct 7, 2023
@netmindz netmindz deleted the buildcache branch October 8, 2023 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants