Skip to content

Commit bc17336

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

File tree

3 files changed

+27
-12
lines changed

3 files changed

+27
-12
lines changed

.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: 7 additions & 11 deletions
Original file line numberDiff line numberDiff 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
157-
artifact-name: macos-x86-nightly
155+
artifact-name: macos-x86-stable
158156
godot-binary: godot.macos.editor.dev.x86_64
159-
failable: true
157+
retry: true
160158

161159
- name: macos-arm
162160
os: macos-latest
163-
artifact-name: macos-arm-nightly
161+
artifact-name: macos-arm-stable
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"

0 commit comments

Comments
 (0)