Skip to content

Commit 8f9807f

Browse files
authored
Added ARM64 to the CI jobs for Linux and Windows (#2719)
- Expanded Bootstrap.bat to check for vcvarsarm64.bat
1 parent acf2b76 commit 8f9807f

3 files changed

Lines changed: 31 additions & 11 deletions

File tree

.github/workflows/ci-workflow.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@ on: [push, pull_request]
44

55
jobs:
66
linux:
7-
runs-on: ubuntu-latest
7+
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
1010
config: [debug, release]
11-
platform: [x64]
11+
platform: [x64, ARM64]
1212
depsrc: [none, contrib, system]
1313
cc: [gcc, clang]
14+
include:
15+
- platform: x64
16+
os: ubuntu-latest
17+
- platform: ARM64
18+
os: ubuntu-24.04-arm
1419
timeout-minutes: 15
1520
steps:
1621
- name: Checkout
@@ -59,13 +64,20 @@ jobs:
5964
name: premake-macosx-${{ matrix.platform }}
6065
path: bin/${{ matrix.config }}/
6166
windows:
62-
runs-on: windows-2022
67+
runs-on: ${{ matrix.os }}
6368
strategy:
6469
matrix:
6570
config: [debug, release]
66-
platform: [Win32, x64]
71+
platform: [Win32, x64, ARM64]
6772
msdev: [vs2022]
6873
cc: [msc, clang]
74+
include:
75+
- platform: Win32
76+
os: windows-2022
77+
- platform: x64
78+
os: windows-2022
79+
- platform: ARM64
80+
os: windows-11-arm
6981
timeout-minutes: 15
7082
steps:
7183
- name: Checkout

Bootstrap.bat

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@ REM ===========================================================================
1212
SET "PlatformArg="
1313
SET "ConfigArg="
1414

15-
IF NOT "%PLATFORM%" == "" (
16-
SET "PlatformArg=PLATFORM=%PLATFORM%"
17-
) ELSE (
15+
IF "%PLATFORM%" == "" (
1816
IF "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
19-
SET "PlatformArg=PLATFORM=x64"
17+
SET "PLATFORM=x64"
18+
) ELSE IF "%PROCESSOR_ARCHITECTURE%" == "ARM64" (
19+
SET "PLATFORM=ARM64"
2020
) ELSE (
21-
SET "PlatformArg=PLATFORM=Win32"
21+
SET "PLATFORM=Win32"
2222
)
2323
)
2424

25+
SET "PlatformArg=PLATFORM=%PLATFORM%"
26+
2527
IF NOT "%CONFIG%" == "" (
2628
SET "ConfigArg=CONFIG=%CONFIG%"
2729
)
@@ -122,6 +124,12 @@ IF NOT EXIST %VsWherePath% (
122124
SET VsWhereCmdLine="!VsWherePath! -nologo -latest -version [%VsVersionMin%,%VsVersionMax%) -property installationPath"
123125

124126
FOR /F "usebackq delims=" %%i in (`!VsWhereCmdLine!`) DO (
127+
IF /I "%PLATFORM%" == "ARM64" (
128+
IF EXIST "%%i\VC\Auxiliary\Build\vcvarsarm64.bat" (
129+
CALL "%%i\VC\Auxiliary\Build\vcvarsarm64.bat" && CALL :Build
130+
EXIT /B !ERRORLEVEL!
131+
)
132+
)
125133
IF EXIST "%%i\VC\Auxiliary\Build\vcvars64.bat" (
126134
CALL "%%i\VC\Auxiliary\Build\vcvars64.bat" && CALL :Build
127135
EXIT /B !ERRORLEVEL!
@@ -133,7 +141,7 @@ FOR /F "usebackq delims=" %%i in (`!VsWhereCmdLine!`) DO (
133141
)
134142
)
135143

136-
ECHO Could not find vcvars64.bat or vcvars32.bat to setup Visual Studio environment
144+
ECHO Could not find a suitable vcvars batch file to setup Visual Studio environment
137145
EXIT /B 2
138146

139147
REM :VsWhereVisualBootstrap

premake5.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@
260260
filter { "system:windows", "options:arch=ARM" }
261261
platforms { "ARM" }
262262

263-
filter { "system:windows", "options:arch=AARCH64" }
263+
filter { "system:windows", "options:arch=AARCH64 or arch=ARM64" }
264264
platforms { "ARM64" }
265265

266266
filter { "system:windows", "options:arch=x86 or arch=Win32" }

0 commit comments

Comments
 (0)