Skip to content

Commit

Permalink
Merge branch '3.x' into fix_skele2d_bounds2
Browse files Browse the repository at this point in the history
  • Loading branch information
lawnjelly authored Apr 10, 2023
2 parents 2b32e42 + 7d36cae commit 1c13a31
Show file tree
Hide file tree
Showing 139 changed files with 4,128 additions and 790 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android_builds.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 🤖 Android Builds
on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

# Global Settings
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios_builds.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 🍏 iOS Builds
on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

# Global Settings
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/javascript_builds.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 🌐 JavaScript Builds
on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

# Global Settings
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 🐧 Linux Builds
on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

# Global Settings
env:
Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/linux_dev_builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: 🐧 Linux Dev Builds
on: [push, pull_request, workflow_dispatch]

# Global Settings
env:
# Only used for the cache key. Increment version to force clean build.
GODOT_BASE_BRANCH: 3.x
SCONSFLAGS: verbose=no warnings=all werror=yes

concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux
cancel-in-progress: true

jobs:
build-linux:
runs-on: "ubuntu-20.04"
name: ${{ matrix.name }}
strategy:
fail-fast: true
matrix:
include:
- name: Editor dev (target=debug, tools=yes)
cache-name: linux-editor-dev
target: debug
tools: true
sconsflags: use_scu=yes rids=tracked_handles
bin: "./bin/godot.x11.tools.64"
build-mono: false
artifact: false

steps:
- uses: actions/checkout@v3

- name: Linux dependencies
shell: bash
run: |
# Azure repositories are not reliable, we need to prevent azure giving us packages.
sudo rm -f /etc/apt/sources.list.d/*
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
sudo apt-get update
# The actual dependencies
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev \
libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm xvfb wget unzip \
libspeechd-dev speech-dispatcher
- 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
uses: ./.github/actions/godot-deps

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

- name: Copy custom.py
shell: bash
run: |
# Use custom.py to only compile core.
cp -f misc/scripts/custom.py custom.py
- name: Compilation
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
platform: x11
target: ${{ matrix.target }}
tools: ${{ matrix.tools }}

- name: Prepare artifact
if: ${{ matrix.artifact }}
run: |
strip bin/godot.*
chmod +x bin/godot.*
- name: Upload artifact
uses: ./.github/actions/upload-artifact
if: ${{ matrix.artifact }}
with:
name: ${{ matrix.cache-name }}
2 changes: 1 addition & 1 deletion .github/workflows/macos_builds.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 🍎 macOS Builds
on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

# Global Settings
env:
Expand Down
101 changes: 101 additions & 0 deletions .github/workflows/release_linux_builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: 🐧 Release Linux Builds
on: [workflow_dispatch]

# Global Settings
env:
# Only used for the cache key. Increment version to force clean build.
GODOT_BASE_BRANCH: 3.x
SCONSFLAGS: verbose=no warnings=all werror=no

concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux
cancel-in-progress: true

jobs:
build-linux:
runs-on: "ubuntu-20.04"
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: Editor (target=release_debug, tools=yes)
cache-name: linux-editor
target: release_debug
tools: true
sconsflags: mono_glue=no
bin: "./bin/godot.x11.opt.tools.64"
build-mono: false
artifact: true

- name: Template (target=release, tools=no)
cache-name: linux-template
target: release
tools: false
sconsflags: mono_glue=no debug_symbols=no
build-mono: false
artifact: true

steps:
- uses: actions/checkout@v3

- name: Linux dependencies
shell: bash
run: |
# Azure repositories are not reliable, we need to prevent azure giving us packages.
sudo rm -f /etc/apt/sources.list.d/*
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
sudo apt-get update
# The actual dependencies
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev \
libdbus-1-dev libudev-dev libxi-dev libxrandr-dev yasm xvfb wget unzip \
libspeechd-dev speech-dispatcher
- 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
uses: ./.github/actions/godot-deps

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

- name: Compilation
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
platform: linuxbsd
target: ${{ matrix.target }}
tools: ${{ matrix.tools }}

# Generate mono glue
- name: Generate Mono glue code
if: ${{ matrix.build-mono }}
run: |
DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --generate-mono-glue modules/mono/glue || true
# Rebuild with mono
- name: Compilation (mono_glue=yes)
uses: ./.github/actions/godot-build
if: ${{ matrix.build-mono }}
with:
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} mono_glue=yes
platform: linuxbsd
target: ${{ matrix.target }}
tools: ${{ matrix.tools }}

- name: Prepare artifact
if: ${{ matrix.artifact }}
run: |
strip bin/godot.*
chmod +x bin/godot.*
- name: Upload artifact
uses: ./.github/actions/upload-artifact
if: ${{ matrix.artifact }}
with:
name: ${{ matrix.cache-name }}
2 changes: 1 addition & 1 deletion .github/workflows/server_builds.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: ☁ Server Builds
on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

# Global Settings
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_builds.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 🏁 Windows Builds
on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

# Global Settings
# SCONS_CACHE for windows must be set in the build environment
Expand Down
13 changes: 13 additions & 0 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ from collections import OrderedDict
# Local
import methods
import gles_builders
import scu_builders
from platform_methods import run_in_subprocess

# scan possible build platforms
Expand Down Expand Up @@ -86,6 +87,7 @@ env_base.__class__.disable_module = methods.disable_module
env_base.__class__.add_module_version_string = methods.add_module_version_string

env_base.__class__.add_source_files = methods.add_source_files
env_base.__class__.add_source_files_scu = methods.add_source_files_scu
env_base.__class__.use_windows_spawn_fix = methods.use_windows_spawn_fix
env_base.__class__.split_lib = methods.split_lib

Expand Down Expand Up @@ -155,6 +157,7 @@ opts.Add(BoolVariable("disable_advanced_gui", "Disable advanced GUI nodes and be
opts.Add(BoolVariable("no_editor_splash", "Don't use the custom splash screen for the editor", True))
opts.Add("system_certs_path", "Use this path as SSL certificates default for editor (for package maintainers)", "")
opts.Add(BoolVariable("use_precise_math_checks", "Math checks use very precise epsilon (debug option)", False))
opts.Add(BoolVariable("use_scu", "Use single compilation unit build", False))
opts.Add(
EnumVariable(
"rids",
Expand Down Expand Up @@ -335,6 +338,12 @@ else:
# Disable assert() for production targets (only used in thirdparty code).
env_base.Append(CPPDEFINES=["NDEBUG"])

# SCU builds currently use too much compiler memory
# in release builds, so disallow except in DEV builds.
if env_base["use_scu"]:
print("WARNING: SCU build flag ignored in non-DEV builds.")
env_base["use_scu"] = False

# SCons speed optimization controlled by the `fast_unsafe` option, which provide
# more than 10 s speed up for incremental rebuilds.
# Unsafe as they reduce the certainty of rebuilding all changed files, so it's
Expand Down Expand Up @@ -442,6 +451,10 @@ if selected_platform in platform_list:
"for an optimized template with debug features)."
)

# Run SCU file generation script if in a SCU build.
if env["use_scu"]:
scu_builders.generate_scu_files(env["verbose"])

# Must happen after the flags' definition, as configure is when most flags
# are actually handled to change compile options, etc.
detect.configure(env)
Expand Down
3 changes: 1 addition & 2 deletions core/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ env.core_sources += thirdparty_obj


# Godot source files

env.add_source_files(env.core_sources, "*.cpp")
env.add_source_files_scu(env.core_sources, "*.cpp")
env.add_source_files(env.core_sources, "script_encryption_key.gen.cpp")
env.add_source_files(env.core_sources, "version_hash.gen.cpp")

Expand Down
2 changes: 2 additions & 0 deletions core/color_names.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Names from https://en.wikipedia.org/wiki/X11_color_names
#pragma once

#include "core/map.h"

static Map<String, Color> _named_colors;
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if not has_module:

core_obj = []

env_crypto.add_source_files(core_obj, "*.cpp")
env_crypto.add_source_files_scu(core_obj, "*.cpp")
env.core_sources += core_obj

# Needed to force rebuilding the core files when the thirdparty library is updated.
Expand Down
Loading

0 comments on commit 1c13a31

Please sign in to comment.