CI: added Windows ARM64 build jobs. Examples: added ARM64 support in build_win.bat files. (#9593)

This commit is contained in:
Harish Rajaselvan 2026-10-23 07:37:24 -07:00 committed by ocornut
parent 09fe7b19d7
commit 4e99c0ab1a
6 changed files with 43 additions and 0 deletions

View File

@ -268,6 +268,39 @@ jobs:
shell: cmd
run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx12/example_win32_directx12.vcxproj /p:Platform=x64 /p:Configuration=Release'
Build-Windows-ARM64:
runs-on: windows-11-arm
name: Build - Windows ARM64
defaults:
run:
working-directory: ${{ github.workspace }}/imgui
env:
VS_PATH: C:\Program Files\Microsoft Visual Studio\18\Enterprise
steps:
- uses: actions/checkout@v6
with:
path: ${{ github.workspace }}/imgui
- name: Build example_null (extra warnings, msvc arm64)
shell: cmd
run: |
cd examples\example_null
call "%VS_PATH%\VC\Auxiliary\Build\vcvarsarm64.bat"
.\build_win.bat /W4
- name: Run example_null (msvc arm64)
shell: cmd
run: examples\example_null\Debug\example_null.exe
- name: Build example_win32_directx11 (msvc arm64)
shell: cmd
run: |
cd examples\example_win32_directx11
call "%VS_PATH%\VC\Auxiliary\Build\vcvarsarm64.bat"
.\build_win.bat
Build-Linux:
runs-on: ubuntu-latest
name: Build - Linux

View File

@ -69,9 +69,11 @@ Other Changes:
- ImVec2: added a check for cases where a custom `IM_VEC2_CLASS_EXTRA` macro
adds an extra `operator=` to ImVec2. This isn't supported but should not
be needed as you should have a constructor to convert from your type to ImVec2.
- CI: added some ARM64 builds. (#9593) [@Harishmcw]
- Examples: renamed various helper batch files from build_win32.bat to build_win.bat
to reflect that they can also build X64 or ARM64, given the right environment.
Made the script detect the environment when needed (e.g. to specify library path).
- Examples: added support for ARM64 in selected build_win.bat helpers. (#9593) [@Harishmcw]
-----------------------------------------------------------------------

View File

@ -5,6 +5,7 @@
@if not defined TARGET_ARCH if "%VisualStudioVersion%"=="14.0" (set TARGET_ARCH=x86& if defined Platform set TARGET_ARCH=%Platform%)
@if /I "%TARGET_ARCH%"=="x86" goto arch_ok
@if /I "%TARGET_ARCH%"=="x64" goto arch_ok
@if /I "%TARGET_ARCH%"=="arm64" goto arch_ok
@echo Unsupported or uninitialized compiler environment. First run vcvars32.bat (x86) or vcvars64.bat (x64).
@exit /b 1
@ -15,6 +16,7 @@
@set LIBS=SDL3.lib d3d11.lib d3dcompiler.lib shell32.lib
@if /I "%TARGET_ARCH%"=="x86" set LIBS=%LIBS% /LIBPATH:%SDL3_DIR%\lib\x86
@if /I "%TARGET_ARCH%"=="x64" set LIBS=%LIBS% /LIBPATH:%SDL3_DIR%\lib\x64
@if /I "%TARGET_ARCH%"=="arm64" set LIBS=%LIBS% /LIBPATH:%SDL3_DIR%\lib\arm64
@set OUT_DIR=Debug
mkdir %OUT_DIR%

View File

@ -5,6 +5,7 @@
@if not defined TARGET_ARCH if "%VisualStudioVersion%"=="14.0" (set TARGET_ARCH=x86& if defined Platform set TARGET_ARCH=%Platform%)
@if /I "%TARGET_ARCH%"=="x86" goto arch_ok
@if /I "%TARGET_ARCH%"=="x64" goto arch_ok
@if /I "%TARGET_ARCH%"=="arm64" goto arch_ok
@echo Unsupported or uninitialized compiler environment. First run vcvars32.bat (x86) or vcvars64.bat (x64).
@exit /b 1
@ -15,6 +16,7 @@
@set LIBS=SDL3.lib opengl32.lib shell32.lib
@if /I "%TARGET_ARCH%"=="x86" set LIBS=%LIBS% /LIBPATH:%SDL3_DIR%\lib\x86
@if /I "%TARGET_ARCH%"=="x64" set LIBS=%LIBS% /LIBPATH:%SDL3_DIR%\lib\x64
@if /I "%TARGET_ARCH%"=="arm64" set LIBS=%LIBS% /LIBPATH:%SDL3_DIR%\lib\arm64
@set OUT_DIR=Debug
mkdir %OUT_DIR%

View File

@ -5,6 +5,7 @@
@if not defined TARGET_ARCH if "%VisualStudioVersion%"=="14.0" (set TARGET_ARCH=x86& if defined Platform set TARGET_ARCH=%Platform%)
@if /I "%TARGET_ARCH%"=="x86" goto arch_ok
@if /I "%TARGET_ARCH%"=="x64" goto arch_ok
@if /I "%TARGET_ARCH%"=="arm64" goto arch_ok
@echo Unsupported or uninitialized compiler environment. First run vcvars32.bat (x86) or vcvars64.bat (x64).
@exit /b 1
@ -15,6 +16,7 @@
@set LIBS=SDL3.lib shell32.lib
@if /I "%TARGET_ARCH%"=="x86" set LIBS=%LIBS% /LIBPATH:%SDL3_DIR%\lib\x86
@if /I "%TARGET_ARCH%"=="x64" set LIBS=%LIBS% /LIBPATH:%SDL3_DIR%\lib\x64
@if /I "%TARGET_ARCH%"=="arm64" set LIBS=%LIBS% /LIBPATH:%SDL3_DIR%\lib\arm64
@set OUT_DIR=Debug
mkdir %OUT_DIR%

View File

@ -5,6 +5,7 @@
@if not defined TARGET_ARCH if "%VisualStudioVersion%"=="14.0" (set TARGET_ARCH=x86& if defined Platform set TARGET_ARCH=%Platform%)
@if /I "%TARGET_ARCH%"=="x86" goto arch_ok
@if /I "%TARGET_ARCH%"=="x64" goto arch_ok
@if /I "%TARGET_ARCH%"=="arm64" goto arch_ok
@echo Unsupported or uninitialized compiler environment. First run vcvars32.bat (x86) or vcvars64.bat (x64).
@exit /b 1
@ -15,6 +16,7 @@
@set LIBS=SDL3.lib
@if /I "%TARGET_ARCH%"=="x86" set LIBS=%LIBS% /LIBPATH:%SDL3_DIR%\lib\x86
@if /I "%TARGET_ARCH%"=="x64" set LIBS=%LIBS% /LIBPATH:%SDL3_DIR%\lib\x64
@if /I "%TARGET_ARCH%"=="arm64" set LIBS=%LIBS% /LIBPATH:%SDL3_DIR%\lib\arm64
@set OUT_DIR=Debug
mkdir %OUT_DIR%