Skip to content

Commit 60c6eba

Browse files
committed
windows CI fix
1 parent 89d9a32 commit 60c6eba

1 file changed

Lines changed: 24 additions & 5 deletions

File tree

.github/workflows/platforms_build.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,30 @@ jobs:
9999
if: runner.os == 'Windows'
100100
shell: pwsh
101101
run: |
102-
cmake -S . -B build/ci -G "Visual Studio 17 2022" -A x64 `
103-
-DBAYSOR_WITH_TESTS=OFF `
104-
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" `
105-
-DVCPKG_TARGET_TRIPLET="${{ matrix.triplet }}" `
106-
-DVCPKG_INSTALLED_DIR="$env:RUNNER_TEMP/vcpkg_installed"
102+
$configureArgs = @(
103+
"-S", ".",
104+
"-B", "build/ci",
105+
"-G", "Visual Studio 17 2022",
106+
"-A", "x64",
107+
"-DBAYSOR_WITH_TESTS=OFF",
108+
"-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake",
109+
"-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}",
110+
"-DVCPKG_INSTALLED_DIR=$env:RUNNER_TEMP/vcpkg_installed"
111+
)
112+
113+
$maxAttempts = 3
114+
for ($attempt = 1; $attempt -le $maxAttempts; $attempt++) {
115+
Write-Host "Configure attempt $attempt of $maxAttempts"
116+
& cmake @configureArgs
117+
if ($LASTEXITCODE -eq 0) {
118+
break
119+
}
120+
if ($attempt -eq $maxAttempts) {
121+
exit $LASTEXITCODE
122+
}
123+
Write-Host "Configure failed, retrying after a short delay..."
124+
Start-Sleep -Seconds (30 * $attempt)
125+
}
107126
108127
- name: Build
109128
if: runner.os != 'Windows'

0 commit comments

Comments
 (0)