-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[FEATURE] Enhance the CI Workflow to skip the Unmodified Architectures #13775
[FEATURE] Enhance the CI Workflow to skip the Unmodified Architectures #13775
Comments
Hi @lupyuen I think that a further margin of reduction of the generalized time of the jobs is possible with these simple solutions:
|
Thanks @simbit18! Your suggestions are excellent, I think we can implement them carefully after we have rolled out the solution above. I still have lots to learn about the Storage Folder and CMake :-) |
This PR proposes to enhance the CI Workflow, to skip the unnecessary NuttX Builds. Currently, NuttX Devs wait for the CI Builds to complete across All Architectures (Arm32, Arm64, RISC-V, Xtensa), even though they modified a Single Architecture. With this PR, the CI Workflow will build only the Modified Architecture. The solution uses the Arch Labels for PRs. We target only the Simple PRs: One Arch Label + One Size Label (e.g. "Arch: risc-v, Size: XS") - If "Arch: arm / arm64" is the only non-size label, then we build `other`, `arm-01`, `arm-02`, ... - If "Arch: risc-v" is the only non-size label, then build `risc-v-01`, `risc-v-02` - If "Arch: xtensa" is the only non-size label, then build `xtensa-01`, `xtensa-02` - The above rules apply when the PR is Created or Modified - When the PR is Merged: All targets shall be built The code is explained here: apache#13775
This PR proposes to enhance the CI Workflow, to skip the unnecessary NuttX Builds. Currently, NuttX Devs wait for the CI Builds to complete across All Architectures (Arm32, Arm64, RISC-V, Xtensa), even though they modified a Single Architecture. With this PR, the CI Workflow will build only the Modified Architecture. The solution uses the Arch Labels for PRs. We target only the Simple PRs: One Arch Label + One Size Label (e.g. "Arch: risc-v, Size: XS") - If "Arch: arm / arm64" is the only non-size label, then we build `other`, `arm-01`, `arm-02`, ... - If "Arch: risc-v" is the only non-size label, then build `risc-v-01`, `risc-v-02` - If "Arch: xtensa" is the only non-size label, then build `xtensa-01`, `xtensa-02` - The above rules apply when the PR is Created or Modified - When the PR is Merged: All targets shall be built The code is explained here: #13775
Great ! That's what I had in mind when creating new labels.
I think so. Another approach is to add "Platform" label which detect more precisely the arch used (like "Platform: STM32"), but then the problem of having too many labels may occur. Or we can add "Platform" labels for some of the most popular chips that are most frequently modified or they use CI the most. |
Thanks @raiden00pl! Yep I wonder about the order of workflows. If we look at a Typical CI Run:
We see some improvements: Arm32 builds now complete in 2 hours (instead of 2 hours 15 mins). And we save on runners for RISC-V, Xtensa, Sim. What's Next:
Update: All Done! Check the PRs below |
This PR continues to enhance the CI Workflow, to skip the unnecessary NuttX Builds. The changes in this PR will not take effect until the next PR, which will switch `build.yml` to use the rules in this PR. In this PR, we refactor the CI Build Rules into a separate Reusable Workflow `arch.yml`. The original rules were migrated to `arch.yml`: - We target only the Simple PRs: One Arch Label + One Size Label (e.g. "Arch: risc-v, Size: XS") - For "Arch: arm / arm64": Build `other`, `arm-01`, `arm-02`, ... - For "Arch: risc-v": Build `risc-v-01`, `risc-v-02` - For "Arch: xtensa": Build `xtensa-01`, `xtensa-02` - The above rules apply when the PR is Created or Modified - When the PR is Merged: All targets shall be built New and Updated Rules: - For "Arch: simulator": Build `sim-01`, `sim-02` - For "Arch: x86_64": Build `other` - For Simple PRs (One Arch Label + One Size Label): Skip the macOS and Windows builds (`macos`, `macos/sim-*`, `msys2`) since these builds are costly - Except for "Arch: Simulator", which will enable the macOS Builds for `sim-01` and `sim-02` The code is explained here: apache#13775
This PR continues to enhance the CI Workflow, to skip the unnecessary NuttX Builds. The changes in this PR will not take effect until the next PR, which will switch `build.yml` to use the rules in this PR. In this PR, we refactor the CI Build Rules into a separate Reusable Workflow `arch.yml`. The original rules were migrated to `arch.yml`: - We target only the Simple PRs: One Arch Label + One Size Label (e.g. "Arch: risc-v, Size: XS") - For "Arch: risc-v": Build `risc-v-01`, `risc-v-02` - For "Arch: xtensa": Build `xtensa-01`, `xtensa-02` - The above rules apply when the PR is Created or Modified - When the PR is Merged: All targets shall be built New and Updated Rules: - For "Arch: arm": Build `arm-01`, `arm-02`, ... - For "Arch: arm64": Build `other` - For "Arch: simulator": Build `sim-01`, `sim-02` - For "Arch: x86_64": Build `other` - For Simple PRs (One Arch Label + One Size Label): Skip the macOS and Windows builds (`macos`, `macos/sim-*`, `msys2`) since these builds are costly and slow - Except for "Arch: Simulator", which will enable the macOS Builds for `sim-01` and `sim-02` - If GitHub CLI Fails: Build all targets The code is explained here: apache#13775
This PR continues to enhance the CI Workflow, to skip the unnecessary NuttX Builds. The changes in this PR will not take effect until the next PR, which will switch `build.yml` to use the rules in this PR. In this PR, we refactor the CI Build Rules into a separate Reusable Workflow `arch.yml`. The original rules were migrated to `arch.yml`: - We target only the Simple PRs: One Arch Label + One Size Label (e.g. "Arch: risc-v, Size: XS") - For "Arch: risc-v": Build `risc-v-01`, `risc-v-02` - For "Arch: xtensa": Build `xtensa-01`, `xtensa-02` - The above rules apply when the PR is Created or Modified - When the PR is Merged: All targets shall be built New and Updated Rules: - For "Arch: arm": Build `arm-01`, `arm-02`, ... - For "Arch: arm64": Build `other` - For "Arch: simulator": Build `sim-01`, `sim-02` - For "Arch: x86_64": Build `other` - For Simple PRs (One Arch Label + One Size Label): Skip the macOS and Windows builds (`macos`, `macos/sim-*`, `msys2`) since these builds are costly and slow - Except for "Arch: Simulator", which will enable the macOS Builds for `sim-01` and `sim-02` - If GitHub CLI Fails: Build all targets The code is explained here: #13775
This PR continues to enhance the CI Workflow, to skip the unnecessary NuttX Builds. The PR will update the CI Build Workflow `build.yml`, to call the Refactored Build Rules in `arch.yml` (which is a Reusable Workflow). The original rules were migrated from `build.yml` to `arch.yml`: - We target only the Simple PRs: One Arch Label + One Size Label (e.g. "Arch: risc-v, Size: XS") - For "Arch: risc-v": Build `risc-v-01`, `risc-v-02` - For "Arch: xtensa": Build `xtensa-01`, `xtensa-02` - The above rules apply when the PR is Created or Modified - When the PR is Merged: All targets shall be built This PR applies the New and Updated Rules defined in `arch.yml`: - For "Arch: arm": Build `arm-01`, `arm-02`, ... - For "Arch: arm64": Build `other` - For "Arch: simulator": Build `sim-01`, `sim-02` - For "Arch: x86_64": Build `other` - For Simple PRs (One Arch Label + One Size Label): Skip the macOS and Windows builds (`macos`, `macos/sim-*`, `msys2`) since these builds are costly and slow - Except for "Arch: Simulator", which will enable the macOS Builds for `sim-01` and `sim-02` - If GitHub CLI Fails: Build all targets The code is explained here: apache#13775
This PR continues to enhance the CI Workflow, to skip the unnecessary NuttX Builds. The PR will update the CI Build Workflow `build.yml`, to call the Refactored Build Rules in `arch.yml` (which is a Reusable Workflow). The original rules were migrated from `build.yml` to `arch.yml`: - We target only the Simple PRs: One Arch Label + One Size Label (e.g. "Arch: risc-v, Size: XS") - For "Arch: risc-v": Build `risc-v-01`, `risc-v-02` - For "Arch: xtensa": Build `xtensa-01`, `xtensa-02` - The above rules apply when the PR is Created or Modified - When the PR is Merged: All targets shall be built This PR applies the New and Updated Rules defined in `arch.yml`: - For "Arch: arm": Build `arm-01`, `arm-02`, ... - For "Arch: arm64": Build `other` - For "Arch: simulator": Build `sim-01`, `sim-02` - For "Arch: x86_64": Build `other` - For Simple PRs (One Arch Label + One Size Label): Skip the macOS and Windows builds (`macos`, `macos/sim-*`, `msys2`) since these builds are costly and slow - Except for "Arch: Simulator", which will enable the macOS Builds for `sim-01` and `sim-02` - If GitHub CLI Fails: Build all targets The code is explained here: #13775
CI Build Job `arm-05` (runtime 2 hours) has become the Performance Bottleneck for CI Workflow. That's because `arm-05` builds too many targets for nRF, RP2040, SAM 3, SAM A and SAM D. This PR splits `arm-05` into multiple smaller jobs, to reduce the CI Build Duration. Before the PR: `arm-05` is overloaded, build requires 2 hours - `arm-05` (2 hours): nRF, RP2040, SAM 3, SAM A, SAM D - `arm-06` (56 mins): STM32 [a-m]* After the PR: `arm-05` is offloaded (to `arm-06` and `arm-07`), completes within 1 hour - `arm-05` (47 mins): nRF - `arm-06` (1 hour): Reserve for RP2040 exclusively - `arm-07` (1 hour 15 mins): SAM 3, SAM A, SAM D, STM32 [a-m]* Build Jobs are sorted by Target Name. So we cascade the changes and rename the Build Jobs: `arm-07` becomes `arm-08`, `arm-08` becomes `arm-09` etc. Then `arm-13` becomes a new job `arm-14`. (Which we added to `build.yml`) Performance of `arm-05` is discussed in apache#13775 and apache#12773
CI Build Job `arm-05` (runtime 2 hours) has become the Performance Bottleneck for CI Workflow. That's because `arm-05` builds too many targets for nRF, RP2040, SAM 3, SAM A and SAM D. This PR splits `arm-05` into multiple smaller jobs, to reduce the CI Build Duration. Before the PR: `arm-05` is overloaded, build requires 2 hours - `arm-05` (2 hours): nRF, RP2040, SAM 3, SAM A, SAM D - `arm-06` (56 mins): STM32 [a-m]* After the PR: `arm-05` is offloaded (to `arm-06` and `arm-07`), completes within 1 hour - `arm-05` (47 mins): nRF - `arm-06` (1 hour): Reserve for RP2040 exclusively - `arm-07` (1 hour 15 mins): SAM 3, SAM A, SAM D, STM32 [a-m]* Build Jobs are sorted by Target Name. So we cascade the changes and rename the Build Jobs: `arm-07` becomes `arm-08`, `arm-08` becomes `arm-09` etc. Then `arm-13` becomes a new job `arm-14`. (Which we added to `build.yml`) Performance of `arm-05` is discussed in #13775 and #12773
This PR changes the Labeling of PRs so that the Architecture (arm, risc-v, xtensa, ...) is specified in the Board Label. Previously the CI Workflow would set Generic Board Labels like "Area: Board support". Now it will set the Arch-Specific Board Label like "Board: arm". The Board Label will be used by the upcoming CI Build Rules to skip unnecessary builds. So "Board: arm" will enable only the builds for `arm-01` to `arm-14`. This is explained here: apache#13775
This PR changes the Labeling of PRs so that the Architecture (arm, risc-v, xtensa, ...) is specified in the Board Label. Previously the CI Workflow would set Generic Board Labels like "Area: Board support". Now it will set the Arch-Specific Board Label like "Board: arm". The Board Label will be used by the upcoming CI Build Rules to skip unnecessary builds. So "Board: arm" will enable only the builds for `arm-01` to `arm-14`. This is explained here: #13775
To speed up the CI Workflow, this PR splits the CI Build Jobs for RISC-V into smaller jobs. Each job will now complete within 1 hour. Before the PR: There are 2 jobs for RISC-V, each requiring more than 1.5 hours - `risc-v-01` (1 hour 42 mins): BL602, Ox64, ESP32-C3 / C6 / H2 - `risc-v-02` (1 hour 41 mins): K230, Icicle, QEMU, RV32M1-Vega After the PR: The build is spread across 6 jobs for RISC-V, each job completes within 1 hour - `risc-v-01` (19 mins): BL602, Ox64 - `risc-v-02` (44 mins): ESP32-C3 - `risc-v-03` (45 mins): ESP32-C6, ESP32-H2 - `risc-v-04` (31 mins): K230, Icicle - `risc-v-05` (41 mins): QEMU CITest - `risc-v-06` (38 mins): Rest of QEMU, RV32M1-Vega Following the same convention as the Arm32 Build Jobs, the above jobs are sorted by Target Name. Performance of the RISC-V Build Jobs is discussed in apache#13775
To speed up the CI Workflow, this PR splits the CI Build Jobs for RISC-V into smaller jobs. Each job will now complete within 1 hour. Before the PR: There are 2 jobs for RISC-V, each requiring more than 1.5 hours - `risc-v-01` (1 hour 42 mins): BL602, Ox64, ESP32-C3 / C6 / H2 - `risc-v-02` (1 hour 41 mins): K230, Icicle, QEMU, RV32M1-Vega After the PR: The build is spread across 6 jobs for RISC-V, each job completes within 1 hour - `risc-v-01` (19 mins): BL602, Ox64 - `risc-v-02` (44 mins): ESP32-C3 - `risc-v-03` (45 mins): ESP32-C6, ESP32-H2 - `risc-v-04` (31 mins): K230, Icicle - `risc-v-05` (41 mins): QEMU CITest - `risc-v-06` (38 mins): Rest of QEMU, RV32M1-Vega Following the same convention as the Arm32 Build Jobs, the above jobs are sorted by Target Name. Performance of the RISC-V Build Jobs is discussed in apache#13775
To speed up the CI Workflow, this PR splits the CI Build Jobs for RISC-V into smaller jobs. Each job will now complete within 1 hour. Before the PR: There are 2 jobs for RISC-V, each requiring more than 1.5 hours - `risc-v-01` (1 hour 42 mins): BL602, Ox64, ESP32-C3 / C6 / H2 - `risc-v-02` (1 hour 41 mins): K230, Icicle, QEMU, RV32M1-Vega After the PR: The build is spread across 6 jobs for RISC-V, each job completes within 1 hour - `risc-v-01` (19 mins): BL602, Ox64 - `risc-v-02` (44 mins): ESP32-C3 - `risc-v-03` (45 mins): ESP32-C6, ESP32-H2 - `risc-v-04` (31 mins): K230, Icicle - `risc-v-05` (41 mins): QEMU CITest - `risc-v-06` (38 mins): Rest of QEMU, RV32M1-Vega Following the same convention as the Arm32 Build Jobs, the above jobs are sorted by Target Name. Performance of the RISC-V Build Jobs is discussed in #13775
This PR extends the CI Build Rules to eliminate more unnecessary builds. We use the Board Label for PRs: - Previously: "Arch: arm" will build only `arm-01` to `arm-14` - Now: "Board: arm" will also build `arm-01` to `arm-14` - This applies only to Simple PRs: One Arch Label + One Board Label + One Size Label, like "Arch: arm, Board: arm, Size: L" - If Arch Label and Board Label are both present: They must be the same. Otherwise All Targets shall be built. - Works with Arm64, RISC-V, Simulator, x86_64 and Xtensa The updated code is explained here: apache#13775
This PR extends the CI Build Rules to eliminate more unnecessary builds. We use the Board Label for PRs: - Previously: "Arch: arm" will build only `arm-01` to `arm-14` - Now: "Board: arm" will also build `arm-01` to `arm-14` - This applies only to Simple PRs: One Arch Label + One Board Label + One Size Label, like "Arch: arm, Board: arm, Size: L" - If Arch Label and Board Label are both present: They must be the same. Otherwise All Targets shall be built. - Works with Arm32, Arm64, RISC-V, Simulator, x86_64 and Xtensa The updated code is explained here: apache#13775
This PR extends the CI Build Rules to eliminate more unnecessary builds. We use the Board Label for PRs: - Previously: "Arch: arm" will build only `arm-01` to `arm-14` - Now: "Board: arm" will also build `arm-01` to `arm-14` - This applies only to Simple PRs: One Arch Label + One Board Label + One Size Label, like "Arch: arm, Board: arm, Size: L" - If Arch Label and Board Label are both present: They must be the same. Otherwise All Targets shall be built. - Works with Arm32, Arm64, RISC-V, Simulator, x86_64 and Xtensa The updated code is explained here: #13775
This PR creates the new CI Build Jobs `arm64-01` and `x86_64-01`. The new jobs will split and offload the Arm64 and x86_64 Build Targets from `other`. This will reduce our usage of GitHub Runners, to comply with the ASF Policy for GitHub Actions. (Recently we see more PRs for Arm64 and x86_64) Before the Split: Simple PRs (One Arch and/or One Board) for Arm64 and x86_64 require almost 1 hour for CI Build - `other` (57 mins): AVR, SPARC, x86, PinePhone, QEMU Arm64, QEMU x86_64 After the Split: Simple PRs for Arm64 and x86_64 will complete under 30 mins - `other` (24 mins): AVR, SPARC, x86 - `arm64-01` (29 mins): PinePhone, QEMU Arm64 - `x86_64-01` (9 mins): QEMU x86_64 To skip more unnecessary builds: Our Build Rules `arch.yml` shall ignore the label "Area: Documentation", so that a Simple PR + Docs is still a Simple PR. Previously we experienced longer CI Build Times, just because we added docs to our Simple PR. (Now our PR shall be built exactly like a Simple PR) The updated CI code is explained here: apache#13775
This PR creates the new CI Build Jobs `arm64-01` and `x86_64-01`. The new jobs will split and offload the Arm64 and x86_64 Build Targets from `other`. This will reduce our usage of GitHub Runners, to comply with the ASF Policy for GitHub Actions. (Recently we see more PRs for Arm64 and x86_64) Before the Split: Simple PRs (One Arch and/or One Board) for Arm64 and x86_64 require almost 1 hour for CI Build - `other` (57 mins): AVR, SPARC, x86, PinePhone, QEMU Arm64, QEMU x86_64 After the Split: Simple PRs for Arm64 and x86_64 will complete under 30 mins - `other` (24 mins): AVR, SPARC, x86 - `arm64-01` (29 mins): PinePhone, QEMU Arm64 - `x86_64-01` (9 mins): QEMU x86_64 To skip more unnecessary builds: Our Build Rules `arch.yml` shall ignore the label "Area: Documentation", so that a Simple PR + Docs is still a Simple PR. Previously we experienced longer CI Build Times, just because we added docs to our Simple PR. (Now our PR shall be built exactly like a Simple PR) The updated CI code is explained here: apache#13775
This PR creates the new CI Build Jobs `arm64-01` and `x86_64-01`. The new jobs will split and offload the Arm64 and x86_64 Build Targets from `other`. This will reduce our usage of GitHub Runners, to comply with the ASF Policy for GitHub Actions. (Recently we see more PRs for Arm64 and x86_64) Before the Split: Simple PRs (One Arch and/or One Board) for Arm64 and x86_64 require almost 1 hour for CI Build - `other` (57 mins): AVR, SPARC, x86, PinePhone, QEMU Arm64, QEMU x86_64 After the Split: Simple PRs for Arm64 and x86_64 will complete under 30 mins - `other` (24 mins): AVR, SPARC, x86 - `arm64-01` (29 mins): PinePhone, QEMU Arm64 - `x86_64-01` (9 mins): QEMU x86_64 To skip more unnecessary builds: Our Build Rules `arch.yml` shall ignore the label "Area: Documentation", so that a Simple PR + Docs is still a Simple PR. Previously we experienced longer CI Build Times, just because we added docs to our Simple PR. (Now our PR shall be built exactly like a Simple PR) The updated CI code is explained here: apache#13775
This PR creates the new CI Build Jobs `arm64-01` and `x86_64-01`. The new jobs will split and offload the Arm64 and x86_64 Build Targets from `other`. This will reduce our usage of GitHub Runners, to comply with the ASF Policy for GitHub Actions. (Recently we see more PRs for Arm64 and x86_64) Before the Split: Simple PRs (One Arch and/or One Board) for Arm64 and x86_64 require almost 1 hour for CI Build - `other` (57 mins): AVR, SPARC, x86, PinePhone, QEMU Arm64, QEMU x86_64 After the Split: Simple PRs for Arm64 and x86_64 will complete under 30 mins - `other` (24 mins): AVR, SPARC, x86 - `arm64-01` (29 mins): PinePhone, QEMU Arm64 - `x86_64-01` (9 mins): QEMU x86_64 To skip more unnecessary builds: Our Build Rules `arch.yml` shall ignore the label "Area: Documentation", so that a Simple PR + Docs is still a Simple PR. Previously we experienced longer CI Build Times, just because we added docs to our Simple PR. (Now our PR shall be built exactly like a Simple PR) The updated CI code is explained here: #13775
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
arm-01
,arm-02
, ...Fetch the Arch Labels
This is how we fetch the Arch Labels, and identify as Arm, Arm64, RISC-V, Xtensa:
https://github.com/apache/nuttx/blob/master/.github/workflows/arch.yml#L32-L104
Why
|| echo ""
? That's because if the GitHub CLIgh
fails for any reason, we will build all targets. This ensures that our CI Workflow won't get disrupted due to errors in GitHub CLI.Handle Only Simple PRs
We handle only Simple PRs: One Arch Label + One Board Label + One Size Label, like "Arch: risc-v, Board: risc-v, Size: XS". If it's not a Simple PR: We build everything.
https://github.com/apache/nuttx/blob/master/.github/workflows/arch.yml#L127-L169
For Arm Arch: Identify the Non-Arm Builds
Suppose the PR says "Arch: arm" or "Board: arm". We filter out the builds that should be skipped (RISC-V, Xtensa, etc):
https://github.com/apache/nuttx/blob/master/.github/workflows/arch.yml#L169-L234
Skip The Non-Arm Builds
Earlier we saw the code in
arch.yml
(Reusable Workflow) that identifies the builds to be skipped. The code above is called bybuild.yml
(Build Workflow) which will actually skip the builds:https://github.com/apache/nuttx/blob/master/.github/workflows/build.yml#L119-L148
Why
needs: Fetch-Source
? That's because the PR Labeler runs concurrently in the background. When we addFetch-Source
as a Job Dependency, we give the PR Labeler sufficient time to run (1 min), before we read the PR Label inarch.yml
.Same for RISC-V, Simulator, x86_64 and Xtensa Builds
We do the same for RISC-V, Simulator, x86_64 and Xtensa:
https://github.com/apache/nuttx/blob/master/.github/workflows/arch.yml#L105-L129
Skip the macOS and Windows Builds
For these Simple PRs (One Arch Label + One Size Label), we skip the macOS and Windows builds (
macos
,macos/sim-*
,msys2
) since these builds are costly:(
macos
andmacos/sim-*
builds will take 2 hours to complete due to the queueing for macOS Runners)https://github.com/apache/nuttx/blob/master/.github/workflows/build.yml#L194-L281
skip_all_builds
will be set to1
for Simple PRs on macOS and msys2.(Except for "Arch: Simulator", which will enable the macOS Builds for sim-01 and sim-02)
Ignore the Documentation
NuttX Devs shouldn't be penalised for adding docs! That's why we ignore the label "Area: Documentation", so that Simple PR + Docs is still a Simple PR (which will skip the unnecessary builds).
https://github.com/apache/nuttx/blob/master/.github/workflows/arch.yml#L44-L55
Sync the CI Workflow from nuttx repo to nuttx-apps
Remember to sync
build.yml
andarch.yml
fromnuttx
repo tonuttx-apps
! apache/nuttx-apps#2676build.yml
refers toarch.yml
(for the build rules). So when we syncbuild.yml
fromnuttx
tonuttx-apps
, we won't need to remove the references toarch.yml
.We could make
nuttx-apps/build.yml
point to thenuttx/arch.yml
. But that would make the CI fragile: Changes tonuttx/arch.yml
might causenuttx-apps/build.yml
to break.Yep
arch.yml
is totally not needed innuttx-apps
. I have difficulty keepingnuttx/build.yml
andnuttx-apps/build.yml
in sync, that's why I simply copied overarch.yml
as-is. In future we could extendarch.yml
with Build Rules that are specific tonuttx-apps
?If we decide to remove
nuttx-apps/arch.yml
: This means that we need to rewrite thebuild.yml
logic from this:Back to this:
Testing
(Note: The timings here are obsolete)
When we test our updated CI Workflow, we see that the irrelevant builds are skipped in seconds. Click "Show All Jobs" to reveal the timings:
CI Build for Arm32 PR
(Completed in 2 hours, roughly 15 mins faster than before. Bottleneck is
arm-05
, which takes 2 hours, we should split into smaller jobs)CI Build for Arm64 PR
(Completed in 51 mins yay!)
CI Build for RISC-V PR
(Completed in 1 hour 50 mins. Bottleneck is
riscv-01
andriscv-02
, at 1 hour 47 mins each, we should split into smaller jobs)CI Build for Xtensa PR
(Completed in 1 hour 17 mins. Bottleneck is
xtensa-01
andxtensa-02
, at 1 hour 15 mins each)CI Build for Other PRs and Non-PR (All Targets)
(Same as the present CI)
When PRs are Merged: All Targets are recompiled (2 hours 13 mins), no changes from the Present CI. Merge Arm32 PR
Previously the irrelevant builds were skipped in seconds. Now the irrelevant builds (e.g.
arm-01
) are totally omitted for Simple PRs (e.g. "Arch: risc-v")Actual Performance
We recorded the CI Build Performance based on Real-World PRs:
For Arm32: Simple PRs will build in 2 hours (previously also 2 hours)
For Arm64: Simple PRs will build in 49 mins (previously 2 hours 11 mins)
For RISC-V: Simple PRs will build in 1 hour 45 mins (previously also 1 hour 45 mins)
For Xtensa: Simple PRs will build in 1 hour 17 mins (previously 2 hours 11 mins)
For x86_64: Simple PRs will build in 48 mins (previously 2 hours 13 mins)
For Simulator: Simple PRs will build in 1 hour 32 mins (previously 2 hours 12 mins)
OK no big wow yet. We need to break
arm-05
,riscv-01
andriscv-02
into multiple smaller jobs. Then things will really zoom! (See the Build Job Details)Move the RP2040 jobs from
arm-05
toarm-06
, then addarm-14
. Add jobsriscv-03
toriscv-06
.(Update: All Done! Check the PRs below)
We already see a 27% Reduction in GitHub Runner Hours! From 15 Runner Hours down to 11 Runner Hours per Arm32 Build.
Split the Board Labels according to Arch, like "Board: arm". So "Board: arm" should build the exact same way as "Arch: arm". Same for "Board: arm, Arch: arm". Update the Build Rules to use the Board Labels
(Update: All Done! Check the PRs below)
Split the
others
job intoarm64
andx86_64
(Update: All Done! Check the PRs below)
TODO: Reorg and rename the CI Build Jobs, for better performance and easier maintenance. But how?
arm-01
) that should be built for a SubBoard (e.g.stm32
)? Maybe like thisHi @raiden00pl and @simbit18: Do you think this will work? And keep Our Devs and ASF happy? Thanks!
Describe alternatives you've considered
No response
Verification
The text was updated successfully, but these errors were encountered: