Skip to content

Commit 3f2af2e

Browse files
committed
Merge branch '4.3' into cmake_export
2 parents 826c50e + 1cce4d1 commit 3f2af2e

File tree

156 files changed

+71038
-27409
lines changed

Some content is hidden

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

156 files changed

+71038
-27409
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = tab
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[{*.py,SConstruct}]
12+
indent_style = space
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2
16+
indent_style = space

.gitattributes

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
*.c eol=lf
2-
*.cpp eol=lf
3-
*.gd eol=lf
4-
*.tscn eol=lf
5-
*.cfg eol=lf
6-
*.godot eol=lf
1+
# Normalize EOL for all files that Git considers text files
2+
* text=auto eol=lf
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Bug report
2+
description: Report a bug in the godot-cpp GDExtension/GDNative integration
3+
body:
4+
5+
- type: markdown
6+
attributes:
7+
value: |
8+
- When reporting bugs, you'll make our life simpler (and the fix will come sooner) if you follow the guidelines in this template.
9+
- Write a descriptive issue title above.
10+
- The golden rule is to **always open *one* issue for *one* bug**. If you notice several bugs and want to report them, make sure to create one new issue for each of them.
11+
- Search [open](https://github.com/godotengine/godot-cpp/issues) and [closed](https://github.com/godotengine/godot-cpp/issues?q=is%3Aissue+is%3Aclosed) issues to ensure it has not already been reported. If you don't find a relevant match or if you're unsure, don't hesitate to **open a new issue**. The bugsquad will handle it from there if it's a duplicate.
12+
- Verify that you are using a [supported Godot version](https://docs.godotengine.org/en/latest/about/release_policy.html).
13+
14+
- type: input
15+
attributes:
16+
label: Godot version
17+
description: >
18+
Specify the Git commit hash if using a development or non-official build.
19+
If you use a custom build, please test if your issue is reproducible in official builds too.
20+
placeholder: 3.3.stable, 4.0.dev (3041becc6)
21+
validations:
22+
required: true
23+
24+
- type: input
25+
attributes:
26+
label: godot-cpp version
27+
description: >
28+
Specify the Git commit hash if using a development build.
29+
placeholder: 3.3.stable, 4.0.dev (3041becc6)
30+
validations:
31+
required: true
32+
33+
- type: input
34+
attributes:
35+
label: System information
36+
description: |
37+
- Specify the OS version, and when relevant hardware information.
38+
- For issues that are likely OS-specific and/or graphics-related, please specify the CPU model and architecture.
39+
- **Bug reports not including the required information may be closed at the maintainers' discretion.** If in doubt, always include all the requested information; it's better to include too much information than not enough information.
40+
placeholder: Windows 10, Intel Core i5-7200U
41+
validations:
42+
required: true
43+
44+
- type: textarea
45+
attributes:
46+
label: Issue description
47+
description: |
48+
Describe your issue briefly. What doesn't work, and how do you expect it to work instead?
49+
You can include images or videos with drag and drop, and format code blocks or logs with <code>```</code> tags.
50+
validations:
51+
required: true
52+
53+
- type: textarea
54+
attributes:
55+
label: Steps to reproduce
56+
description: |
57+
List of steps or sample code that reproduces the issue. Having reproducible issues is a prerequisite for contributors to be able to solve them.
58+
If you include a minimal reproduction project below, you can detail how to use it here.
59+
validations:
60+
required: true
61+
62+
- type: textarea
63+
attributes:
64+
label: Minimal reproduction project
65+
description: |
66+
- A small Godot project which reproduces the issue, with no unnecessary files included. Be sure to not include the `.godot` folder in the archive (but keep `project.godot`).
67+
- Required, unless the reproduction steps are trivial and don't require any project files to be followed. In this case, write "N/A" in the field.
68+
- Drag and drop a ZIP archive to upload it. **Do not select another field until the project is done uploading.**
69+
- **If you've been asked by a maintainer to upload a minimal reproduction project, you *must* do so within 7 days.** Otherwise, your bug report will be closed as it'll be considered too difficult to diagnose.
70+
validations:
71+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
blank_issues_enabled: false
2+
3+
contact_links:
4+
- name: Godot proposals
5+
url: https://github.com/godotengine/godot-proposals
6+
about: Please submit feature proposals on the Godot proposals repository, not here.
7+
8+
- name: Godot documentation repository
9+
url: https://github.com/godotengine/godot-docs
10+
about: Please report issues with documentation on the Godot documentation repository, not here.
11+
12+
- name: Godot community channels
13+
url: https://godotengine.org/community
14+
about: Please ask for technical support on one of the other community channels, not here.

.github/actions/godot-cache/action.yml renamed to .github/actions/godot-cache-restore/action.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: Setup Godot build cache
2-
description: Setup Godot build cache.
1+
name: Restore Godot build cache
2+
description: Restore Godot build cache.
33
inputs:
44
cache-name:
55
description: The cache base name (job name by default).
@@ -10,9 +10,8 @@ inputs:
1010
runs:
1111
using: "composite"
1212
steps:
13-
# Upload cache on completion and check it out now
14-
- name: Load .scons_cache directory
15-
uses: actions/cache@v3
13+
- name: Restore .scons_cache directory
14+
uses: actions/cache/restore@v3
1615
with:
1716
path: ${{inputs.scons-cache}}
1817
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Save Godot build cache
2+
description: Save Godot build cache.
3+
inputs:
4+
cache-name:
5+
description: The cache base name (job name by default).
6+
default: "${{github.job}}"
7+
scons-cache:
8+
description: The SCons cache path.
9+
default: "${{github.workspace}}/.scons-cache/"
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Save SCons cache directory
14+
uses: actions/cache/save@v4
15+
with:
16+
path: ${{inputs.scons-cache}}
17+
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}

.github/workflows/ci.yml

Lines changed: 100 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on: [push, pull_request]
44
env:
55
# Only used for the cache key. Increment version to force clean build.
66
GODOT_BASE_BRANCH: master
7+
# Used to select the version of Godot to run the tests with.
8+
GODOT_TEST_VERSION: master
79

810
concurrency:
911
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}
@@ -18,25 +20,28 @@ jobs:
1820
matrix:
1921
include:
2022
- name: 🐧 Linux (GCC)
21-
os: ubuntu-18.04
23+
os: ubuntu-20.04
2224
platform: linux
2325
artifact-name: godot-cpp-linux-glibc2.27-x86_64-release
2426
artifact-path: bin/libgodot-cpp.linux.template_release.x86_64.a
27+
run-tests: true
2528
cache-name: linux-x86_64
2629

2730
- name: 🐧 Linux (GCC, Double Precision)
28-
os: ubuntu-18.04
31+
os: ubuntu-20.04
2932
platform: linux
3033
artifact-name: godot-cpp-linux-glibc2.27-x86_64-double-release
3134
artifact-path: bin/libgodot-cpp.linux.template_release.double.x86_64.a
3235
flags: precision=double
36+
run-tests: false
3337
cache-name: linux-x86_64-f64
3438

3539
- name: 🏁 Windows (x86_64, MSVC)
3640
os: windows-2019
3741
platform: windows
3842
artifact-name: godot-cpp-windows-msvc2019-x86_64-release
3943
artifact-path: bin/libgodot-cpp.windows.template_release.x86_64.lib
44+
run-tests: false
4045
cache-name: windows-x86_64-msvc
4146

4247
- name: 🏁 Windows (x86_64, MinGW)
@@ -45,84 +50,152 @@ jobs:
4550
artifact-name: godot-cpp-linux-mingw-x86_64-release
4651
artifact-path: bin/libgodot-cpp.windows.template_release.x86_64.a
4752
flags: use_mingw=yes
53+
run-tests: false
4854
cache-name: windows-x86_64-mingw
4955

5056
- name: 🍎 macOS (universal)
51-
os: macos-11
57+
os: macos-latest
5258
platform: macos
5359
artifact-name: godot-cpp-macos-universal-release
5460
artifact-path: bin/libgodot-cpp.macos.template_release.universal.a
5561
flags: arch=universal
62+
run-tests: false
5663
cache-name: macos-universal
5764

5865
- name: 🤖 Android (arm64)
59-
os: ubuntu-18.04
66+
os: ubuntu-20.04
6067
platform: android
6168
artifact-name: godot-cpp-android-arm64-release
6269
artifact-path: bin/libgodot-cpp.android.template_release.arm64.a
63-
flags: ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME arch=arm64
70+
flags: arch=arm64
71+
run-tests: false
6472
cache-name: android-arm64
6573

6674
- name: 🍏 iOS (arm64)
67-
os: macos-11
75+
os: macos-latest
6876
platform: ios
6977
artifact-name: godot-cpp-ios-arm64-release
7078
artifact-path: bin/libgodot-cpp.ios.template_release.arm64.a
7179
flags: arch=arm64
80+
run-tests: false
7281
cache-name: ios-arm64
7382

83+
- name: 🌐 Web (wasm32)
84+
os: ubuntu-20.04
85+
platform: web
86+
artifact-name: godot-cpp-web-wasm32-release
87+
artifact-path: bin/libgodot-cpp.web.template_release.wasm32.a
88+
run-tests: false
89+
cache-name: web-wasm32
90+
7491
env:
7592
SCONS_CACHE: ${{ github.workspace }}/.scons-cache/
93+
EM_VERSION: 3.1.39
94+
EM_CACHE_FOLDER: "emsdk-cache"
7695

7796
steps:
7897
- name: Checkout
79-
uses: actions/checkout@v3
98+
uses: actions/checkout@v4
8099
with:
81100
submodules: recursive
82101

83-
- name: Setup Godot build cache
84-
uses: ./.github/actions/godot-cache
102+
- name: Restore Godot build cache
103+
uses: ./.github/actions/godot-cache-restore
85104
with:
86105
cache-name: ${{ matrix.cache-name }}
87106
continue-on-error: true
88107

89108
- name: Set up Python (for SCons)
90-
uses: actions/setup-python@v4
109+
uses: actions/setup-python@v5
91110
with:
92111
python-version: '3.x'
93112

94-
- name: Linux dependencies
95-
if: ${{ matrix.platform == 'linux' }}
96-
run: |
97-
sudo apt-get update -qq
98-
sudo apt-get install -qqq build-essential pkg-config
113+
- name: Android dependencies
114+
if: ${{ matrix.platform == 'android' }}
115+
uses: nttld/setup-ndk@v1
116+
with:
117+
ndk-version: r23c
118+
link-to-sdk: true
99119

100-
- name: Install scons
101-
run: |
102-
python -m pip install scons==4.0.0
120+
- name: Web dependencies
121+
if: ${{ matrix.platform == 'web' }}
122+
uses: mymindstorm/setup-emsdk@v14
123+
with:
124+
version: ${{env.EM_VERSION}}
125+
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
103126

104127
- name: Setup MinGW for Windows/MinGW build
105128
if: ${{ matrix.platform == 'windows' && matrix.flags == 'use_mingw=yes' }}
106129
uses: egor-tensin/setup-mingw@v2
130+
with:
131+
version: 12.2.0
132+
133+
- name: Install scons
134+
run: |
135+
python -m pip install scons==4.0.0
107136
108137
- name: Generate godot-cpp sources only
109138
run: |
110-
scons platform=${{ matrix.platform }} build_library=no ${{ matrix.flags }}
139+
scons platform=${{ matrix.platform }} verbose=yes build_library=no ${{ matrix.flags }}
111140
scons -c
112141
113142
- name: Build godot-cpp (debug)
114143
run: |
115-
scons platform=${{ matrix.platform }} target=template_debug ${{ matrix.flags }}
144+
scons platform=${{ matrix.platform }} verbose=yes target=template_debug ${{ matrix.flags }}
116145
117146
- name: Build test without rebuilding godot-cpp (debug)
118147
run: |
119148
cd test
120-
scons platform=${{ matrix.platform }} target=template_debug ${{ matrix.flags }} build_library=no
149+
scons platform=${{ matrix.platform }} verbose=yes target=template_debug ${{ matrix.flags }} build_library=no
121150
122151
- name: Build test and godot-cpp (release)
123152
run: |
124153
cd test
125-
scons platform=${{ matrix.platform }} target=template_release ${{ matrix.flags }}
154+
scons platform=${{ matrix.platform }} verbose=yes target=template_release ${{ matrix.flags }}
155+
156+
- name: Save Godot build cache
157+
uses: ./.github/actions/godot-cache-save
158+
with:
159+
cache-name: ${{ matrix.cache-name }}
160+
continue-on-error: true
161+
162+
- name: Download latest Godot artifacts
163+
uses: dsnopek/action-download-artifact@1322f74e2dac9feed2ee76a32d9ae1ca3b4cf4e9
164+
if: ${{ matrix.run-tests && env.GODOT_TEST_VERSION == 'master' }}
165+
with:
166+
repo: godotengine/godot
167+
branch: master
168+
event: push
169+
workflow: linux_builds.yml
170+
workflow_conclusion: success
171+
name: linux-editor-mono
172+
search_artifacts: true
173+
check_artifacts: true
174+
ensure_latest: true
175+
path: godot-artifacts
176+
177+
- name: Prepare Godot artifacts for testing
178+
if: ${{ matrix.run-tests && env.GODOT_TEST_VERSION == 'master' }}
179+
run: |
180+
chmod +x ./godot-artifacts/godot.linuxbsd.editor.x86_64.mono
181+
echo "GODOT=$(pwd)/godot-artifacts/godot.linuxbsd.editor.x86_64.mono" >> $GITHUB_ENV
182+
183+
- name: Download requested Godot version for testing
184+
if: ${{ matrix.run-tests && env.GODOT_TEST_VERSION != 'master' }}
185+
run: |
186+
wget "https://github.com/godotengine/godot-builds/releases/download/${GODOT_TEST_VERSION}/Godot_v${GODOT_TEST_VERSION}_linux.x86_64.zip" -O Godot.zip
187+
unzip -a Godot.zip
188+
chmod +x "Godot_v${GODOT_TEST_VERSION}_linux.x86_64"
189+
echo "GODOT=$(pwd)/Godot_v${GODOT_TEST_VERSION}_linux.x86_64" >> $GITHUB_ENV
190+
191+
- name: Run tests
192+
if: ${{ matrix.run-tests }}
193+
run: |
194+
$GODOT --headless --version
195+
cd test
196+
# Need to run the editor so .godot is generated... but it crashes! Ignore that :-)
197+
(cd project && (timeout 30 $GODOT --import --headless >/dev/null 2>&1 || true))
198+
./run-tests.sh
126199
127200
- name: Upload artifact
128201
uses: actions/upload-artifact@v3
@@ -133,10 +206,10 @@ jobs:
133206

134207
linux-cmake:
135208
name: 🐧 Build (Linux, GCC, CMake)
136-
runs-on: ubuntu-18.04
209+
runs-on: ubuntu-20.04
137210
steps:
138211
- name: Checkout
139-
uses: actions/checkout@v3
212+
uses: actions/checkout@v4
140213
with:
141214
submodules: recursive
142215

@@ -157,10 +230,10 @@ jobs:
157230
158231
linux-cmake-ninja:
159232
name: 🐧 Build (Linux, GCC, CMake Ninja)
160-
runs-on: ubuntu-18.04
233+
runs-on: ubuntu-20.04
161234
steps:
162235
- name: Checkout
163-
uses: actions/checkout@v3
236+
uses: actions/checkout@v4
164237
with:
165238
submodules: recursive
166239

@@ -184,7 +257,7 @@ jobs:
184257
runs-on: windows-2019
185258
steps:
186259
- name: Checkout
187-
uses: actions/checkout@v3
260+
uses: actions/checkout@v4
188261
with:
189262
submodules: recursive
190263

0 commit comments

Comments
 (0)