Skip to content
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

build.yml: Skip the CI Builds that don't match the Arch Label #81

Closed
wants to merge 1 commit into from

Conversation

lupyuen
Copy link

@lupyuen lupyuen commented Oct 2, 2024

Summary

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

Impact

For Simple PRs: CI Builds shall be skipped for the targets that don't match the Arch Label

For Complex PRs: No change, all targets shall be built

Testing

When we create a PR, the irrelevant builds are skipped in seconds. Click "Show All Jobs" to reveal the timings: (Merge PR will compile all targets, same for Others)

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant