add retry build.
This commit is contained in:
29
.github/workflows/ccpp.yml
vendored
29
.github/workflows/ccpp.yml
vendored
@@ -9,19 +9,44 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup build directory
|
- name: Setup build directory
|
||||||
run: mkdir buildproducts
|
run: mkdir buildproducts
|
||||||
|
|
||||||
- name: CMake
|
- name: CMake
|
||||||
working-directory: ./buildproducts
|
working-directory: ./buildproducts
|
||||||
run: cmake ..
|
run: |
|
||||||
|
retry=0
|
||||||
|
max_retries=3
|
||||||
|
until cmake ..; do
|
||||||
|
retry=$((retry+1))
|
||||||
|
echo "Retry $retry/$max_retries..."
|
||||||
|
if [ "$retry" -ge "$max_retries" ]; then
|
||||||
|
echo "CMake configuration failed after $max_retries attempts."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sleep 10
|
||||||
|
done
|
||||||
|
|
||||||
- name: Make
|
- name: Make
|
||||||
working-directory: ./buildproducts
|
working-directory: ./buildproducts
|
||||||
run: make
|
run: |
|
||||||
|
retry=0
|
||||||
|
max_retries=3
|
||||||
|
until make; do
|
||||||
|
retry=$((retry+1))
|
||||||
|
echo "Retry $retry/$max_retries..."
|
||||||
|
if [ "$retry" -ge "$max_retries" ]; then
|
||||||
|
echo "Make build failed after $max_retries attempts."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sleep 10
|
||||||
|
done
|
||||||
|
|
||||||
- name: Copy header files to build directory
|
- name: Copy header files to build directory
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
29
.github/workflows/macos.yml
vendored
29
.github/workflows/macos.yml
vendored
@@ -9,19 +9,44 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup build directory
|
- name: Setup build directory
|
||||||
run: mkdir buildproducts
|
run: mkdir buildproducts
|
||||||
|
|
||||||
- name: CMake
|
- name: CMake
|
||||||
working-directory: ./buildproducts
|
working-directory: ./buildproducts
|
||||||
run: cmake ..
|
run: |
|
||||||
|
retry=0
|
||||||
|
max_retries=3
|
||||||
|
until cmake ..; do
|
||||||
|
((retry++))
|
||||||
|
echo "Retry $retry/$max_retries..."
|
||||||
|
if [ "$retry" -ge "$max_retries" ]; then
|
||||||
|
echo "CMake configuration failed after $max_retries attempts."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sleep 10
|
||||||
|
done
|
||||||
|
|
||||||
- name: Make
|
- name: Make
|
||||||
working-directory: ./buildproducts
|
working-directory: ./buildproducts
|
||||||
run: make
|
run: |
|
||||||
|
retry=0
|
||||||
|
max_retries=3
|
||||||
|
until make; do
|
||||||
|
((retry++))
|
||||||
|
echo "Retry $retry/$max_retries..."
|
||||||
|
if [ "$retry" -ge "$max_retries" ]; then
|
||||||
|
echo "Make build failed after $max_retries attempts."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sleep 10
|
||||||
|
done
|
||||||
|
|
||||||
- name: Copy header files to build directory
|
- name: Copy header files to build directory
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
18
.github/workflows/win32.yml
vendored
18
.github/workflows/win32.yml
vendored
@@ -9,6 +9,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -19,7 +21,21 @@ jobs:
|
|||||||
|
|
||||||
- name: CMake
|
- name: CMake
|
||||||
working-directory: ./buildproducts
|
working-directory: ./buildproducts
|
||||||
run: cmake .. -A Win32 && cmake --build . --config Release
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$retryCount = 0
|
||||||
|
$maxRetries = 3
|
||||||
|
do {
|
||||||
|
cmake .. -A Win32 && cmake --build . --config Release
|
||||||
|
if ($LASTEXITCODE -eq 0) { break }
|
||||||
|
Write-Host "Retry $($retryCount + 1)/$maxRetries..."
|
||||||
|
Start-Sleep -Seconds 10
|
||||||
|
$retryCount++
|
||||||
|
} while ($retryCount -lt $maxRetries)
|
||||||
|
if ($retryCount -eq $maxRetries) {
|
||||||
|
Write-Host "CMake build failed after $maxRetries attempts."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
- name: Copy header files to build directory
|
- name: Copy header files to build directory
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
19
.github/workflows/win64.yml
vendored
19
.github/workflows/win64.yml
vendored
@@ -9,6 +9,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -19,7 +21,22 @@ jobs:
|
|||||||
|
|
||||||
- name: CMake
|
- name: CMake
|
||||||
working-directory: ./buildproducts
|
working-directory: ./buildproducts
|
||||||
run: cmake .. -A x64 && cmake --build . --config Release
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$retryCount = 0
|
||||||
|
$maxRetries = 3
|
||||||
|
do {
|
||||||
|
cmake .. -A x64 # Specify architecture for 64-bit
|
||||||
|
cmake --build . --config Release
|
||||||
|
if ($LASTEXITCODE -eq 0) { break }
|
||||||
|
Write-Host "Retry $($retryCount + 1)/$maxRetries..."
|
||||||
|
Start-Sleep -Seconds 10
|
||||||
|
$retryCount++
|
||||||
|
} while ($retryCount -lt $maxRetries)
|
||||||
|
if ($retryCount -eq $maxRetries) {
|
||||||
|
Write-Host "CMake build failed after $maxRetries attempts."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
- name: Copy header files to build directory
|
- name: Copy header files to build directory
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user