File tree Expand file tree Collapse file tree 4 files changed +35
-10
lines changed Expand file tree Collapse file tree 4 files changed +35
-10
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Copyright (c) godot-rust; Bromeon and contributors.
3+ # This Source Code Form is subject to the terms of the Mozilla Public
4+ # License, v. 2.0. If a copy of the MPL was not distributed with this
5+ # file, You can obtain one at https://mozilla.org/MPL/2.0/.
6+
7+ number=$RANDOM
8+ BINARY=2
9+
10+ (( number %= BINARY))
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ for ((attempt=0; attempt<limit; attempt++)); do
1515 if " $@ " ; then
1616 # Command succeeded, exit the loop
1717 echo " Done."
18- break
18+ exit 0
1919 fi
2020
2121 # Calculate the sleep duration using the retry interval from the array
@@ -26,3 +26,6 @@ for ((attempt=0; attempt<limit; attempt++)); do
2626 echo " Retry #$attempt in $sleepDuration seconds..."
2727 sleep " $sleepDuration "
2828done
29+
30+ # Exit with an error code – command invoked cannot execute.
31+ exit 126
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Copyright (c) godot-rust; Bromeon and contributors.
3+ # This Source Code Form is subject to the terms of the Mozilla Public
4+ # License, v. 2.0. If a copy of the MPL was not distributed with this
5+ # file, You can obtain one at https://mozilla.org/MPL/2.0/.
6+
7+
8+ ALL_ARGS=(" $@ " )
9+ CMD=(" ${ALL_ARGS[@]:- 1} " )
10+ WARNING_MESSAGE=" ${ALL_ARGS[-1]} "
11+
12+ if " ${CMD[@]} " ; then
13+ echo " Command executed successfully."
14+ else
15+ echo " ::warning ::" " $WARNING_MESSAGE "
16+ fi
Original file line number Diff line number Diff line change @@ -150,27 +150,24 @@ jobs:
150150 matrix :
151151 include :
152152 # macOS
153- # macOS x86 (intel) has tendency to fail semi-randomly.
154- # We allow this job to fail without invalidating the whole run.
155153 - name : macos-x86
156154 os : macos-13
157155 artifact-name : macos-x86-nightly
158156 godot-binary : godot.macos.editor.dev.x86_64
159- failable : true
157+ retry : true
160158
161159 - name : macos-arm
162160 os : macos-latest
163161 artifact-name : macos-arm-nightly
164162 godot-binary : godot.macos.editor.dev.arm64
165- failable : false
163+ retry : true
166164
167165 # Windows
168166
169167 - name : windows
170168 os : windows-latest
171169 artifact-name : windows-nightly
172170 godot-binary : godot.windows.editor.dev.x86_64.exe
173- failable : false
174171
175172 # Linux
176173
@@ -220,17 +217,16 @@ jobs:
220217 run : cargo build --release ${{ matrix.rust-extra-args }}
221218
222219 - name : " Run examples for short time"
223- continue-on-error : ${{ matrix.failable }}
224220 env :
225- FAILABLE : ${{ matrix.failable }}
221+ RETRY : ${{ matrix.retry }}
226222 run : |
227223 # Enable extended globbing to allow pattern exclusion.
228224 shopt -s extglob
229225
230226 # Match all directories/files except `target` and any starting with `.`.
231227 files='!(target|.*)/'
232- if [[ $FAILABLE == "true" ]]; then
233- # MacOS x86 – try to rerun demo projects several times on fail.
228+ if [[ RETRY == "true" ]]; then
229+ # MacOS – try to rerun demo projects several times on fail.
234230 RUN="./.github/other/retry.sh ./.github/other/check-example.sh"
235231 else
236232 RUN="./.github/other/check-example.sh"
You can’t perform that action at this time.
0 commit comments