Skip to content

Commit 7f5191e

Browse files
authored
Merge pull request #1085 from godot-rust/qol/remove-examples
Move examples out of repository
2 parents afc657b + 953179c commit 7f5191e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+41
-1339
lines changed

.github/composite/godot-itest/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ runs:
109109
110110
else
111111
echo "Update compatibility_minimum in .gdextension files to '$apiVersion'..."
112-
dirs=("itest" "examples")
112+
dirs=("itest")
113113
114114
# Note that this is still hardcoded to 4.1, the start of GDExtension's compatibility promise. This makes it easier for users
115115
# to use gdext with older Godot versions. There is anyway a runtime check in gdext that checks compatibility again.

.github/other/check-example.sh

-62
This file was deleted.

.github/other/licenserc.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ header:
2222
- '**/*.sh'
2323
- '.github/**/*.yml'
2424

25-
paths-ignore:
26-
- 'examples'
25+
# paths-ignore:
26+
# - '...'
2727

2828
comment: on-failure
2929

.github/other/retry.sh

+8-3
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@ 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
2222
sleepDuration=${retryIntervals[$attempt]}
2323

2424
# Sleep for the calculated duration
2525
echo "Failed command '$1'."
26-
echo "Retry #$attempt in $sleepDuration seconds..."
27-
sleep "$sleepDuration"
26+
if [[ $attempt -ne $((limit - 1)) ]]; then
27+
echo "Retry #$attempt in $sleepDuration seconds..."
28+
sleep "$sleepDuration"
29+
fi
2830
done
31+
32+
echo "::error::Failed after $limit attempts."
33+
exit 1

.github/workflows/full-ci.yml

+1-24
Original file line numberDiff line numberDiff line change
@@ -410,34 +410,12 @@ jobs:
410410

411411
- name: "Build and test hot-reload"
412412
if: ${{ matrix.with-hot-reload }}
413-
working-directory: examples/hot-reload/godot/test
413+
working-directory: itest/hot-reload/godot
414414
# Repeat a few times, our hot reload integration test can sometimes be a bit flaky.
415415
run: $RETRY ./run-test.sh
416416
shell: bash
417417

418418

419-
run-examples:
420-
runs-on: ubuntu-22.04
421-
steps:
422-
- uses: actions/checkout@v4
423-
424-
- name: "Install Rust"
425-
uses: ./.github/composite/rust
426-
427-
# First compile, to fail early in case of compilation errors.
428-
- name: "Compile Rust examples (release mode)"
429-
run: cargo build --release -p dodge-the-creeps
430-
431-
- name: "Install Godot"
432-
uses: ./.github/composite/godot-install
433-
with:
434-
artifact-name: godot-linux-4.4
435-
godot-binary: godot.linuxbsd.editor.dev.x86_64
436-
437-
- name: "Run examples for short time"
438-
run: ./.github/other/check-example.sh dodge-the-creeps
439-
440-
441419
cargo-deny-machete:
442420
runs-on: ubuntu-22.04
443421
steps:
@@ -495,7 +473,6 @@ jobs:
495473
- miri-test
496474
- proptest
497475
- godot-itest
498-
- run-examples
499476
- cargo-deny-machete
500477
- license-guard
501478

.github/workflows/minimal-ci.yml

+1-23
Original file line numberDiff line numberDiff line change
@@ -226,31 +226,10 @@ jobs:
226226

227227
- name: "Build and test hot-reload"
228228
if: ${{ matrix.with-hot-reload }}
229-
working-directory: examples/hot-reload/godot/test
229+
working-directory: itest/hot-reload/godot
230230
run: ./run-test.sh
231231
shell: bash
232232

233-
run-examples:
234-
runs-on: ubuntu-22.04
235-
steps:
236-
- uses: actions/checkout@v4
237-
238-
- name: "Install Rust"
239-
uses: ./.github/composite/rust
240-
241-
# First compile, to fail early in case of compilation errors.
242-
- name: "Compile Rust examples (release mode)"
243-
run: cargo build --release -p dodge-the-creeps
244-
245-
- name: "Install Godot"
246-
uses: ./.github/composite/godot-install
247-
with:
248-
artifact-name: godot-linux-4.4
249-
godot-binary: godot.linuxbsd.editor.dev.x86_64
250-
251-
- name: "Run examples for short time"
252-
run: ./.github/other/check-example.sh dodge-the-creeps
253-
254233

255234
license-guard:
256235
runs-on: ubuntu-22.04
@@ -281,7 +260,6 @@ jobs:
281260
- clippy
282261
- unit-test
283262
- godot-itest
284-
- run-examples
285263
- license-guard
286264

287265
runs-on: ubuntu-22.04

Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ members = [
1212
# Godot integration
1313
"itest/rust",
1414
"itest/repo-tweak",
15-
"examples/dodge-the-creeps/rust",
16-
"examples/hot-reload/rust",
15+
"itest/hot-reload/rust",
1716
]
1817

1918
# Note about Jetbrains IDEs: "IDE Sync" (Refresh Cargo projects) may cause static analysis errors such as

ReadMe.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ but already covers a _Hello World_ setup as well as several more in-depth chapte
4848

4949
To consult the API reference, have a look at the online [API Docs].
5050

51-
Furthermore, we provide a small example game in the [`examples/dodge-the-creeps` directory][dodge-the-creeps].
52-
The example [`examples/hot-reload`][hot-reload] demonstrates hot-reloading in the Godot editor.
51+
Furthermore, we provide some practical examples and small games in the [demo-projects] repository.
5352

5453
If you need help, join our [Discord] server and ask in the `#help` channel!
5554

@@ -80,8 +79,7 @@ Contributions are very welcome! If you want to help out, see [`Contributing.md`]
8079
[Website]: https://godot-rust.github.io
8180
[`gdnative`]: https://github.com/godot-rust/gdnative
8281
[book]: https://godot-rust.github.io/book
83-
[dodge-the-creeps]: examples/dodge-the-creeps
84-
[hot-reload]: examples/hot-reload
82+
[demo-projects]: https://github.com/godot-rust/demo-projects
8583
[iOS]: https://github.com/godot-rust/gdext/issues/498
8684
[mpl]: https://www.mozilla.org/en-US/MPL
8785
[philosophy]: https://godot-rust.github.io/book/contribute/philosophy.html

examples/dodge-the-creeps/godot/Hud.tscn

-59
This file was deleted.

examples/dodge-the-creeps/godot/LICENSE

-21
This file was deleted.

examples/dodge-the-creeps/godot/Main.tscn

-55
This file was deleted.

0 commit comments

Comments
 (0)