Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: godotengine/godot
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a248b4b15badaa95f50df16015cab41eecc8b5ee
Choose a base ref
..
head repository: godotengine/godot
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c368b4cc7a6728a2019855dcfd54cd68eea8fe20
Choose a head ref
Showing 4,545 changed files with 647,329 additions and 164,080 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -15,6 +15,3 @@ indent_style = space
[{*.{yml,yaml},.clang{-format,-tidy,d}}]
indent_size = 2
indent_style = space

[*.svg]
insert_final_newline = false
6 changes: 6 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -66,3 +66,9 @@ bb5f390fb9b466be35a5df7651323d7e66afca31

# Style: Enforce `AllowShortFunctionsOnASingleLine`
e06d83860d798b6766b23d6eae48557387a7db85

# Style: Enforce trailing newlines on svgs
7e5baa042639ffa835271703c720e2595e90afb8

# Style: Replace header guards with `#pragma once`
324512e11c1b7663c3cf47bec6ddbe65c6b8db2b
9 changes: 2 additions & 7 deletions .github/actions/godot-build/action.yml
Original file line number Diff line number Diff line change
@@ -19,11 +19,6 @@ inputs:
scons-cache:
description: The SCons cache path.
default: ${{ github.workspace }}/.scons_cache/
scons-cache-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: 7

runs:
using: composite
@@ -33,7 +28,7 @@ runs:
env:
SCONSFLAGS: ${{ inputs.sconsflags }}
run: |
echo "Building with flags:" platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }} "cache_path=${{ inputs.scons-cache }}" cache_limit=${{ inputs.scons-cache-limit }}
echo "Building with flags:" platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }} "cache_path=${{ inputs.scons-cache }}"
if [ "${{ inputs.target }}" != "editor" ]; then
# Ensure we don't include editor code in export template builds.
@@ -47,5 +42,5 @@ runs:
export BUILD_NAME="gh"
fi
scons platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }} "cache_path=${{ inputs.scons-cache }}" cache_limit=${{ inputs.scons-cache-limit }}
scons platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }} "cache_path=${{ inputs.scons-cache }}"
ls -l bin/
37 changes: 21 additions & 16 deletions .github/actions/godot-cache-restore/action.yml
Original file line number Diff line number Diff line change
@@ -11,24 +11,29 @@ inputs:
runs:
using: composite
steps:
- name: Restore SCons cache directory
- name: Restore default cache
uses: actions/cache/restore@v4
id: cache-ping
with:
path: ${{ inputs.scons-cache }}
key: ${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}-${{ github.sha }}
key: ${{ inputs.cache-name }}|${{ github.event.repository.default_branch }}|${{ github.sha }}
restore-keys: ${{ inputs.cache-name }}|${{ github.event.repository.default_branch }}

# We try to match an existing cache to restore from it. Each potential key is checked against
# all existing caches as a prefix. E.g. 'linux-template-minimal' would match any cache that
# starts with "linux-template-minimal", such as "linux-template-minimal-master-refs/heads/master-6588a4a29af1621086feac0117d5d4d37af957fd".
#
# We check these prefixes in this order:
#
# 1. The exact match, including the base branch, the commit reference, and the SHA hash of the commit.
# 2. A partial match for the same base branch and the same commit reference.
# 3. A partial match for the same base branch and the base branch commit reference.
# 4. A partial match for the same base branch only (not ideal, matches any PR with the same base branch).
- name: Log default cache files
if: github.ref_name != github.event.repository.default_branch
shell: sh
run: find "${{ inputs.scons-cache }}" >> redundant.txt

restore-keys: |
${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}
${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}-refs/heads/${{ env.GODOT_BASE_BRANCH }}
${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}
# This is done after pulling the default cache so that PRs can integrate any potential changes
# from the default branch without conflicting with whatever local changes were already made.
- name: Restore local cache
uses: actions/cache/restore@v4
if: github.ref_name != github.event.repository.default_branch
with:
path: ${{ inputs.scons-cache }}
key: ${{ inputs.cache-name }}|${{ github.ref_name }}|${{ github.sha }}
restore-keys: ${{ inputs.cache-name }}|${{ github.ref_name }}

- name: Store unix timestamp
shell: sh
run: echo "CACHE_TIMESTAMP=$(date +%s)" >> $GITHUB_ENV
6 changes: 5 additions & 1 deletion .github/actions/godot-cache-save/action.yml
Original file line number Diff line number Diff line change
@@ -11,8 +11,12 @@ inputs:
runs:
using: composite
steps:
- name: Purge files before timestamp
shell: sh
run: misc/scripts/purge_cache.py ${{ env.CACHE_TIMESTAMP }} "${{ inputs.scons-cache }}"

- name: Save SCons cache directory
uses: actions/cache/save@v4
with:
path: ${{ inputs.scons-cache }}
key: ${{ inputs.cache-name }}-${{ env.GODOT_BASE_BRANCH }}-${{ github.ref }}-${{ github.sha }}
key: ${{ inputs.cache-name }}|${{ github.ref_name }}|${{ github.sha }}
9 changes: 5 additions & 4 deletions .github/actions/godot-cpp-build/action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Build godot-cpp
description: Build godot-cpp with the provided options.

env:
GODOT_CPP_BRANCH: 4.3

inputs:
bin:
description: Path to the Godot binary.
@@ -16,6 +13,10 @@ inputs:
description: The SCons cache path.
default: ${{ github.workspace }}/.scons_cache/
type: string
godot-cpp-branch:
description: The godot-cpp branch.
default: master
type: string

runs:
using: composite
@@ -25,7 +26,7 @@ runs:
with:
submodules: recursive
repository: godotengine/godot-cpp
ref: ${{ env.GODOT_CPP_BRANCH }}
ref: ${{ inputs.godot-cpp-branch }}
path: godot-cpp

- name: Extract API
2 changes: 1 addition & 1 deletion .github/actions/godot-deps/action.yml
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ inputs:
default: x64
scons-version:
description: The SCons version to use.
default: 4.8.1
default: 4.9.0

runs:
using: composite
30 changes: 22 additions & 8 deletions .github/workflows/android_builds.yml
Original file line number Diff line number Diff line change
@@ -4,8 +4,6 @@ on:

# Global Settings
env:
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes strict_checks=yes

jobs:
@@ -22,21 +20,18 @@ jobs:
target: editor
tests: false
sconsflags: arch=arm64 production=yes swappy=yes
cache-limit: 1

- name: Template arm32 (target=template_release, arch=arm32)
cache-name: android-template-arm32
target: template_release
tests: false
sconsflags: arch=arm32 swappy=yes
cache-limit: 1

- name: Template arm64 (target=template_release, arch=arm64)
cache-name: android-template-arm64
target: template_release
tests: false
sconsflags: arch=arm64 swappy=yes
cache-limit: 1

steps:
- name: Checkout
@@ -62,8 +57,8 @@ jobs:
- name: Download pre-built Android Swappy Frame Pacing Library
uses: dsaltares/fetch-gh-release-asset@1.1.2
with:
repo: darksylinc/godot-swappy
version: tags/v2023.3.0.0
repo: godotengine/godot-swappy
version: tags/from-source-2025-01-31
file: godot-swappy.7z
target: swappy/godot-swappy.7z

@@ -77,7 +72,6 @@ jobs:
platform: android
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
scons-cache-limit: ${{ matrix.cache-limit }}

- name: Save Godot build cache
uses: ./.github/actions/godot-cache-save
@@ -103,7 +97,27 @@ jobs:
cd ../../..
ls -l bin/android_editor_builds/
# Separate different editors for multiple artifacts
mkdir horizonos
mv bin/android_editor_builds/*-horizonos-* horizonos
mkdir picoos
mv bin/android_editor_builds/*-picoos-* picoos
- name: Upload artifact
uses: ./.github/actions/upload-artifact
with:
name: ${{ matrix.cache-name }}

- name: Upload artifact (Horizon OS)
if: matrix.target == 'editor'
uses: ./.github/actions/upload-artifact
with:
name: ${{ matrix.cache-name }}-horizonos
path: horizonos

- name: Upload artifact (PICO OS)
if: matrix.target == 'editor'
uses: ./.github/actions/upload-artifact
with:
name: ${{ matrix.cache-name }}-picoos
path: picoos
28 changes: 28 additions & 0 deletions .github/workflows/cache_cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries
name: 🧹 Cache Cleanup
on:
pull_request:
types:
- closed

jobs:
cleanup:
name: Cleanup PR caches
runs-on: ubuntu-latest
steps:
- name: Cleanup
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
run: |
echo "Fetching list of cache key"
cache_keys_for_pr=$(gh cache list --ref $BRANCH --limit 100 --json id --jq '.[].id')
# Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cache_key in $cache_keys_for_pr; do
gh cache delete $cache_key
echo "Deleted: $cache_key"
done
echo "Done"
3 changes: 0 additions & 3 deletions .github/workflows/ios_builds.yml
Original file line number Diff line number Diff line change
@@ -4,8 +4,6 @@ on:

# Global Settings
env:
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes strict_checks=yes

jobs:
@@ -34,7 +32,6 @@ jobs:
platform: ios
target: template_release
tests: false
scons-cache-limit: 1

- name: Save Godot build cache
uses: ./.github/actions/godot-cache-save
24 changes: 13 additions & 11 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
@@ -4,8 +4,7 @@ on:

# Global Settings
env:
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
GODOT_CPP_BRANCH: 4.4
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes strict_checks=yes
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
@@ -35,7 +34,6 @@ jobs:
artifact: true
# Validate godot-cpp compatibility on one arbitrary editor build.
godot-cpp: true
cache-limit: 2

- name: Editor with doubles and GCC sanitizers (target=editor, tests=yes, dev_build=yes, scu_build=yes, precision=double, use_asan=yes, use_ubsan=yes, linker=gold)
cache-name: linux-editor-double-sanitizers
@@ -48,7 +46,6 @@ jobs:
proj-test: true
# Skip 2GiB artifact speeding up action.
artifact: false
cache-limit: 7

- name: Editor with clang sanitizers (target=editor, tests=yes, dev_build=yes, use_asan=yes, use_ubsan=yes, use_llvm=yes, linker=lld)
cache-name: linux-editor-llvm-sanitizers
@@ -61,7 +58,6 @@ jobs:
artifact: false
# Test our oldest supported SCons/Python versions on one arbitrary editor build.
legacy-scons: true
cache-limit: 7

- 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
@@ -72,17 +68,24 @@ jobs:
build-mono: false
# Skip 2GiB artifact speeding up action.
artifact: false
cache-limit: 5

- name: Template w/ Mono (target=template_release, tests=yes)
- name: Template w/ Mono, release (target=template_release, tests=yes)
cache-name: linux-template-mono
target: template_release
sconsflags: module_mono_enabled=yes
bin: ./bin/godot.linuxbsd.template_release.x86_64.mono
build-mono: false
tests: true
artifact: true
cache-limit: 1

- name: Template w/ Mono, debug (target=template_debug, tests=yes)
cache-name: linux-template-mono-debug
target: template_debug
sconsflags: module_mono_enabled=yes
bin: ./bin/godot.linuxbsd.template_debug.x86_64.mono
build-mono: false
tests: true
artifact: true

- name: Minimal template (target=template_release, tests=yes, everything disabled)
cache-name: linux-template-minimal
@@ -91,7 +94,6 @@ jobs:
bin: ./bin/godot.linuxbsd.template_release.x86_64
tests: true
artifact: true
cache-limit: 1

steps:
- name: Checkout
@@ -105,7 +107,7 @@ jobs:
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EB8B81E14DA65431D7504EA8F63F0F2B90935439
sudo add-apt-repository "deb https://ppa.launchpadcontent.net/kisak/turtle/ubuntu ${{ matrix.os == 'ubuntu-20.04' && 'focal' || 'jammy' }} main"
sudo add-apt-repository "deb https://ppa.launchpadcontent.net/kisak/turtle/ubuntu jammy main"
sudo apt-get install -qq mesa-vulkan-drivers
# TODO: Figure out somehow how to embed this one.
@@ -156,14 +158,14 @@ jobs:
platform: linuxbsd
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
scons-cache-limit: ${{ matrix.cache-limit }}

- name: Compilation (godot-cpp)
uses: ./.github/actions/godot-cpp-build
if: matrix.godot-cpp
with:
bin: ${{ matrix.bin }}
scons-flags: target=template_debug dev_build=yes verbose=yes
godot-cpp-branch: ${{ env.GODOT_CPP_BRANCH }}

- name: Save Godot build cache
uses: ./.github/actions/godot-cache-save
Loading