Skip to content

Commit

Permalink
Merge branch 'master' into pr/cache-eviction
Browse files Browse the repository at this point in the history
  • Loading branch information
ogapo authored May 27, 2024
2 parents 2c03803 + be56cab commit 58585e8
Show file tree
Hide file tree
Showing 5,030 changed files with 686,270 additions and 332,330 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 0 additions & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,cppcoreguidelines-pro-type-member-init,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-use-default-member-init,modernize-use-nullptr,readability-braces-around-statements,readability-redundant-member-init'
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: none
CheckOptions:
- key: cert-dcl16-c.NewSuffixes
Expand Down Expand Up @@ -44,4 +43,3 @@ CheckOptions:
- key: readability-braces-around-statements.ShortStatementLines
value: '0'
...

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
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ thirdparty/* linguist-vendored

# Normalize EOL for all files that Git considers text files
* text=auto eol=lf
# Except for bat files, which are Windows only files
# Except for Windows-only / Visual Studio files
*.bat eol=crlf
*.sln eol=crlf
*.csproj eol=crlf
misc/msvs/*.template eol=crlf
# And some test files where the EOL matters
*.test.txt -text

Expand Down
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ doc_classes/* @godotengine/documentation
/drivers/xaudio2/ @godotengine/audio

## Rendering
/drivers/d3d12/ @godotengine/rendering
/drivers/dummy/ @godotengine/rendering
/drivers/gles3/ @godotengine/rendering
/drivers/spirv-reflect/ @godotengine/rendering
Expand All @@ -51,12 +52,14 @@ doc_classes/* @godotengine/documentation
# Editor

/editor/*debugger* @godotengine/debugger
/editor/gui/ @godotengine/usability @godotengine/gui-nodes
/editor/icons/ @godotengine/usability
/editor/import/ @godotengine/import
/editor/plugins/*2d_*.* @godotengine/2d-editor
/editor/plugins/*3d_*.* @godotengine/3d-editor
/editor/plugins/script_*.* @godotengine/script-editor
/editor/plugins/*shader*.* @godotengine/shaders
/editor/themes/ @godotengine/usability @godotengine/gui-nodes
/editor/code_editor.* @godotengine/script-editor
/editor/*dock*.* @godotengine/docks
/editor/*shader*.* @godotengine/shaders
Expand Down
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body:
- Write a descriptive issue title above.
- 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.
- Search [open](https://github.com/godotengine/godot/issues) and [closed](https://github.com/godotengine/godot/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.
- Verify that you are using a [supported Godot version](https://docs.godotengine.org/en/stable/about/release_policy.html). Please always check if your issue is reproducible in the latest version – it may already have been fixed!
- Verify that you are using a [supported Godot version](https://docs.godotengine.org/en/latest/about/release_policy.html). Please always check if your issue is reproducible in the latest version – it may already have been fixed!
- If you use a custom build, please test if your issue is reproducible in official builds too. Likewise if you use any C++ modules, GDExtensions, or editor plugins, you should check if the bug is reproducible in a project without these.
- type: textarea
Expand Down 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 }}
1 change: 0 additions & 1 deletion .github/actions/godot-api-dump/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ runs:
with:
name: 'godot-api-dump'
path: './godot-api/*'

18 changes: 15 additions & 3 deletions .github/actions/godot-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ inputs:
sconsflags:
default: ""
scons-cache:
description: The scons cache path.
description: The SCons cache path.
default: "${{ github.workspace }}/.scons-cache/"
scons-cache-limit:
description: The scons cache size limit.
description: The SCons cache size limit.
# actions/cache has 10 GiB limit, and GitHub runners have a 14 GiB disk.
# Limit to 7 GiB to avoid having the extracted cache fill the disk.
default: 7168
Expand All @@ -31,6 +31,18 @@ runs:
SCONS_CACHE_LIMIT: ${{ inputs.scons-cache-limit }}
run: |
echo "Building with flags:" platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }}
if [ "${{ inputs.target }}" != "editor" ]; then rm -rf editor; fi # Ensure we don't include editor code.
if [ "${{ inputs.target }}" != "editor" ]; then
# Ensure we don't include editor code in export template builds.
rm -rf editor
fi
if [ "${{ github.event.number }}" != "" ]; then
# Set build identifier with pull request number if available. This is displayed throughout the editor.
export BUILD_NAME="gh-${{ github.event.number }}"
else
export BUILD_NAME="gh"
fi
scons platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }}
ls -l bin/
8 changes: 4 additions & 4 deletions .github/actions/godot-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ inputs:
description: The cache base name (job name by default).
default: "${{github.job}}"
scons-cache:
description: The scons cache path.
description: The SCons cache path.
default: "${{github.workspace}}/.scons-cache/"
runs:
using: "composite"
steps:
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
uses: actions/cache@v3
# Upload cache on completion and check it out now.
- name: Load SCons cache directory
uses: actions/cache@v4
with:
path: ${{inputs.scons-cache}}
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
Expand Down
23 changes: 13 additions & 10 deletions .github/actions/godot-deps/action.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
name: Setup python and scons
description: Setup python, install the pip version of scons.
name: Setup Python and SCons
description: Setup Python, install the pip version of SCons.
inputs:
python-version:
description: The python version to use.
description: The Python version to use.
default: "3.x"
python-arch:
description: The python architecture.
description: The Python architecture.
default: "x64"
scons-version:
description: The SCons version to use.
default: "4.7.0"
runs:
using: "composite"
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
# Semantic version range syntax or exact version of a Python version.
python-version: ${{ inputs.python-version }}
# Optional - x64 or x86 architecture, defaults to x64
# Optional - x64 or x86 architecture, defaults to x64.
architecture: ${{ inputs.python-arch }}

- name: Setup scons
- name: Setup SCons
shell: bash
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons==4.4.0
python -m pip install wheel
python -m pip install scons==${{ inputs.scons-version }}
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
6 changes: 4 additions & 2 deletions .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 All @@ -30,7 +32,7 @@ jobs:
uses: ./.github/actions/godot-cache
continue-on-error: true

- name: Setup python and scons
- name: Setup Python and SCons
uses: ./.github/actions/godot-deps

- name: Compilation (arm32)
Expand Down
8 changes: 5 additions & 3 deletions .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,8 +19,10 @@ jobs:
name: "Build and test Godot CPP"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup python and scons
- name: Setup Python and SCons
uses: ./.github/actions/godot-deps

# Checkout godot-cpp
Expand All @@ -45,7 +47,7 @@ jobs:
cp -f godot-api/gdextension_interface.h godot-cpp/gdextension/
cp -f godot-api/extension_api.json godot-cpp/gdextension/
# TODO: Add caching to the scons build and store it for CI via the godot-cache
# TODO: Add caching to the SCons build and store it for CI via the godot-cache
# action.

# Build godot-cpp test extension
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ios_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ jobs:

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

- name: Setup Godot build cache
uses: ./.github/actions/godot-cache
continue-on-error: true

- name: Setup python and scons
- name: Setup Python and SCons
uses: ./.github/actions/godot-deps

- name: Compilation (arm64)
Expand Down
27 changes: 22 additions & 5 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
tests: true
# Skip 2GiB artifact speeding up action.
artifact: false
# Test our oldest supported SCons/Python versions on one arbitrary editor build.
legacy-scons: true

- name: Editor with ThreadSanitizer (target=editor, tests=yes, dev_build=yes, use_tsan=yes, use_llvm=yes, linker=lld)
cache-name: linux-editor-thread-sanitizer
Expand Down Expand Up @@ -86,6 +88,8 @@ jobs:

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

# Need newer mesa for lavapipe to work properly.
- name: Linux dependencies for tests
Expand All @@ -96,6 +100,11 @@ jobs:
sudo add-apt-repository "deb https://ppa.launchpadcontent.net/kisak/turtle/ubuntu focal main"
sudo apt-get install -qq mesa-vulkan-drivers
# TODO: Figure out somehow how to embed this one.
- name: wayland-scanner dependency
run: |
sudo apt-get install libwayland-bin
- name: Free disk space on runner
run: |
echo "Disk usage before:" && df -h
Expand All @@ -108,14 +117,17 @@ jobs:
cache-name: ${{ matrix.cache-name }}
continue-on-error: true

- name: Setup python and scons
- name: Setup Python and SCons
if: ${{ ! matrix.legacy-scons }}
uses: ./.github/actions/godot-deps

- name: Set up .NET Sdk
uses: actions/setup-dotnet@v3
if: ${{ matrix.build-mono }}
- name: Setup Python and SCons (legacy versions)
if: ${{ matrix.legacy-scons }}
uses: ./.github/actions/godot-deps
with:
dotnet-version: '6.0.x'
# Sync with Ensure*Version in SConstruct.
python-version: 3.6
scons-version: 3.1.2

- name: Setup GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master
Expand Down Expand Up @@ -164,6 +176,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
20 changes: 16 additions & 4 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,30 +34,42 @@ jobs:

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

- name: Setup Godot build cache
uses: ./.github/actions/godot-cache
with:
cache-name: ${{ matrix.cache-name }}
continue-on-error: true

- name: Setup python and scons
- name: Setup Python and SCons
uses: ./.github/actions/godot-deps

- name: Setup Vulkan SDK
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
Loading

0 comments on commit 58585e8

Please sign in to comment.