Skip to content

Commit fb55646

Browse files
authored
Merge branch 'master' into add-net-pong
2 parents 049621b + 9b50e00 commit fb55646

35 files changed

+857
-10
lines changed

.github/other/retry.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ for ((attempt=0; attempt<limit; attempt++)); do
1515
if "$@"; then
1616
# Command succeeded, exit the loop
1717
echo "Done."
18-
break
18+
# Exit with success status code.
19+
exit 0
1920
fi
2021

2122
# Calculate the sleep duration using the retry interval from the array
@@ -26,3 +27,7 @@ for ((attempt=0; attempt<limit; attempt++)); do
2627
echo "Retry #$attempt in $sleepDuration seconds..."
2728
sleep "$sleepDuration"
2829
done
30+
31+
echo "Failed to execute command '$1'."
32+
# Exit with an error code.
33+
exit 1

.github/workflows/ci.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ env:
3434
CLIPPY_FEATURES: '--features godot/register-docs,godot/experimental-godot-api,godot/serde'
3535
TEST_FEATURES: ''
3636
RETRY: ${{ github.workspace }}/.github/other/retry.sh
37-
CARGO_DENY_VERSION: "0.16.1"
38-
CARGO_MACHETE_VERSION: "0.7.0"
37+
CARGO_DENY_VERSION: "0.18.5"
38+
CARGO_MACHETE_VERSION: "0.9.1"
3939

4040

4141
defaults:
@@ -151,15 +151,20 @@ jobs:
151151
include:
152152
# macOS
153153

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
154157
- name: macos-x86
155158
os: macos-13
156159
artifact-name: macos-x86-nightly
157160
godot-binary: godot.macos.editor.dev.x86_64
161+
retry: true
158162

159163
- name: macos-arm
160164
os: macos-latest
161165
artifact-name: macos-arm-nightly
162166
godot-binary: godot.macos.editor.dev.arm64
167+
retry: true
163168

164169
# Windows
165170

@@ -175,9 +180,9 @@ jobs:
175180
artifact-name: linux-nightly
176181
godot-binary: godot.linuxbsd.editor.dev.x86_64
177182

178-
- name: linux-4.4
183+
- name: linux-4.5
179184
os: ubuntu-22.04
180-
artifact-name: linux-4.4
185+
artifact-name: linux-4.5
181186
godot-binary: godot.linuxbsd.editor.dev.x86_64
182187

183188
# Deliberately don't include:
@@ -214,17 +219,25 @@ jobs:
214219
run: cargo build --release ${{ matrix.rust-extra-args }}
215220

216221
- name: "Run examples for short time"
222+
env:
223+
RETRY: ${{ matrix.retry }}
217224
run: |
218225
# Enable extended globbing to allow pattern exclusion.
219226
shopt -s extglob
220227
221228
# Match all directories/files except `target` and any starting with `.`.
222229
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
224237
# List all folders in current directory. Don't quote $files variable.
225238
for demo in $files; do
226239
# Strip trailing '/' from folder name.
227-
./.github/other/check-example.sh "${demo%/}"
240+
$RETRY_CMD ./.github/other/check-example.sh "${demo%/}"
228241
done
229242
230243

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ members = [
44
"dodge-the-creeps/rust",
55
"hot-reload/rust",
66
"net-pong/rust",
7-
]
7+
"squash-the-creeps/rust"
88

99
# Note about Jetbrains IDEs: "IDE Sync" (Refresh Cargo projects) may cause static analysis errors such as
1010
# "at most one `api-*` feature can be enabled". This is because by default, all Cargo features are enabled,

dodge-the-creeps/godot/project.godot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This is a finished version of the game featured in the 'Your first 2D game'
1818
tutorial in the documentation. For more details, consider
1919
following the tutorial in the documentation."
2020
run/main_scene="res://Main.tscn"
21-
config/features=PackedStringArray("4.4")
21+
config/features=PackedStringArray("4.5")
2222
config/icon="res://icon.png"
2323

2424
[debug]

hot-reload/godot/project.godot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ config_version=5
1212

1313
config/name="hot-reload"
1414
run/main_scene="uid://da7eiv1notj7j"
15-
config/features=PackedStringArray("4.4", "Forward Plus")
15+
config/features=PackedStringArray("4.5", "Forward Plus")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
res://rust.gdextension
1.36 MB
Binary file not shown.
1.74 KB
Binary file not shown.
817 Bytes
Binary file not shown.
62.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)