fix(ci): ui-golden 需要机器级 SDL2 SDK——补 DTU_SDL2_DIR、配置期护栏与 build 缓存自愈
This commit is contained in:
@@ -117,6 +117,16 @@ if (Test-Path $cache) {
|
||||
}
|
||||
}
|
||||
|
||||
# 半截缓存检查:上一次配置如果在 CMakeLists 里 FATAL_ERROR 中断(例如缺 SDL2 SDK),
|
||||
# CMakeCache.txt 已经写下、工程文件却根本没生成,于是下面「有缓存就不配置」会跳过配置,
|
||||
# 失败点跑到离根因很远的 MSBuild(MSB1009: 项目文件不存在)——2026-10-27 在 CI 等价工作区
|
||||
# 实测:设好 DTU_SDL2_DIR 之后仍然红,红因就是这个残留缓存。与上面的生成器不符同理,
|
||||
# 删掉 build/ 重来,让报错回到配置期那一行。
|
||||
if ((Test-Path $cache) -and -not (Test-Path (Join-Path $buildDir 'ALL_BUILD.vcxproj'))) {
|
||||
Write-Host '[build_sim] build/ 有缓存但没有工程文件(上次配置中断)-> 删除重建' -ForegroundColor Yellow
|
||||
if (-not (Remove-BuildDir $buildDir)) { exit 3 }
|
||||
}
|
||||
|
||||
# --- 4. 配置 + 构建 ---------------------------------------------------------
|
||||
if (-not (Test-Path (Join-Path $buildDir 'CMakeCache.txt'))) {
|
||||
Write-Host '[build_sim] CMake 配置 ...'
|
||||
|
||||
Reference in New Issue
Block a user