-
Notifications
You must be signed in to change notification settings - Fork 92
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
feat(Build): Optimize Build Examples Test #1135
feat(Build): Optimize Build Examples Test #1135
Conversation
Wasn't aware of this side effect. Can add a grep to the git diff to look for the different types. and push them into the correct jobs too. |
6ee8963
to
720d462
Compare
@EricB-ADI looks like it just needed a rebase, I'd already had the workflow checking out I updated the build system to pass through CFS relies on If you can check out this branch and make some tests that'd be helpful to see if I missed any edge cases. This will test any local modifications git diff --name-only > change_files
python .github/workflows/scripts/build.py --change_file change_files |
Are we happy with the speedup or do we want to go further? |
@EricB-ADI I think I'm happy with these initial results for small incremental changes, which will now only re-test micros that are directly dependent. In those cases we go from 47m -> ~5m. We could definitely still speed up the full runs following your suggestion to parallelize the job into separate jobs for each micro. The script currently supports that mechanism with the The work would mainly be on the Github Actions side to break the job out into separate conditional stages. I think I'd prefer to start with this first pass to see how much of an improvement we get in practice and to stress test the dependency mapping. |
Description
Closes #1121
The
.github/workflows/scripts/build.py
script now accepts a--change_files
optional argument.It takes about 40s to generate the dependency map on the Github runners.
Now, if a change is made to Cordio only the BLE micros will be re-tested. If a change is made to only one micro's examples, the other micros will not be fully re-tested either.
Also optimized the number of
clean.cordio
calls. A special case is still needed (see cd1bf5b) but this is a big help.Overall this should speed up the workflow. Full run 47m -> 29m, and should reduce unnecessary full runs.
TODO
The granularity of the dependency map can be improved in the future. This first implementation is not
meXX
orrev_XX
-aware, so a change in PeriphDrivers will rebuild everything.Dependencies could also be saved per example so that only relevant examples are tested. There will be some tradeoff in the script complexity and dependency map creation time for this.
Clean up the watch files step to use the new change file action