1717 fail-fast : false
1818 matrix :
1919 configuration : [Debug ,Release]
20- platform : [x86 ,x64]
20+ platform : [x86 ,x64 ,ARM64 ]
2121
2222 runs-on : windows-latest # 最新的 Windows 环境
23- env :
24- ACTIONS_STEP_DEBUG : true
2523 steps :
2624 # 检出您的主仓库代码
2725 - name : Checkout main repository code
6462 ./vcpkg.exe install lua:x64-windows opencv[contrib]:x64-windows libqrencode:x64-windows
6563 ./vcpkg.exe integrate install
6664 shell : pwsh
65+ - name : vcpkg install (ARM64)
66+ if : matrix.platform == 'ARM64'
67+ run : |
68+ cd vcpkg
69+ ./bootstrap-vcpkg.bat
70+ ./vcpkg.exe install lua:Arm64-windows opencv[contrib]:Arm64-windows libqrencode:Arm64-windows
71+ ./vcpkg.exe integrate install
72+ shell : pwsh
6773
6874 - name : Set up Dependency x86_64 Environment
6975 if : matrix.platform == 'x64'
8591 echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
8692 echo "XENGINE_LIB32=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
8793 shell : pwsh
88-
94+ - name : Set up Dependency ARM64 Environment
95+ if : matrix.platform == 'ARM64'
96+ run : |
97+ $response = Invoke-RestMethod -Uri "https://api.github.com/repos/libxengine/libxengine/releases/latest" -Headers @{"Accept"="application/vnd.github.v3+json"}
98+ $latest_tag = $response.tag_name
99+ Write-Host "Latest Tag: $latest_tag"
100+
101+ $url = "https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Windows_Arm64.zip"
102+ Invoke-WebRequest -Uri $url -OutFile "XEngine_Windows_Arm64.zip"
103+ Expand-Archive -Path ./XEngine_Windows_Arm64.zip -DestinationPath ./XEngine_Windows -Force
104+
105+ echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
106+ echo "XENGINE_LIBARM64=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
107+ shell : pwsh
108+
89109 # 配置 MSBuild 的路径,准备构建 VC++ 项目
90110 - name : Setup MSBuild
91111 uses : microsoft/setup-msbuild@v2
@@ -113,6 +133,15 @@ jobs:
113133 cd XEngine_Release
114134 ./VSCopy_x64.bat
115135 shell : pwsh
136+ - name : Conditional Step for ARM64 Release
137+ if : matrix.configuration == 'Release' && matrix.platform == 'ARM64'
138+ run : |
139+ cp -r XEngine_Source/ARM64/Release/*.dll XEngine_Release/
140+ cp -r XEngine_Source/ARM64/Release/*.exe XEngine_Release/
141+ cp -r XEngine_Source/VSCopy_Arm64.bat XEngine_Release/
142+ cd XEngine_Release
143+ ./VSCopy_Arm64.bat
144+ shell : pwsh
116145
117146 - name : Upload folder as artifact with x86
118147 if : matrix.configuration == 'Release' && matrix.platform == 'x64'
@@ -129,3 +158,10 @@ jobs:
129158 name : XEngine_APIServiceApp-x86_64-Windows
130159 path : XEngine_Release/
131160 retention-days : 1
161+ - name : Upload folder as artifact with ARM64
162+ if : matrix.configuration == 'Release' && matrix.platform == 'ARM64'
163+ uses : actions/upload-artifact@v4
164+ with :
165+ name : XEngine_APIServiceApp-ARM64-Windows
166+ path : XEngine_Release/
167+ retention-days : 1
0 commit comments