-
Notifications
You must be signed in to change notification settings - Fork 30
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
[script] leverage slc
SDK cache and add ccache
to speedup incremental builds
#873
Conversation
6c9d6b5
to
ff16ca8
Compare
f74f2f2
to
49834ac
Compare
This provides a small speed-up when working with SLC Also, remove the `--clear-cache` option to leverage SLC's SDK component cache
49834ac
to
8d6b422
Compare
slc
SDK cache and add ccache
to speedup incremental builds
@lmnotran There should be no user facing changes from this, I assume? One would continue to use slc as before and just notice improvements when iterating on a build? Are there any pitfalls to watch out for / build dirs to clear if we do want a fresh build? |
Nope! There are no user-facing changes. Users will continue to build in the same way as they have been before. They don't even need to install/use
Nope! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
8d6b422
to
d444ac8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - do we want to squash commits?
Squash on merge is fine. I'd like to keep them separate in the branch though. They're all independent and separate changes/ideas |
@jwhui could you review this when you get a chance please? Thanks! |
Summary of changes
slc
--clear-cache
flag to leverage SDK cacheslc
startup timeccache
to build scripts for potential build speedups. See more belowCCache
When building with no compiler cache, the build proceeds as normal and takes a normal amount of time. For the
Build/arm-gcc-*
workflows, it usually takes ~20-30 min for the workflow to run completely.Example:
Build/arm-gcc-12.2.Rel1
(no compiler cache)Example:
Build/arm-gcc-12.2.Rel1
(with compiler cache)These performance gains are not limited to GitHub actions builds. CCache has been added to the
script/build
andscript/build-example-apps
scripts, meaning builds on development machines will also benefit from the same speedup potential.One thing to note is that
ccache
will bring the most benefit when iterating on changes. Of course, the speedup will be reduced in scenarios where the cache cannot be leveraged, including but not limited to the first build when building for a board you haven't built before, switching branches, or making any wide-reaching changes.