Skip to content

Commit 7c7498e

Browse files
committed
CI: test hot-reload with both stable/api-custom API
1 parent 443621c commit 7c7498e

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

.github/workflows/full-ci.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ jobs:
246246
os: macos-13
247247
artifact-name: macos-x86-nightly
248248
godot-binary: godot.macos.editor.dev.x86_64
249-
with-hot-reload: true
249+
hot-reload: stable
250250

251251
- name: macos-double-x86
252252
os: macos-13
@@ -264,7 +264,7 @@ jobs:
264264
os: macos-latest
265265
artifact-name: macos-arm-nightly
266266
godot-binary: godot.macos.editor.dev.arm64
267-
with-hot-reload: true
267+
hot-reload: stable
268268

269269
# api-custom on macOS arm64 not working, due to clang linker issues.
270270
# - name: macos-double-arm
@@ -285,7 +285,7 @@ jobs:
285285
os: windows-latest
286286
artifact-name: windows-nightly
287287
godot-binary: godot.windows.editor.dev.x86_64.exe
288-
with-hot-reload: true
288+
hot-reload: stable
289289

290290
- name: windows-double
291291
os: windows-latest
@@ -317,7 +317,7 @@ jobs:
317317
artifact-name: linux-nightly
318318
godot-binary: godot.linuxbsd.editor.dev.x86_64
319319
rust-extra-args: --features itest/codegen-full
320-
with-hot-reload: true
320+
hot-reload: api-custom
321321

322322
# Combines now a lot of features, but should be OK. lazy-function-tables doesn't work with experimental-threads.
323323
- name: linux-double-lazy
@@ -352,12 +352,14 @@ jobs:
352352
rust-cache-key: release
353353

354354
# Linux compat (4.1 disabled, already covered by memcheck)
355+
# No hot-reload before 4.4, as the Godot project is 4.4+.
355356

356357
- name: linux-4.4
357358
os: ubuntu-22.04
358359
artifact-name: linux-4.4
359360
godot-binary: godot.linuxbsd.editor.dev.x86_64
360361
godot-prebuilt-patch: '4.4'
362+
hot-reload: stable
361363

362364
- name: linux-4.3
363365
os: ubuntu-22.04
@@ -418,10 +420,11 @@ jobs:
418420
godot-indirect-json: ${{ matrix.godot-indirect-json }}
419421

420422
- name: "Build and test hot-reload"
421-
if: ${{ matrix.with-hot-reload }}
423+
if: ${{ matrix.hot-reload }}
422424
working-directory: itest/hot-reload/godot
423425
# Repeat a few times, our hot reload integration test can sometimes be a bit flaky.
424-
run: $RETRY ./run-test.sh
426+
# Don't pass in rust-extra-args as environment; they're intended for itest.
427+
run: $RETRY ./run-test.sh ${{ matrix.hot-reload }}
425428
shell: bash
426429

427430

.github/workflows/minimal-ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ jobs:
159159
artifact-name: linux-nightly
160160
godot-binary: godot.linuxbsd.editor.dev.x86_64
161161
rust-extra-args: --features itest/codegen-full
162-
with-hot-reload: true
162+
hot-reload: stable
163163

164164
- name: linux-custom-api-json
165165
os: ubuntu-22.04
@@ -173,6 +173,7 @@ jobs:
173173
artifact-name: linux-nightly
174174
godot-binary: godot.linuxbsd.editor.dev.x86_64
175175
rust-extra-args: --features itest/experimental-threads,itest/codegen-full-experimental,godot/api-custom,godot/serde,itest/register-docs
176+
hot-reload: api-custom
176177

177178
- name: linux-release
178179
os: ubuntu-22.04
@@ -240,9 +241,9 @@ jobs:
240241
godot-indirect-json: ${{ matrix.godot-indirect-json }}
241242

242243
- name: "Build and test hot-reload"
243-
if: ${{ matrix.with-hot-reload }}
244+
if: ${{ matrix.hot-reload }}
244245
working-directory: itest/hot-reload/godot
245-
run: ./run-test.sh
246+
run: ./run-test.sh ${{ matrix.hot-reload }}
246247
shell: bash
247248

248249

itest/hot-reload/godot/run-test.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66

77
rel="."
88

9+
# If argument is 'api-custom', set 'cargoArgs' to use that feature. If 'stable', set 'cargoArgs' to empty string. Otherwise, error.
10+
if [[ $1 == "api-custom" ]]; then
11+
cargoArgs="--features godot/api-custom"
12+
elif [[ $1 == "stable" ]]; then
13+
cargoArgs=""
14+
else
15+
echo "[Bash] Error: Unknown argument '$1'. Expected 'api-custom' or 'stable'."
16+
exit 1
17+
fi
18+
919
# Restore un-reloaded files on exit (for local testing).
1020
cleanedUp=0 # avoid recursion if cleanup fails
1121
godotPid=0 # kill previous instance if necessary
@@ -36,7 +46,6 @@ cp editor_layout.cfg $rel/.godot/editor/editor_layout.cfg
3646
#cp MainScene.tscn $rel/MainScene.tscn
3747

3848
# Compile original Rust source.
39-
cargoArgs=""
4049
#cargoArgs="--features godot/__debug-log"
4150
cargo build -p hot-reload $cargoArgs
4251

0 commit comments

Comments
 (0)