Skip to content

Commit

Permalink
Merge branch 'master' into convert-3.x-escn
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitalita authored Apr 25, 2024
2 parents dc3fc58 + 11d3768 commit 0cf0acb
Show file tree
Hide file tree
Showing 3,803 changed files with 394,082 additions and 200,126 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,6 @@ bd282ff43f23fe845f29a3e25c8efc01bd65ffb0

# Add "Godot Engine contributors" copyright line
df61dc4b2bd54a5a40c515493c76f5a458e5b541

# Enforce template syntax `typename` over `class`
9903e6779b70fc03aae70a37b9cf053f4f355b91
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ thirdparty/* linguist-vendored
*.bat eol=crlf
# And some test files where the EOL matters
*.test.txt -text
# And also the templates for Visual Studio files, which VS will always force CRLF on
/misc/msvs/*.template eol=crlf

# The above only works properly for Git 2.10+, so for older versions
# we need to manually list the binary files we don't want modified.
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ body:
label: Issue description
description: |
Describe your issue briefly. What doesn't work, and how do you expect it to work instead?
You can include images or videos with drag and drop, and format code blocks or logs with <code>```</code> tags.
You can include images or videos with drag and drop, and format code blocks or logs with <code>\`\`\`</code> tags, on separate lines before and after the text. (Use <code>\`\`\`gdscript</code> to add GDScript syntax highlighting.)
Please do not add code examples or error messages as screenshots, but as text, this helps searching for issues and testing the code. If you are reporting a bug in the editor interface, like the script editor, please provide both a screenshot *and* the text of the code to help with testing.
validations:
required: true

Expand Down
2 changes: 0 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<!--
Please target the `master` branch in priority.
PRs can target `3.x` if the same change was done in `master`, or is not relevant there.
Relevant fixes are cherry-picked for stable branches as needed by maintainers.
You can mention in the description if the change is compatible with `3.x`.
To speed up the contribution process and avoid CI errors, please set up pre-commit hooks locally:
https://docs.godotengine.org/en/latest/contributing/development/code_style_guidelines.html
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/download-artifact/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ runs:
using: "composite"
steps:
- name: Download Godot Artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
2 changes: 1 addition & 1 deletion .github/actions/godot-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ runs:
steps:
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{inputs.scons-cache}}
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/godot-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ runs:
steps:
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
# Semantic version range syntax or exact version of a Python version
python-version: ${{ inputs.python-version }}
Expand All @@ -23,5 +23,5 @@ runs:
shell: bash
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons==4.4.0
python -m pip install scons==4.7.0
scons --version
2 changes: 1 addition & 1 deletion .github/actions/upload-artifact/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ runs:
using: "composite"
steps:
- name: Upload Godot Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/android_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Java 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/godot_cpp_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env:
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
# Used for the godot-cpp checkout.
GODOT_CPP_BRANCH: '4.1'
GODOT_CPP_BRANCH: '4.2'

concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-cpp-tests
Expand All @@ -19,6 +19,8 @@ jobs:
name: "Build and test Godot CPP"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup python and scons
uses: ./.github/actions/godot-deps
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ios_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Godot build cache
uses: ./.github/actions/godot-cache
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

# Need newer mesa for lavapipe to work properly.
- name: Linux dependencies for tests
Expand Down Expand Up @@ -116,12 +118,6 @@ jobs:
- name: Setup python and scons
uses: ./.github/actions/godot-deps

- name: Set up .NET Sdk
uses: actions/setup-dotnet@v3
if: ${{ matrix.build-mono }}
with:
dotnet-version: '6.0.x'

- name: Setup GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master

Expand Down Expand Up @@ -169,6 +165,11 @@ jobs:
${{ matrix.bin }} --help
${{ matrix.bin }} --headless --test --force-colors
- name: .NET source generators tests
if: ${{ matrix.build-mono }}
run: |
dotnet test modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests
# Check class reference
- name: Check for class reference updates
if: ${{ matrix.doc-test }}
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/macos_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
cache-name: macos-editor
target: editor
tests: true
bin: "./bin/godot.macos.editor.x86_64"
bin: "./bin/godot.macos.editor.universal"

- name: Template (target=template_release)
cache-name: macos-template
Expand All @@ -34,6 +34,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Godot build cache
uses: ./.github/actions/godot-cache
Expand All @@ -48,16 +50,26 @@ jobs:
run: |
sh misc/scripts/install_vulkan_sdk_macos.sh
- name: Compilation
- name: Compilation (x86_64)
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} arch=x86_64
platform: macos
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}

- name: Compilation (arm64)
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }}
sconsflags: ${{ env.SCONSFLAGS }} arch=arm64
platform: macos
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}

- name: Prepare artifact
run: |
lipo -create ./bin/godot.macos.${{ matrix.target }}.x86_64 ./bin/godot.macos.${{ matrix.target }}.arm64 -output ./bin/godot.macos.${{ matrix.target }}.universal
rm ./bin/godot.macos.${{ matrix.target }}.x86_64 ./bin/godot.macos.${{ matrix.target }}.arm64
strip bin/godot.*
chmod +x bin/godot.*
Expand Down
31 changes: 6 additions & 25 deletions .github/workflows/static_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Install Python dependencies and general setup
run: |
pip3 install black==23.3.0 pytest==7.1.2 mypy==0.971
pip3 install pytest==7.1.2 mypy==0.971
git config diff.wsErrorHighlight all
- name: Get changed files
Expand All @@ -32,7 +32,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
files=$(gh pr diff ${{ github.event.pull_request.number }} --name-only)
files=$(git diff-tree --no-commit-id --name-only -r HEAD^1..HEAD 2> /dev/null || true)
elif [ "${{ github.event_name }}" == "push" -a "${{ github.event.forced }}" == "false" -a "${{ github.event.created }}" == "false" ]; then
files=$(git diff-tree --no-commit-id --name-only -r ${{ github.event.before }}..${{ github.event.after }} 2> /dev/null || true)
fi
Expand All @@ -46,6 +46,9 @@ jobs:
run: |
bash ./misc/scripts/gitignore_check.sh
- name: Style checks via pre-commit
uses: pre-commit/[email protected]

- name: File formatting checks (file_format.sh)
run: |
bash ./misc/scripts/file_format.sh changed.txt
Expand All @@ -54,14 +57,6 @@ jobs:
run: |
bash ./misc/scripts/header_guards.sh changed.txt
- name: Python style checks via black (black_format.sh)
run: |
if grep -qE '\.py$|SConstruct|SCsub' changed.txt || [ -z "$(cat changed.txt)" ]; then
bash ./misc/scripts/black_format.sh
else
echo "Skipping Python formatting as no Python files were changed."
fi
- name: Python scripts static analysis (mypy_check.sh)
run: |
if grep -qE '\.py$|SConstruct|SCsub' changed.txt || [ -z "$(cat changed.txt)" ]; then
Expand All @@ -76,7 +71,7 @@ jobs:
- name: JavaScript style and documentation checks via ESLint and JSDoc
run: |
if grep -q "platform/web" changed.txt || [ -z "$(cat changed.txt)" ]; then
if grep -q "\.js" changed.txt || [ -z "$(cat changed.txt)" ]; then
cd platform/web
npm ci
npm run lint
Expand All @@ -92,20 +87,6 @@ jobs:
- name: Documentation checks
run: |
doc/tools/doc_status.py doc/classes modules/*/doc_classes platform/*/doc_classes
doc/tools/make_rst.py --dry-run --color doc/classes modules platform
- name: Style checks via clang-format (clang_format.sh)
run: |
clang-format --version
bash ./misc/scripts/clang_format.sh changed.txt
- name: Style checks via dotnet format (dotnet_format.sh)
run: |
if grep -q "modules/mono" changed.txt || [ -z "$(cat changed.txt)" ]; then
bash ./misc/scripts/dotnet_format.sh
else
echo "Skipping dotnet format as no C# files were changed."
fi
- name: Spell checks via codespell
if: github.event_name == 'pull_request' && env.CHANGED_FILES != ''
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/web_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Emscripten latest
uses: mymindstorm/setup-emsdk@v14
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/windows_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Godot build cache
uses: ./.github/actions/godot-cache
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ bin
compile_commands.json
platform/windows/godot_res.res

# Ninja build files
build.ninja
.ninja
run_ninja_env.bat

# Generated by Godot binary
.import/
/gdextension_interface.h
Expand All @@ -43,6 +48,7 @@ logs/

# Generated by unit tests
tests/data/*.translation
tests/data/crypto/out*

############################
### General build output ###
Expand Down
3 changes: 3 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ J08nY <[email protected]> <[email protected]>
J08nY <[email protected]> <[email protected]>
Jake Young <[email protected]>
Jakub Grzesik <[email protected]>
Jakub Marcowski <[email protected]> <[email protected]>
Jakub Marcowski <[email protected]> <[email protected]>
janglee <[email protected]>
Jason Knight <[email protected]> <[email protected]>
Jean-Michel Bernard <[email protected]>
Expand Down Expand Up @@ -118,6 +120,7 @@ Nathan Warden <[email protected]> <[email protected]>
Nicholas Huelin <[email protected]>
Nils ANDRÉ-CHANG <[email protected]>
Nils ANDRÉ-CHANG <[email protected]> <[email protected]>
Nông Văn Tình <[email protected]>
Nuno Donato <[email protected]> <[email protected]>
ocean (they/them) <[email protected]>
Pawel Kowal <[email protected]>
Expand Down
55 changes: 55 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
hooks:
- id: clang-format
files: \.(c|h|cpp|hpp|cc|cxx|m|mm|inc|java|glsl)$
types_or: [text]
exclude: |
(?x)^(
tests/python_build.*|
.*thirdparty.*|
.*platform/android/java/lib/src/com.*|
.*-so_wrap.*
)
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.2.0
hooks:
- id: black
files: (\.py$|SConstruct|SCsub)
types_or: [text]
exclude: .*thirdparty.*
args:
- --line-length=120

- repo: local
hooks:
- id: make-rst
name: make-rst
entry: python3 doc/tools/make_rst.py doc/classes modules platform --dry-run --color
pass_filenames: false
language: python
files: ^(doc|modules|platform).*xml$

- id: copyright-headers
name: copyright-headers
language: python
files: \.(c|h|cpp|hpp|cc|cxx|m|mm|inc|java)$
entry: python3 misc/scripts/copyright_headers.py
exclude: |
(?x)^(
.*thirdparty.*|
.*-so_wrap.*|
core/math/bvh_.*\.inc$|
platform/android/java/lib/src/com.*|
platform/android/java/lib/src/org/godotengine/godot/gl/GLSurfaceView.*|
platform/android/java/lib/src/org/godotengine/godot/gl/EGLLogWrapper.*|
platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.*
)
- id: dotnet-format
name: dotnet-format
language: python
entry: python3 misc/scripts/dotnet_format.py
types_or: [c#]
Loading

0 comments on commit 0cf0acb

Please sign in to comment.