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

CI: Split the Build Jobs for Arm64 and x86_64 #14282

Merged
merged 1 commit into from
Oct 20, 2024

Conversation

lupyuen
Copy link
Member

@lupyuen lupyuen commented Oct 15, 2024

Summary

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)

This update will help us comply with the ASF Policy for GitHub Actions, since we need to drastically reduce our usage of GitHub Runners: #14376. The updated CI code is explained here: #13775

Impact

With this PR, Build Jobs for Arm64 / x86_64 / Other will finish earlier:

  • Before the Split: Arm64 and x86_64 Build Jobs take up to 57 mins (other) to complete.

  • After the Split: Arm64 and x86_64 Build Jobs will take at most 29 mins (arm64-01) to complete.

  • Simple PRs labeled "Arch: arm64" and/or "Board: arm64" will now build arm64-01. (Instead of other)

  • Simple PRs labeled "Arch: x86_64" and/or "Board: x86_64" will now build x86_64-01. (Instead of other)

  • Simple PRs with Docs will also build faster. (Simple PRs are limited to only One Arch and/or One Board)

The Updated CI Workflow shall be synced to nuttx-apps repo in the next PR.

Testing

We verified that the Build Jobs for Arm64, x86_64 and Other are executed successfully with the Updated CI Workflow: https://github.com/lupyuen5/label-nuttx/actions/runs/11338591308

Before the Split

  • other: 57 mins

After the Split

  • other: 24 mins
  • arm64-01: 29 mins
  • x86_64-01: 9 mins

Simple PR for Arm64 / x86_64: We tested by creating Simple PRs for Arm64 and x86_64

Simple PR with Documentation: We tested by creating Simple PRs that have docs

Regression Test: We tested by creating Simple PRs and Non-Simple PRs

@github-actions github-actions bot added Area: Tooling Area: CI Size: S The size of the change in this PR is small labels Oct 15, 2024
@nuttxpr
Copy link

nuttxpr commented Oct 15, 2024

[Experimental Bot, please feedback here]

The PR summary and testing information you provided indicate that the PR meets the NuttX requirements. Here's a breakdown:

Summary:

Impact:

  • Feature Changes: No new features, but significantly improves CI build times.
  • User Impact: No.
  • Build Impact: Yes, build process optimized with new jobs.
  • Hardware Impact: No.
  • Documentation Impact: No.
  • Security Impact: No.
  • Compatibility Impact: No.
  • Other Considerations: Sync updated CI Workflow to nuttx-apps in a subsequent PR.

Testing:

  • Thorough testing conducted on various architectures and with different PR scenarios.
  • Test results demonstrate intended behavior and performance improvements.
  • "Before" and "After" logs provided for comparison.

Verdict:

The PR satisfies the NuttX requirements with clear explanations, thorough testing, and addresses a relevant issue.

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
@lupyuen lupyuen marked this pull request as ready for review October 19, 2024 15:57
@lupyuen lupyuen marked this pull request as draft October 19, 2024 15:57
@lupyuen lupyuen marked this pull request as ready for review October 19, 2024 20:10
@lupyuen lupyuen linked an issue Oct 19, 2024 that may be closed by this pull request
@xiaoxiang781216 xiaoxiang781216 merged commit 9c1e0d3 into apache:master Oct 20, 2024
26 of 31 checks passed
lupyuen added a commit to lupyuen2/wip-nuttx-apps that referenced this pull request Oct 20, 2024
This PR syncs apache/nuttx#14282 from `nuttx` repo to `nuttx-apps`.
xiaoxiang781216 pushed a commit to apache/nuttx-apps that referenced this pull request Oct 20, 2024
This PR syncs apache/nuttx#14282 from `nuttx` repo to `nuttx-apps`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CI Area: Tooling Size: S The size of the change in this PR is small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[URGENT] Reducing our usage of GitHub Runners
3 participants