File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : C++ Build with Dependencies
2+
3+ # on: [push] # 触发条件,推送和拉取请求时,
4+ on :
5+ workflow_dispatch : # 添加这行来启用手动触发
6+
7+ permissions :
8+ contents : write
9+
10+ jobs :
11+ build :
12+ strategy :
13+ matrix :
14+ configuration : [Release]
15+ platform : [x86]
16+
17+ runs-on : windows-latest # 最新的 Windows 环境
18+
19+ steps :
20+ # 检出您的主仓库代码
21+ - name : Checkout main repository code
22+ uses : actions/checkout@v3
23+
24+ # 检出依赖的xengine仓库到指定的xengine目录
25+ - name : Checkout dependency repository (xengine)
26+ uses : actions/checkout@v3
27+ with :
28+ repository : libxengine/xengine
29+ path : xengine
30+
31+ - name : Checkout dependency repository (vcpkg)
32+ uses : actions/checkout@v3
33+ with :
34+ repository : https://github.com/microsoft/vcpkg.git
35+ path : vcpkg
36+
37+ # 设置依赖库的环境变量
38+ - name : Set up Dependency Environment Variables
39+ run : |
40+ echo "XENGINE_INCLUDE=${{ github.workspace }}/xengine" | Out-File -FilePath $env:GITHUB_ENV -Append
41+ echo "XENGINE_LIB32=${{ github.workspace }}/xengine/XEngine_Windows/x86" | Out-File -FilePath $env:GITHUB_ENV -Append
42+ echo "XENGINE_LIB64=${{ github.workspace }}/xengine/XEngine_Windows/x64" | Out-File -FilePath $env:GITHUB_ENV -Append
43+ shell : pwsh
44+
45+ # 配置 MSBuild 的路径,准备构建 VC++ 项目
46+ - name : Setup MSBuild
47+ 48+ # 编译
49+ - name : Build Solution
50+ run : msbuild XEngine_Source/XEngine.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
You can’t perform that action at this time.
0 commit comments