Skip to content

Commit 44d8ff7

Browse files
committed
Don't run examples with macOS, resort to compiling only.
1 parent 15a3664 commit 44d8ff7

File tree

4 files changed

+36
-12
lines changed

4 files changed

+36
-12
lines changed

.github/other/rand_success.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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))

.github/other/retry.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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"
2828
done
29+
30+
# Exit with an error code – command invoked cannot execute.
31+
exit 126

.github/other/warn_on_fail.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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

.github/workflows/ci.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -150,41 +150,36 @@ 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

177174
- name: linux
178175
os: ubuntu-22.04
179176
artifact-name: linux-nightly
180177
godot-binary: godot.linuxbsd.editor.dev.x86_64
181-
failable: false
182178

183179
- name: linux-4.4
184180
os: ubuntu-22.04
185181
artifact-name: linux-4.4
186182
godot-binary: godot.linuxbsd.editor.dev.x86_64
187-
failable: false
188183

189184
# Deliberately don't include:
190185
#
@@ -220,17 +215,17 @@ jobs:
220215
run: cargo build --release ${{ matrix.rust-extra-args }}
221216

222217
- name: "Run examples for short time"
223-
continue-on-error: ${{ matrix.failable }}
224218
env:
225-
FAILABLE: ${{ matrix.failable }}
219+
RETRY: ${{ matrix.retry }}
226220
run: |
227221
# Enable extended globbing to allow pattern exclusion.
228222
shopt -s extglob
229223
230224
# Match all directories/files except `target` and any starting with `.`.
231225
files='!(target|.*)/'
232-
if [[ $FAILABLE == "true" ]]; then
233-
# MacOS x86 – try to rerun demo projects several times on fail.
226+
if [[ $RETRY == "true" ]]; then
227+
echo "Running with retry"
228+
# MacOS – try to rerun demo projects several times on fail.
234229
RUN="./.github/other/retry.sh ./.github/other/check-example.sh"
235230
else
236231
RUN="./.github/other/check-example.sh"

0 commit comments

Comments
 (0)