2121 platform : [x86 ,x64]
2222
2323 runs-on : windows-latest # 最新的 Windows 环境
24-
24+ env :
25+ ACTIONS_STEP_DEBUG : true
2526 steps :
2627 # 检出您的主仓库代码
2728 - name : Checkout main repository code
@@ -65,16 +66,26 @@ jobs:
6566 ./vcpkg.exe integrate install
6667 shell : pwsh
6768
68- # 设置依赖库的环境变量
69- - name : Set up Dependency Environment Variables
69+ - name : Set up Dependency x86_64 Environment
70+ if : matrix.platform == 'x64'
7071 run : |
7172 echo "XENGINE_INCLUDE=${{ github.workspace }}/libxengine" | Out-File -FilePath $env:GITHUB_ENV -Append
72- echo "XENGINE_LIB32=${{ github.workspace }}/libxengine/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
7373 echo "XENGINE_LIB64=${{ github.workspace }}/libxengine/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
7474 shell : pwsh
75-
76- - name : Set code page
77- run : chcp 65001
75+ - name : Set up Dependency x86_32 Environment
76+ if : matrix.platform == 'x86'
77+ run : |
78+ $response = Invoke-RestMethod -Uri "https://api.github.com/repos/libxengine/libxengine/releases/latest" -Headers @{"Accept"="application/vnd.github.v3+json"}
79+ $latest_tag = $response.tag_name
80+ Write-Host "Latest Tag: $latest_tag"
81+
82+ $url = "https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Windows_x86-32.zip"
83+ Invoke-WebRequest -Uri $url -OutFile "XEngine_Windows_x86-32.zip"
84+ Expand-Archive -Path ./XEngine_Windows_x86-32.zip -DestinationPath ./XEngine_Windows -Force
85+
86+ echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
87+ echo "XENGINE_LIB32=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
88+ shell : pwsh
7889
7990 # 配置 MSBuild 的路径,准备构建 VC++ 项目
8091 - name : Setup MSBuild
8394 # 编译
8495 - name : Build Solution
8596 run : msbuild XEngine_Source/XEngine.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
97+
8698 # 测试
8799 - name : Conditional Step for x86 Release
88100 if : matrix.configuration == 'Release' && matrix.platform == 'x86'
92104 cp -r XEngine_Source/VSCopy_x86.bat XEngine_Release/
93105 cd XEngine_Release
94106 ./VSCopy_x86.bat
95- ./XEngine_APIServiceApp.exe -t
96- shell : pwsh
107+ ./XEngine_HttpApp.exe -t
97108 - name : Conditional Step for x64 Release
98109 if : matrix.configuration == 'Release' && matrix.platform == 'x64'
99110 run : |
@@ -116,4 +127,4 @@ jobs:
116127 uses : actions/upload-artifact@v4
117128 with :
118129 name : XEngine_APIServiceApp-x86_64-Windows
119- path : XEngine_Release/
130+ path : XEngine_Release/
0 commit comments