Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -335,3 +335,54 @@ jobs:
name: msys2-${{matrix.boards}}-builds
path: buildartifacts/
continue-on-error: true

# Select the msvc Builds based on PR Arch Label
msvc-Arch:
uses: apache/nuttx/.github/workflows/arch.yml@master
needs: Fetch-Source
with:
os: msvc
boards: |
["msvc_placeholder_with_sim_keyword"]

# Build with MSVC in Windows native
msvc:
needs: msvc-Arch
if: ${{ needs.msvc-Arch.outputs.skip_all_builds != '1' }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
# Set up Python environment and install kconfiglib
- name: Set up Python and install kconfiglib
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install kconfiglib
run: |
pip install kconfiglib

- run: git config --global core.autocrlf false

- name: Download Source Artifact
uses: actions/download-artifact@v4
with:
name: source-bundle
path: .

- name: Extract sources
run: |
7z x sources.tar.gz -y
7z x sources.tar -y

# Build the project using the given CMake commands
- name: Configure and build with CMake
run: |
cd sources/nuttx
cmake -B vs2022 -DBOARD_CONFIG=sim/windows -G"Visual Studio 17 2022" -A Win32
cmake --build vs2022

- uses: actions/upload-artifact@v4
with:
name: msvc-builds
path: buildartifacts/
continue-on-error: true
2 changes: 1 addition & 1 deletion arch/sim/src/sim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ if(CONFIG_SMP)
list(APPEND SRCS sim_smpsignal.c sim_cpuidlestack.c)
endif()

if(CONFIG_ARCH_HAVE_MULTICPU)
if(CONFIG_ARCH_HAVE_MULTICPU AND NOT WIN32)
Comment thread
xiaoxiang781216 marked this conversation as resolved.
list(APPEND HOSTSRCS sim_hostsmp.c)
endif()

Expand Down
1 change: 1 addition & 0 deletions cmake/nuttx_sethost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ function(nuttx_sethost)
list(APPEND NUTTX_SYSTEM_SETHOST "WINDOWS_NATIVE=y")
else()
message(" MSVC toolchain")
list(APPEND NUTTX_SYSTEM_SETHOST "WINDOWS_NATIVE=y")
endif()
endif()
else()
Expand Down