Browse Source

Fixing Windows ARM 32 build (#1763)

Windows 11 SDK 10.0.22621.0 is the last SDK to support 32-bit ARM, make sure to install it in the github action runner.
Jorrit Rouwe 2 weeks ago
parent
commit
9b34963fcc
2 changed files with 7 additions and 4 deletions
  1. 5 3
      .github/workflows/build.yml
  2. 2 1
      Build/cmake_vs2022_cl_arm_32bit.bat

+ 5 - 3
.github/workflows/build.yml

@@ -320,10 +320,12 @@ jobs:
       uses: actions/checkout@v5
     - name: Add msbuild to PATH
       uses: microsoft/setup-msbuild@v2
+    - name: Install Windows 11 SDK (10.0.22621.0)
+      # Alternative: Start-Process -wait -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" -ArgumentList "modify", "--installPath", """C:\Program Files\Microsoft Visual Studio\2022\Enterprise""", "--quiet", "--norestart", "--nocache", "--add", "Microsoft.VisualStudio.Component.Windows11SDK.22621" -Verb RunAs
+      run: choco install windows-sdk-11-version-22H2-all -y
     - name: Configure CMake
-      # Windows 11 SDK 10.0.22621.0 is the last SDK to support 32-bit ARM, in the future if the github image no longer includes it, it can be installed with:
-      # Start-Process -wait -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" -ArgumentList "modify", "--installPath", """C:\Program Files\Microsoft Visual Studio\2022\Enterprise""", "--quiet", "--norestart", "--nocache", "--add", "Microsoft.VisualStudio.Component.Windows11SDK.22621" -Verb RunAs
-      run: cmake -B ${{github.workspace}}/Build/VS2022_CL_ARM_32_BIT -G "Visual Studio 17 2022" -A ARM -DCMAKE_SYSTEM_VERSION="10.0.22621.0" -DCMAKE_CXX_COMPILER_WORKS=1 Build 
+      # Windows 11 SDK 10.0.22621.0 is the last SDK to support 32-bit ARM
+      run: cmake -B ${{github.workspace}}/Build/VS2022_CL_ARM_32_BIT -G "Visual Studio 17 2022" -A ARM -DCMAKE_SYSTEM_VERSION="10.0.22621.0" -DCMAKE_CXX_COMPILER_WORKS=1 Build
     - name: Build
       run: msbuild Build\VS2022_CL_ARM_32_BIT\JoltPhysics.sln /property:Configuration=${{matrix.build_type}} -m
 

+ 2 - 1
Build/cmake_vs2022_cl_arm_32bit.bat

@@ -1,3 +1,4 @@
 @echo off
-cmake -S . -B VS2022_CL_ARM_32BIT -G "Visual Studio 17 2022" -A ARM %*
+cmake -S . -B VS2022_CL_ARM_32BIT -G "Visual Studio 17 2022" -A ARM -DCMAKE_SYSTEM_VERSION="10.0.22621.0" -DCMAKE_CXX_COMPILER_WORKS=1 %*
+echo Note that Windows 11 SDK (10.0.22621.0) is the last SDK to support 32-bit ARM, make sure you have it installed.
 echo Open VS2022_CL_ARM_32BIT\JoltPhysics.sln to build the project.