Skip to content

Conversation

@lupyuen
Copy link
Member

@lupyuen lupyuen commented Oct 7, 2024

Summary

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

Impact

For Simple PRs: CI Builds shall be skipped for the targets that don't match the Arch Label. macOS and Windows builds shall be skipped (except for "Arch: Simulator").

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

Testing

When we create a PR, the irrelevant builds will be totally omitted. (Merge PR will compile all targets, same for Others)

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")

Screenshot 2024-10-06 at 11 39 43 AM

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
@github-actions github-actions bot added Area: CI Size: M The size of the change in this PR is medium labels Oct 7, 2024
@nuttxpr
Copy link

nuttxpr commented Oct 7, 2024

[Experimental Bot, please feedback here]

NuttX PR Requirements Review

This PR appears to meet the NuttX requirements with a few minor points:

Summary:

  • Clear explanation of the change's purpose and functionality.
  • Links to the relevant issue for context.

Impact:

  • Well-defined impact on CI builds, distinguishing between simple and complex PRs.
  • No apparent impact on users, hardware, documentation, security, or compatibility.
    • Consider explicitly stating "NO" for these sections if there's truly no impact.

Testing:

  • Provides extensive testing logs for various architectures and scenarios.
  • Screenshots enhance the visualization of the changes' effects.
  • Consider adding a brief summary of the test results within each section (e.g., "All tests passed as expected.").

Overall:

This PR is well-structured and informative. Addressing the minor points mentioned above will further enhance its clarity and completeness.

@xiaoxiang781216 xiaoxiang781216 linked an issue Oct 7, 2024 that may be closed by this pull request
1 task
@xiaoxiang781216 xiaoxiang781216 merged commit 69f58de into apache:master Oct 7, 2024
@xiaoxiang781216
Copy link
Contributor

@lupyuen should we sync to apps repo?

@lupyuen
Copy link
Member Author

lupyuen commented Oct 7, 2024

@xiaoxiang781216 Yep I'll sync to nuttx-apps thanks!

@lupyuen
Copy link
Member Author

lupyuen commented Oct 7, 2024

@simbit18 Is it OK if I sync cibuild.sh -S to nuttx-apps, together with the rest of my changes? #13301

Linux: ...
          ./cibuild.sh -c -A -N -R -S testlist/${{matrix.boards}}.dat
msys2: ...
          ./cibuild.sh -g -i -A -C -N -R testlist/${{matrix.boards}}.dat

@simbit18
Copy link
Contributor

simbit18 commented Oct 7, 2024

@lupyuen yes it is ok

lupyuen added a commit to lupyuen2/wip-nuttx-apps that referenced this pull request Oct 8, 2024
This PR syncs the CI Build Workflow `build.yml` from `nuttx` repo to `nuttx-apps`. The updated `build.yml` consolidates these changes:
- apache/nuttx#13301
- apache/nuttx#13806
- apache/nuttx#13862

`build.yml` from `nuttx` repo was slightly modified for `nuttx-apps`:
- All References to `apache/nuttx/.../arch.yml` were changed to `apache/nuttx-apps/.../arch.yml` (we decouple them so they are easier to update)
- Removed `pull_request > paths-ignore` and `push > paths-ignore` (following the existing convention)
xiaoxiang781216 pushed a commit to apache/nuttx-apps that referenced this pull request Oct 8, 2024
This PR syncs the CI Build Workflow `build.yml` from `nuttx` repo to `nuttx-apps`. The updated `build.yml` consolidates these changes:
- apache/nuttx#13301
- apache/nuttx#13806
- apache/nuttx#13862

`build.yml` from `nuttx` repo was slightly modified for `nuttx-apps`:
- All References to `apache/nuttx/.../arch.yml` were changed to `apache/nuttx-apps/.../arch.yml` (we decouple them so they are easier to update)
- Removed `pull_request > paths-ignore` and `push > paths-ignore` (following the existing convention)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: CI Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Enhance the CI Workflow to skip the Unmodified Architectures

4 participants