mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-06 09:56:26 +00:00
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:

committed by
Anonymous Maarten

parent
7cddde32ac
commit
a50e0319d5
17
.github/workflows/main.yml
vendored
17
.github/workflows/main.yml
vendored
@@ -139,7 +139,22 @@ jobs:
|
|||||||
- name: Package (CPack)
|
- name: Package (CPack)
|
||||||
if: ${{ always() && steps.build.outcome == 'success' }}
|
if: ${{ always() && steps.build.outcome == 'success' }}
|
||||||
run: |
|
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
|
- name: Verify CMake configuration files
|
||||||
run: |
|
run: |
|
||||||
${{ matrix.platform.source_cmd }}
|
${{ matrix.platform.source_cmd }}
|
||||||
|
Reference in New Issue
Block a user