Skip to content

Commit f1db728

Browse files
committed
ci:added arm64 windows build
1 parent 6830737 commit f1db728

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

.github/workflows/msbuild.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
configuration: [Debug ,Release]
15-
platform: [x86 ,x64]
15+
platform: [x86 ,x64 ,ARM64]
1616

1717
runs-on: windows-latest # 最新的 Windows 环境
1818

@@ -50,6 +50,14 @@ jobs:
5050
./vcpkg.exe install sdl2:x64-windows
5151
./vcpkg.exe integrate install
5252
shell: pwsh
53+
- name: vcpkg install (Arm64)
54+
if: matrix.platform == 'ARM64'
55+
run: |
56+
cd vcpkg
57+
./bootstrap-vcpkg.bat
58+
./vcpkg.exe install sdl2:Arm64-windows
59+
./vcpkg.exe integrate install
60+
shell: pwsh
5361

5462
- name: Set up Dependency x86_64 Environment
5563
if: matrix.platform == 'x64'
@@ -71,7 +79,21 @@ jobs:
7179
echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
7280
echo "XENGINE_LIB32=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
7381
shell: pwsh
74-
82+
- name: Set up Dependency x86_32 Environment
83+
if: matrix.platform == 'ARM64'
84+
run: |
85+
$response = Invoke-RestMethod -Uri "https://api.github.com/repos/libxengine/libxengine/releases/latest" -Headers @{"Accept"="application/vnd.github.v3+json"}
86+
$latest_tag = $response.tag_name
87+
Write-Host "Latest Tag: $latest_tag"
88+
89+
$url = "https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Windows_Arm64.zip"
90+
Invoke-WebRequest -Uri $url -OutFile "XEngine_Windows_Arm64.zip"
91+
Expand-Archive -Path ./XEngine_Windows_Arm64.zip -DestinationPath ./XEngine_Windows -Force
92+
93+
echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
94+
echo "XENGINE_LibArm64=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
95+
shell: pwsh
96+
7597
- name: Setup MSBuild
7698
uses: microsoft/setup-msbuild@v2
7799

0 commit comments

Comments
 (0)