chore(ci): fix build script
This commit is contained in:
parent
7301ae4359
commit
8c053bfd62
14
.github/workflows/build-ci.yml
vendored
14
.github/workflows/build-ci.yml
vendored
@ -44,19 +44,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
if (!(Test-Path 'C:/Tools')) { New-Item -ItemType Directory -Force -Path 'C:/Tools' | Out-Null }
|
if (!(Test-Path 'C:/Tools')) { New-Item -ItemType Directory -Force -Path 'C:/Tools' | Out-Null }
|
||||||
cd C:/Tools
|
cd C:/Tools
|
||||||
git clone --depth 1 https://github.com/microsoft/vcpkg vcpkg
|
git clone --single-branch https://github.com/microsoft/vcpkg vcpkg
|
||||||
# 加一次简单重试,防网络抖动
|
|
||||||
$retry = 0
|
$retry = 0
|
||||||
while ($retry -lt 3) {
|
while ($retry -lt 3) {
|
||||||
try {
|
try { .\vcpkg\bootstrap-vcpkg.bat -disableMetrics ; break }
|
||||||
.\vcpkg\bootstrap-vcpkg.bat
|
catch { $retry++; if ($retry -ge 3) { throw }; Write-Host "bootstrap 失败,重试第 $retry 次..." ; Start-Sleep 15 }
|
||||||
break
|
|
||||||
} catch {
|
|
||||||
$retry++
|
|
||||||
if ($retry -ge 3) { throw }
|
|
||||||
Write-Host "bootstrap 失败,重试第 $retry 次..."
|
|
||||||
Start-Sleep -Seconds 15
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- name: 设置 VCPKG_ROOT
|
- name: 设置 VCPKG_ROOT
|
||||||
|
Loading…
Reference in New Issue
Block a user