Skip to content

[Testers Needed] Building PRs in Our Own Repos #18568

Open

Description

@lupyuen

Description

We're testing a new way to Build PRs in Our Own NuttX Repos, wonder if you would like to try out, and give your feedback to @simbit18 and me? Thank you so much :-)

  1. Demo Video in YouTube
    Demo Video in Google Drive
  2. Browse to github.com/NuttX/manual-nuttx-ci
  3. Click "Fork" to clone the repo
  4. Click "Actions > Enable GitHub Actions"
  5. Click "Manually Build NuttX > Run Workflow"
  6. Enter the info below. Suppose we are building this PR
    arch/arm64/imx95-a55: add GPIO and eMMC (USDHC) support with partition table parsing #18501, which comes from github.com/jasonbu/nuttx/tree/imx95_emmc8bit
    • Repo for NuttX: jasonbu/nuttx
    • NuttX Branch: imx95_emmc8bit
    • Repo for NuttX Apps: apache/nuttx-apps
    • NuttX Apps Branch: master
    • Host Platform: all
  7. And the PR Build should start. Lemme know if it doesn't work thanks!
  8. Why are we doing this? Earlier this year, we saw very high usage of GitHub Runners. By building PRs in Our Own NuttX Repos, we will greatly reduce our usage of GitHub Runners, so that ASF Infrastructure Team won't revoke our access to GitHub CI. So we hope everyone can help out thanks :-)
Screenshot 2026-03-20 at 5 00 45 PM

We're waiting for feedback from these testers:

Verification

  • I have verified before submitting the report.

Activity

  1. added
    Community: Question
    on Mar 20, 2026
  2. simbit18 commented on Mar 20, 2026

    @simbit18
    Contributor

    We have added a second workflow for building a <board name>:<board configuration> using Make and CMake

    1. Click "Actions > Enable GitHub Actions"
    2. Click "Manually Compiling with Make or Cmake for test > Run Workflow"
    3. Enter the info below. Suppose we are building this sim:nsh
      • Repo for NuttX: apache/nuttx
      • NuttX Branch: master
      • Repo for NuttX Apps: apache/nuttx-apps
      • NuttX Apps Branch: master
      • Config: sim:nsh
      • Build system: all
    4. And Build should start.
    Image
  3. Laczen commented on Mar 24, 2026

    @Laczen
    Contributor

    Hi @lupyuen, don't know if it is possible, but could this be done on a forked Nuttx. So that after a branch is pushed I can build NuttX CI it on my fork and only create a PR when the build NuttX CI is succesful?

  4. simbit18 commented on Mar 24, 2026

    @simbit18
    Contributor

    @Laczen Yes, that is precisely the purpose of this repository github.com/NuttX/manual-nuttx-ci
    NuttX/manual-nuttx-ci#1 (comment)

  5. Laczen commented on Mar 24, 2026

    @Laczen
    Contributor

    @Laczen Yes, that is precisely the purpose of this repository github.com/NuttX/manual-nuttx-ci NuttX/manual-nuttx-ci#1 (comment)

    Maybe I was not clear enough. I meant making this workflow a part of the NuttX fork that I already have.

  6. simbit18 commented on Mar 24, 2026

    @simbit18
    Contributor

    If the branch is on GitHub, then it’s possible
    example branch esp32_simpleboot:

    Repo for NuttX: Laczen/nuttx
    NuttX Branch: esp32_simpleboot <- This could be any of your new branches
    Repo for NuttX Apps: apache/nuttx-apps
    NuttX Apps Branch: master
    Host Platform: all

  7. tmedicci commented on Mar 25, 2026

    @tmedicci
    Contributor

    Amazing work, @simbit18 and @lupyuen !

    Suggestion: It'd be nice to be able to set env vars to build NuttX (I'm not sure if we'd need to tweak our CI tools or it could be set directly on job).

    For instance, being able to set ESP_HAL_3RDPARTY_URL to ongoing development.

  8. simbit18 commented on Mar 26, 2026

    @simbit18
    Contributor

    Hi @tmedicci, I understand your request, and we could consider adding another workflow for Espressif.

    However, if we add the option to modify the ESP_HAL_3RDPARTY_VERSION environment variable, all of these architectures

    • arch/risc-v
    • arch/risc-v/src/esp32c3-legacy
    • arch/xtensa/src/esp32
    • arch/xtensa/src/esp32s2
    • arch/xtensa/src/esp32s3

    will use the same Git hash, but as far as I can see, that is not currently the case, so some jobs will fail.

  9. tmedicci commented on Mar 26, 2026

    @tmedicci
    Contributor

    Hi @tmedicci, I understand your request, and we could consider adding another workflow for Espressif.

    I don't think we need something specifically for Espressif. We can set any environment var to the build system. There are a couple of them that "tweaks" the build system.

    However, if we add the option to modify the ESP_HAL_3RDPARTY_VERSION environment variable, all of these architectures

    * arch/risc-v
    
    * arch/risc-v/src/esp32c3-legacy
    
    * arch/xtensa/src/esp32
    
    * arch/xtensa/src/esp32s2
    
    * arch/xtensa/src/esp32s3
    

    will use the same Git hash, but as far as I can see, that is not currently the case, so some jobs will fail.

    There are a couple of things to consider here:

    1. ESP_HAL_3RDPARTY_VERSION isn't usually set because the PR itself already contains the version being tested. Just setting ESP_HAL_3RDPARTY_URL is enough to test an under-development branch (yet not yet published, for instance).
    2. However, we always keep it aligned: when we update the version, we do that for every supported chip (xtensa update is on the way). An exception to that is esp32c3-legacy, which is expected to be removed in a major NuttX release.
  10. tmedicci commented on Mar 26, 2026

    @tmedicci
    Contributor

    Another useful feature would be being able to select which set of tests are expected to run manually. For instance, selecting just xtensa-01 or a set of .dats.

  11. simbit18 commented on Mar 26, 2026

    @simbit18
    Contributor

    @tmedicci Thank you for your feedback; we’ll do our best to improve.

  12. tmedicci commented on Mar 26, 2026

    @tmedicci
    Contributor
  13. tmedicci commented on Mar 26, 2026

    @tmedicci
    Contributor

    Apparently, there is a 2h timeout for the jobs: https://github.com/tmedicci/manual-nuttx-ci/actions/runs/23606479413/job/68750649341#step:10:1334

    Is this set by NuttX or the CI?

    Just checked that it's being set here. I increased it on my fork. Perhaps we should increase it because GH-provided runners for regular users might not be as fast as the ones we get from ASF.

  14. simbit18 commented on Mar 27, 2026

    @simbit18
    Contributor

    Hi @tmedicci The check does not directly concern the duration of the job but that of pytest, and the following has been added by @lupyuen PR #14849

    sleep 7200 ; echo Killing pytest after timeout... ; pkill -f pytest

    @lupyuen, please correct me if I'm wrong :)

    Job Linux (xtensa-01)

    failed due to this error

    ====================================================================================
    Configuration/Tool: heltec_wifi_lora32/sx1276
    2026-03-26 16:57:18
    ------------------------------------------------------------------------------------
      Cleaning...
      Configuring...
      Building NuttX...
    board/esp32_sx127x.c:40:10: fatal error: esp32_gpio.h: No such file or directory
       40 | #include "esp32_gpio.h"
          |          ^~~~~~~~~~~~~~
    compilation terminated.
    ERROR: xtensa-esp32-elf-gcc failed: 1
           command: xtensa-esp32-elf-gcc -MT ./esp32_sx127x.o  -M '-fno-common' '-Wall' '-Wstrict-prototypes' '-Wshadow' '-Wundef' '-Wno-attributes' '-Wno-unknown-pragmas' '-Wno-psabi' '-Os' '-fno-strict-aliasing' '-fomit-frame-pointer' '-ffunction-sections' '-fdata-sections' '-mlongcalls' '-isystem' '/github/workspace/sources/nuttx/include' '-D__NuttX__' '-DNDEBUG' '-D__KERNEL__' '-Wno-cpp' '-Werror' '-I' '/github/workspace/sources/nuttx/arch/xtensa/src/board/board' '-I' '/github/workspace/sources/nuttx/arch/xtensa/src/board/src' '-I' '/github/workspace/sources/nuttx/sched' '-I' '/github/workspace/sources/nuttx/arch/xtensa/src/chip' '-I' '/github/workspace/sources/nuttx/arch/xtensa/src/common' '-I' '/github/workspace/sources/nuttx/arch/xtensa/src/board/include' board/esp32_sx127x.c
    make[2]: *** [/github/workspace/sources/nuttx/boards/Board.mk:95: .depend] Error 1
    make[2]: Target 'depend' not remade because of errors.
    make[1]: *** [Makefile:216: .depend] Error 2
    make[1]: Target 'depend' not remade because of errors.
    make: *** [tools/Unix.mk:670: pass2dep] Error 2
    make: Target 'all' not remade because of errors.
    /github/workspace/sources/nuttx/tools/testbuild.sh: line 385: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
      [1/1] Normalize heltec_wifi_lora32/sx1276
    ====================================================================================
    
    
    
  15. lupyuen commented on Mar 27, 2026

    @lupyuen
    MemberAuthor

    Yep the 2-hour timeout is for CI Test / pytest only, to prevent CI Test from running forever. Now that xtensa jobs are running beyond 2 hours, I'm thinking we should extend the timeout to 3 hours? Alternatively: Split xtensa into smaller, quicker jobs. (I don't think we should exceed 2 hours for any single CI job?)

  16. tmedicci commented on Mar 27, 2026

    @tmedicci
    Contributor

    Hi @simbit18

    Yes, you're right about that pipeline, but the issue still exists: xtensa pipelines are taking more than 2 hours (more defconfig were added recently).

    As @lupyuen proposed, I think we should split into three jobs (instead of 2). That should fix it. I can update #18614 to try it in a separate commit.

  17. lupyuen commented on Mar 27, 2026

    @lupyuen
    MemberAuthor

    @tmedicci Cool thanks! Remember we did something special for xtensa-03, running on Build Farm only?

    I wonder if we should move it to xtensa-00 and run it on Build Farm only. So we get more space to expand for xtensa-03, 04, 05, ...?

  18. tmedicci commented on Mar 27, 2026

    @tmedicci
    Contributor

    @tmedicci Cool thanks! Remember we did something special for xtensa-03, running on Build Farm only?

    * [esp32s3/python: add support for running Python on ESP32-S3 #15955 (review)](https://github.com/apache/nuttx/pull/15955#pullrequestreview-2668723029)
    

    I wonder if we should move it to xtensa-00 and run it on Build Farm only. So we get more space to expand for xtensa-03, 04, 05, ...?

    I remember! I had moved it to xtensa-04 and used 03 for the split, but it makes more sense to move to 00 so we have "spare" slots if needed.

  19. lupyuen commented on Mar 27, 2026

    @lupyuen
    MemberAuthor

    BTW I think we should target 1 hour (highly recommended) to 1.5 hours per CI Job, based on our current Build Times...
    https://github.com/apache/nuttx/actions/runs/23618454524/usage

    Image
  20. added a commit that references this issue on Apr 15, 2026
  21. added a commit that references this issue on Apr 15, 2026
  22. cederom commented on Apr 20, 2026

    @cederom
    Contributor

    Awesome thank you @lupyuen :-)

    I think we need these instructions in our documentation https://nuttx.apache.org/docs/latest/contributing/index.html and these deserve separate section like "Before you submit" or similar? :-)

  23. linguini1 commented on May 17, 2026

    @linguini1
    Contributor

    From my tests so far, this is excellent and quite easy to use.

    Question (maybe not possible): can we have a similar feature to choosing which nuttx-apps branch to run CI against for PRs made to the NuttX repository (and vice versa)? This would make it a lot easier to trust that twin PRs can be merged safely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Community: Question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions