Skip to content

Commit 537d623

Browse files
committed
Update CPack workaround for macOS 13
1 parent 0d72480 commit 537d623

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/qt5_6.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,26 @@ jobs:
126126
- name: 👷 Build
127127
shell: bash
128128
run: |
129-
# Remove once issue with hombrew cache action is fixed
129+
# Remove once issue with Homebrew cache action is fixed
130130
brew reinstall --formula cmake
131+
131132
# Build
132133
cmake --preset macos-${{ env.BUILD_TYPE }}
133134
cmake --build --preset macos-${{ env.BUILD_TYPE }} --parallel $(sysctl -n hw.ncpu)
135+
134136
# CPack workaround for macOS 13
135-
echo killing...; sudo pkill -9 XProtect >/dev/null || true;
136-
echo waiting...; while pgrep XProtect; do sleep 3; done;
137-
cd build; cpack
137+
attempt=0
138+
max_attempts=5
139+
while [ $attempt -lt $max_attempts ]; do
140+
if cd build && cpack; then
141+
echo "Package created successfully"
142+
break
143+
else
144+
echo "Failed to create package, retrying..."
145+
sleep 10
146+
fi
147+
attempt=$((attempt + 1))
148+
done
138149
env:
139150
BUILD_TYPE: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }}
140151

0 commit comments

Comments
 (0)