ci: retry package creation multiple times
DMG creation on macOS occasionally fails, so try multiple times https://gitlab.kitware.com/cmake/cmake/-/issues/25671
This commit is contained in:
parent
7cddde32ac
commit
a50e0319d5
17
.github/workflows/main.yml
vendored
17
.github/workflows/main.yml
vendored
@ -139,7 +139,22 @@ jobs:
|
||||
- name: Package (CPack)
|
||||
if: ${{ always() && steps.build.outcome == 'success' }}
|
||||
run: |
|
||||
cmake --build build/ --config Release --target package
|
||||
# DMG creation on macOS occasionally fails, so try multiple times
|
||||
# https://gitlab.kitware.com/cmake/cmake/-/issues/25671
|
||||
success=0
|
||||
max_tries=10
|
||||
for i in $(seq $max_tries); do
|
||||
cmake --build build/ --config Release --target package && success=1
|
||||
if test $success = 1; then
|
||||
break
|
||||
fi
|
||||
echo "Package creation failed. Sleep 1 second and try again."
|
||||
sleep 1
|
||||
done
|
||||
if test $success = 0; then
|
||||
echo "Package creation failed after $max_tries attempts."
|
||||
exit 1
|
||||
fi
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
${{ matrix.platform.source_cmd }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user