File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ for ((attempt=0; attempt<limit; attempt++)); do
15
15
if " $@ " ; then
16
16
# Command succeeded, exit the loop
17
17
echo " Done."
18
- break
18
+ # Exit with success status code.
19
+ exit 0
19
20
fi
20
21
21
22
# Calculate the sleep duration using the retry interval from the array
@@ -26,3 +27,7 @@ for ((attempt=0; attempt<limit; attempt++)); do
26
27
echo " Retry #$attempt in $sleepDuration seconds..."
27
28
sleep " $sleepDuration "
28
29
done
30
+
31
+ echo " Failed to execute command '$1 '."
32
+ # Exit with an error code.
33
+ exit 1
Original file line number Diff line number Diff line change @@ -151,15 +151,20 @@ jobs:
151
151
include :
152
152
# macOS
153
153
154
+ # macOS builds fail semi-randomly with an `libc++abi: Pure virtual function called!` error.
155
+ # For now on run them with retry; resort to compiling only if it won't be enough (i.e. first time when it will fail three times in the row).
156
+ # See: https://github.com/godot-rust/demo-projects/issues/12
154
157
- name : macos-x86
155
158
os : macos-13
156
159
artifact-name : macos-x86-nightly
157
160
godot-binary : godot.macos.editor.dev.x86_64
161
+ retry : true
158
162
159
163
- name : macos-arm
160
164
os : macos-latest
161
165
artifact-name : macos-arm-nightly
162
166
godot-binary : godot.macos.editor.dev.arm64
167
+ retry : true
163
168
164
169
# Windows
165
170
@@ -214,17 +219,25 @@ jobs:
214
219
run : cargo build --release ${{ matrix.rust-extra-args }}
215
220
216
221
- name : " Run examples for short time"
222
+ env :
223
+ RETRY : ${{ matrix.retry }}
217
224
run : |
218
225
# Enable extended globbing to allow pattern exclusion.
219
226
shopt -s extglob
220
227
221
228
# Match all directories/files except `target` and any starting with `.`.
222
229
files='!(target|.*)/'
223
-
230
+ if [[ $RETRY == "true" ]]; then
231
+ # macOS – retry running demo projects several times on fail.
232
+ echo "Running examples with retry"
233
+ RETRY_CMD="./.github/other/retry.sh"
234
+ else
235
+ RETRY_CMD=""
236
+ fi
224
237
# List all folders in current directory. Don't quote $files variable.
225
238
for demo in $files; do
226
239
# Strip trailing '/' from folder name.
227
- ./.github/other/check-example.sh "${demo%/}"
240
+ $RETRY_CMD ./.github/other/check-example.sh "${demo%/}"
228
241
done
229
242
230
243
You can’t perform that action at this time.
0 commit comments