File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments