Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
During the development of the home assistant addon, I had the problem that building the dockerfile took a long time to complete since it always needed to build all dependencies from scratch.
This PR splits compilation of the rust application into 3 stages:
and adds caching support to the github workflow. Each stage / layer will then only need to be recompiled when their dependencies change, reducing the build time from almost an hour to just a few of minutes for minor code changes (In my experience, <1 minute on my home assistant pi4, <5 minutes for the workflow).
I also removed the "platform" argument in the qemu step of the workflow since it probably isn't necessary and didn't have any effect anyway (would need to be renamed to "platforms" to take effect)