linguini1 opened a new pull request, #18500: URL: https://github.com/apache/nuttx/pull/18500
## Summary This PR includes `select.py`, which is some initial ground-work for more granular selection of builds. It takes in a list of changed files (say, the output of `git diff --name-only`) and outputs a list of `defconfig` files to be built to test the change set. The benefit is that it _always_ (**) outputs the minimum number of configurations required to fully test the change set. You can find more information in the docs included with this PR, which show some example invocations. ## Impact None right now, besides adding a doc file. This tool is currently not used anywhere in CI, but is a precursor to some modifications I hope to make that reduce the number of builds performed for each PR. I will make those changes once I learn a little bit more about the build selection process and ensure that this solution can be integrated in a way that still allows parallel builds and doesn't require heavy modification of any of the existing tooling. ## Testing Docs: `make autobuild` locally and viewed the render in browser. I have tested this locally using made-up change-sets to see if the output matches the minimum coverage that it should be. In all of my testing so far, the results are looking correct! See some log examples in the included docs with the sample invocations :) ### Relevant example which illustrates benefit Here is one example using the change-set from #18397. This patch only modifies a single board, by adding new board support to the ST Nucleo-H753ZI. The current CI infrastructure marks the PR as `Arch: Arm`, which is currently the largest architecture on NuttX (in terms of `defconfig` files to build). The CI for this PR ran for a little over 14h: https://github.com/apache/nuttx/actions/runs/22040681175/usage If we look at what `select.py` recommends to build to test this patch, we can see that it's much more granular: ```console $ tools/ci/build-selector/select.py boards/arm/stm32h7/nucleo-h753zi/configs/button_driver/defconfig boards/arm/stm32h7/nucleo-h753zi/configs/nsh/defconfig boards/arm/stm32h7/nucleo-h753zi/configs/socketcan/defconfig boards/arm/stm32h7/nucleo-h753zi/include/board.h boards/arm/stm32h7/nucleo-h753zi/include/readme.txt boards/arm/stm32h7/nucleo-h753zi/kernel/Makefile boards/arm/stm32h7/nucleo-h753zi/kernel/stm32_userspace.c boards/arm/stm32h7/nucleo-h753zi/scripts/flash-mcuboot-app.ld boards/arm/stm32h7/nucleo-h753zi/scripts/flash-mcuboot-loader.ld boards/arm/stm32h7/nucleo-h753zi/scripts/flash.ld boards/arm/stm32h7/nucleo-h753zi/scripts/kernel.space.ld boards/arm/stm32h7/nucleo-h753zi/scripts/Make.defs boards/arm/stm32h7/nucleo-h753zi/scripts/memory.ld boards/arm/stm32h7/nucleo-h753zi/scripts/user-space.ld boards/arm/stm32h7/nucleo-h753zi/src/CMakeLists.txt boards/arm/stm32h7/nucleo-h753zi/src/Makefile boards/arm/stm32h7/nucleo-h753zi/src/nucleo-h753zi.h boards/arm/stm32h7/nucleo-h7 53zi/src/stm32_adc.c boards/arm/stm32h7/nucleo-h753zi/src/stm32_appinitialize.c boards/arm/stm32h7/nucleo-h753zi/src/stm32_autoleds.c boards/arm/stm32h7/nucleo-h753zi/src/stm32_boot.c boards/arm/stm32h7/nucleo-h753zi/src/stm32_boot_image.c boards/arm/stm32h7/nucleo-h753zi/src/stm32_bringup.c boards/arm/stm32h7/nucleo-h753zi/src/stm32_buttons.c boards/arm/stm32h7/nucleo-h753zi/configs/nsh/defconfig boards/arm/stm32h7/nucleo-h753zi/configs/button_driver/defconfig boards/arm/stm32h7/nucleo-h753zi/configs/socketcan/defconfig ``` The shortest arm build in the original PR ran for 33 minutes (`arm-12`). It builds 43 configurations. If `select.py` was in charge, 3 configurations would be built. That's roughly 3 minutes of CI usage instead of 14 hours! (if we assume that each build takes approximately the same amount of time). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
