tools/ci: Added CI system on Windows Native - #15989
Conversation
|
[Experimental Bot, please feedback here] This PR description mostly meets the NuttX requirements, but could be improved in a few areas for clarity and completeness. Strengths:
Areas for Improvement:
Example Improvements to the Testing Section: <Relevant log snippets showing previous behavior/error for each target> <Output of 'nuttx.exe' demonstrating basic NSH functionality, similar to what's already provided> arm (nucleo-l152re): |
hartmannathan
left a comment
There was a problem hiding this comment.
I can't test this, since I don't have a Windows setup, but I tried to review as well as possible by reading the code.
The only real suggestion I can make is to include a one-line hint in each file's header. The coding standard (see https://nuttx.apache.org/docs/latest/contributing/coding_style.html#file-organization) allows for "An optional, one-line description of the file contents." I would suggest: "PowerShell script for CI on Windows Native" or something to that effect. Because Unix-heads (like me!) will likely wonder what these files and pswd are, when seen outside the context of this PR.
(Actually, I would recommend the same suggestion for all files throughout NuttX. It can be hard to understand what different files do and a tiny hint like this can go a long way.)
Thanks for improving CI and Windows support!
| #!/usr/bin/env pswd | ||
| ############################################################################ | ||
| # | ||
| # |
There was a problem hiding this comment.
Is this empty comment line meant to be doubled?
There was a problem hiding this comment.
added file name and description
This PR adds support for the CI system for native Windows as well. It allows you to build NuttX on GitHub and test it locally for Windows users. With these CI tools with PowerShell scripts, it is possible to build NuttX for Windows Native using (for now only) Cmake + Ninja with the same logic as the CI system with Bash scripts. This allows the msvc job to be used not only with the simulator (currently only with Visual Studio 17 2022), but also with other architectures using the same Windows runner to get more coverage and avoid future breakage. As with the other jobs, we use artifacts to save the compilation result at the end of the workflow execution (previously for the simulator it was not done). The proposed solution is based on the following additions and modified: Modified Files buildyml -> only CI Jobs MSVC New Files in tools/ ci/cibuild.ps1 -> Added Powershell script for Run the CI Builds ci/platforms/windows.ps1 -> Added Powershell script for installing toolchains and tools. testlist/windows.dat -> Target (Add sim (msvc), risc-v arm) tools/testbuild.ps1 We tested the NuttX build on GitHub and locally. How we build on GitHub and test locally. Locally cd .\nuttx\tools\ci\ .\cibuild.ps1 -n -i -A -C -N .\testlist\windows.dat Signed-off-by: simbit18 <simbit18@gmail.com>
eb1aefd to
266da68
Compare
|
Hi @hartmannathan done |
|
Hi @lupyuen perhaps before a future merge of this PR for consistency it is necessary to rename the job from msvc to Windows what do you think ? nuttx/.github/workflows/build.yml Line 350 in 91d895d |
|
@simbit18 If we rename |
|
@lupyuen maybe WinNative ? MSVC is -> Microsoft Visual C++ |
|
@simbit18 Maybe we can rename it later? It might confuse the folks who are watching the builds. Actually |
hartmannathan
left a comment
There was a problem hiding this comment.
LGTM. I can't test (no Windows setup) but looks good on code reading. Thanks for improving NuttX CI!
|
Sorry @xiaoxiang781216 @anchao @xuxin930 since you have added simulator building with Visual Studio 17 2022 with CMake, could you please see this PR and have your comments? |
|
@simbit18 excellent work!!!! |
added
CI: Kill CI Test after 2 hours
see apache/nuttx#14849
job msvc Windows native
see
apache/nuttx#13894
apache/nuttx#15989
Signed-off-by: simbit18 <simbit18@gmail.com>
added
CI: Kill CI Test after 2 hours
see apache/nuttx#14849
job msvc Windows native
see
apache/nuttx#13894
apache/nuttx#15989
Signed-off-by: simbit18 <simbit18@gmail.com>
added
CI: Kill CI Test after 2 hours
see apache/nuttx#14849
job msvc Windows native
see
apache/nuttx#13894
apache/nuttx#15989
Signed-off-by: simbit18 <simbit18@gmail.com>
added
CI: Kill CI Test after 2 hours
see apache/nuttx#14849
job msvc Windows native
see
apache/nuttx#13894
apache/nuttx#15989
Signed-off-by: simbit18 <simbit18@gmail.com>
Summary
This PR adds support for the CI system for Windows native as well. It allows you to build NuttX on GitHub and test it locally for Windows users.
With these CI tools with PowerShell scripts, it is possible to build NuttX for Windows native using (for now only) Cmake + Ninja with the same logic as the CI system with Bash scripts.
This allows the msvc job to be used not only with the simulator (currently only with Visual Studio 17 2022), but also with other architectures using the same Windows runner to get more coverage and avoid future breakage. As with the other jobs, we use artifacts to save the compilation result at the end of the workflow execution (previously for the simulator it was not done).
The proposed solution is based on the following additions and modified:
Modified Files
buildyml -> only CI Job MSVC
New Files in tools/
ci/cibuild.ps1 -> Run the CI Builds
ci/platforms/windows.ps1 -> Added script for installing toolchains and tools.
Added the pre-built kconfig-frontends that contains my kconfig-tweak script converted to PowerShell (without using the sed and grep tools)
testlist/windows.dat -> Target (Add sim (msvc), risc-v arm)
tools/testbuild.ps1
Impact
Impact on user: This PR adds CI tools for Windows users.
Impact on build: This PR adds CI support NuttX on Windows native to avoid future breakage.
Impact on hardware: NO
Impact on documentation: NO
Impact on security: NO
Impact on compatibility: NO
Testing
We tested the NuttX build on GitHub and locally.
How we build on GitHub and test locally.
GitHub
https://github.com/simbit18/nuttx_test_pr/actions/runs/13839199580/job/38722147529#logs
Locally
cd .\nuttx\tools\ci\
.\cibuild.ps1 -n -i -A -C -N .\testlist\windows.dat
Simulator
Arm nucleo-l152re:nsh
