summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-22 08:28:55 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-26 16:31:46 +0200
commit39facb35a021f9301f742732fbbd3c6a5a548893 (patch)
treec84d1e46f176c069af1bbeef17d25512d18304f8 /.github
parentb9a64c77366361a0d45dcdd2b330911efd1eb3f4 (diff)
SCons: Unify tools/target build type configuration
Implements https://github.com/godotengine/godot-proposals/issues/3371. New `target` presets ==================== The `tools` option is removed and `target` changes to use three new presets, which match the builds users are familiar with. These targets control the default optimization level and enable editor-specific and debugging code: - `editor`: Replaces `tools=yes target=release_debug`. * Defines: `TOOLS_ENABLED`, `DEBUG_ENABLED`, `-O2`/`/O2` - `template_debug`: Replaces `tools=no target=release_debug`. * Defines: `DEBUG_ENABLED`, `-O2`/`/O2` - `template_release`: Replaces `tools=no target=release`. * Defines: `-O3`/`/O2` New `dev_build` option ====================== The previous `target=debug` is now replaced by a separate `dev_build=yes` option, which can be used in combination with either of the three targets, and changes the following: - `dev_build`: Defines `DEV_ENABLED`, disables optimization (`-O0`/`/0d`), enables generating debug symbols, does not define `NDEBUG` so `assert()` works in thirdparty libraries, adds a `.dev` suffix to the binary name. Note: Unlike previously, `dev_build` defaults to off so that users who compile Godot from source get an optimized and small build by default. Engine contributors should now set `dev_build=yes` in their build scripts or IDE configuration manually. Changed binary names ==================== The name of generated binaries and object files are changed too, to follow this format: `godot.<platform>.<target>[.dev][.double].<arch>[.<extra_suffix>][.<ext>]` For example: - `godot.linuxbsd.editor.dev.arm64` - `godot.windows.template_release.double.x86_64.mono.exe` Be sure to update your links/scripts/IDE config accordingly. More flexible `optimize` and `debug_symbols` options ==================================================== The optimization level and whether to generate debug symbols can be further specified with the `optimize` and `debug_symbols` options. So the default values listed above for the various `target` and `dev_build` combinations are indicative and can be replaced when compiling, e.g.: `scons p=linuxbsd target=template_debug dev_build=yes optimize=debug` will make a "debug" export template with dev-only code enabled, `-Og` optimization level for GCC/Clang, and debug symbols. Perfect for debugging complex crashes at runtime in an exported project.
Diffstat (limited to '.github')
-rw-r--r--.github/actions/godot-build/action.yml17
-rw-r--r--.github/workflows/android_builds.yml8
-rw-r--r--.github/workflows/ios_builds.yml5
-rw-r--r--.github/workflows/linux_builds.yml42
-rw-r--r--.github/workflows/macos_builds.yml13
-rw-r--r--.github/workflows/web_builds.yml5
-rw-r--r--.github/workflows/windows_builds.yml13
7 files changed, 42 insertions, 61 deletions
diff --git a/.github/actions/godot-build/action.yml b/.github/actions/godot-build/action.yml
index 75f3d9ab37..377480b123 100644
--- a/.github/actions/godot-build/action.yml
+++ b/.github/actions/godot-build/action.yml
@@ -2,16 +2,13 @@ name: Build Godot
description: Build Godot with the provided options.
inputs:
target:
- description: The scons target (debug/release_debug/release).
- default: "debug"
- tools:
- description: If tools are to be built.
- default: false
+ description: Build target (editor, template_release, template_debug).
+ default: "editor"
tests:
- description: If tests are to be built.
+ description: Unit tests.
default: false
platform:
- description: The Godot platform to build.
+ description: Target platform.
required: false
sconsflags:
default: ""
@@ -33,7 +30,7 @@ runs:
SCONS_CACHE: ${{ inputs.scons-cache }}
SCONS_CACHE_LIMIT: ${{ inputs.scons-cache-limit }}
run: |
- echo "Building with flags:" ${{ env.SCONSFLAGS }}
- if ! ${{ inputs.tools }}; then rm -rf editor; fi # Ensure we don't include editor code.
- scons p=${{ inputs.platform }} target=${{ inputs.target }} tools=${{ inputs.tools }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }}
+ 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.
+ scons platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }}
ls -l bin/
diff --git a/.github/workflows/android_builds.yml b/.github/workflows/android_builds.yml
index 4f54f6629e..ed4ef01012 100644
--- a/.github/workflows/android_builds.yml
+++ b/.github/workflows/android_builds.yml
@@ -14,7 +14,7 @@ concurrency:
jobs:
android-template:
runs-on: "ubuntu-20.04"
- name: Template (target=release, tools=no)
+ name: Template (target=template_release)
steps:
- uses: actions/checkout@v3
@@ -44,8 +44,7 @@ jobs:
with:
sconsflags: ${{ env.SCONSFLAGS }} arch=arm32
platform: android
- target: release
- tools: false
+ target: template_release
tests: false
- name: Compilation (arm64)
@@ -53,8 +52,7 @@ jobs:
with:
sconsflags: ${{ env.SCONSFLAGS }} arch=arm64
platform: android
- target: release
- tools: false
+ target: template_release
tests: false
- name: Generate Godot templates
diff --git a/.github/workflows/ios_builds.yml b/.github/workflows/ios_builds.yml
index bc00fad569..0ea7a4ccc3 100644
--- a/.github/workflows/ios_builds.yml
+++ b/.github/workflows/ios_builds.yml
@@ -14,7 +14,7 @@ concurrency:
jobs:
ios-template:
runs-on: "macos-latest"
- name: Template (target=release, tools=no)
+ name: Template (target=template_release)
steps:
- uses: actions/checkout@v3
@@ -31,8 +31,7 @@ jobs:
with:
sconsflags: ${{ env.SCONSFLAGS }}
platform: ios
- target: release
- tools: false
+ target: template_release
tests: false
- name: Upload artifact
diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml
index 2e8bd101e5..b0ed71a7b5 100644
--- a/.github/workflows/linux_builds.yml
+++ b/.github/workflows/linux_builds.yml
@@ -7,7 +7,7 @@ env:
GODOT_BASE_BRANCH: master
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
DOTNET_NOLOGO: true
- DOTNET_CLI_TELEMETRY_OPTOUT: false
+ DOTNET_CLI_TELEMETRY_OPTOUT: true
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux
@@ -21,57 +21,52 @@ jobs:
fail-fast: false
matrix:
include:
- - name: Editor w Mono (target=release_debug, tools=yes, tests=yes)
+ - name: Editor w/ Mono (target=editor)
cache-name: linux-editor-mono
- target: release_debug
- tools: true
+ target: editor
tests: false # Disabled due freeze caused by mix Mono build and CI
sconsflags: module_mono_enabled=yes
doc-test: true
- bin: "./bin/godot.linuxbsd.opt.tools.x86_64.mono"
+ bin: "./bin/godot.linuxbsd.editor.x86_64.mono"
build-mono: true
proj-conv: true
artifact: true
- - name: Editor with doubles and GCC sanitizers (target=debug, tools=yes, float=64, tests=yes, use_asan=yes, use_ubsan=yes, linker=gold)
+ - name: Editor with doubles and GCC sanitizers (target=editor, tests=yes, dev_build=yes, float=64, use_asan=yes, use_ubsan=yes, linker=gold)
cache-name: linux-editor-double-sanitizers
- target: debug
- tools: true
+ target: editor
tests: true
- sconsflags: float=64 use_asan=yes use_ubsan=yes linker=gold
+ sconsflags: dev_build=yes float=64 use_asan=yes use_ubsan=yes linker=gold
proj-test: true
# Can be turned off for PRs that intentionally break compat with godot-cpp,
# until both the upstream PR and the matching godot-cpp changes are merged.
godot-cpp-test: true
- bin: "./bin/godot.linuxbsd.double.tools.x86_64.san"
+ bin: "./bin/godot.linuxbsd.editor.dev.double.x86_64.san"
build-mono: false
# Skip 2GiB artifact speeding up action.
artifact: false
- - name: Editor with clang sanitizers (target=debug, tools=yes, use_asan=yes, use_ubsan=yes, use_llvm=yes, linker=lld)
+ - 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
- target: debug
- tools: true
+ target: editor
tests: true
- sconsflags: use_asan=yes use_ubsan=yes use_llvm=yes linker=lld
- bin: "./bin/godot.linuxbsd.tools.x86_64.llvm.san"
+ sconsflags: dev_build=yes use_asan=yes use_ubsan=yes use_llvm=yes linker=lld
+ bin: "./bin/godot.linuxbsd.editor.dev.x86_64.llvm.san"
build-mono: false
# Skip 2GiB artifact speeding up action.
artifact: false
- - name: Template w/ Mono (target=release, tools=no)
+ - name: Template w/ Mono (target=template_release)
cache-name: linux-template-mono
- target: release
- tools: false
+ target: template_release
tests: false
- sconsflags: module_mono_enabled=yes debug_symbols=no
+ sconsflags: module_mono_enabled=yes
build-mono: false
artifact: true
- - name: Minimal Template (target=release, tools=no, everything disabled)
+ - name: Minimal template (target=template_release, everything disabled)
cache-name: linux-template-minimal
- target: release
- tools: false
+ target: template_release
tests: false
sconsflags: modules_enabled_by_default=no disable_3d=yes disable_advanced_gui=yes deprecated=no minizip=no
artifact: true
@@ -113,7 +108,6 @@ jobs:
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
platform: linuxbsd
target: ${{ matrix.target }}
- tools: ${{ matrix.tools }}
tests: ${{ matrix.tests }}
- name: Generate C# glue
@@ -221,7 +215,7 @@ jobs:
if: ${{ matrix.godot-cpp-test }}
run: |
cd godot-cpp/test
- scons target=${{ matrix.target }}
+ scons target=debug
cd ../..
- name: Prepare artifact
diff --git a/.github/workflows/macos_builds.yml b/.github/workflows/macos_builds.yml
index be1fb8de85..dd3db3270b 100644
--- a/.github/workflows/macos_builds.yml
+++ b/.github/workflows/macos_builds.yml
@@ -19,17 +19,15 @@ jobs:
fail-fast: false
matrix:
include:
- - name: Editor (target=release_debug, tools=yes, tests=yes)
+ - name: Editor (target=editor, tests=yes)
cache-name: macos-editor
- target: release_debug
- tools: true
+ target: editor
tests: true
- bin: "./bin/godot.macos.opt.tools.x86_64"
+ bin: "./bin/godot.macos.editor.x86_64"
- - name: Template (target=release, tools=no)
+ - name: Template (target=template_release)
cache-name: macos-template
- target: release
- tools: false
+ target: template_release
tests: false
sconsflags: debug_symbols=no
@@ -55,7 +53,6 @@ jobs:
sconsflags: ${{ env.SCONSFLAGS }}
platform: macos
target: ${{ matrix.target }}
- tools: ${{ matrix.tools }}
tests: ${{ matrix.tests }}
# Execute unit tests for the editor
diff --git a/.github/workflows/web_builds.yml b/.github/workflows/web_builds.yml
index deee91938d..f684b838e1 100644
--- a/.github/workflows/web_builds.yml
+++ b/.github/workflows/web_builds.yml
@@ -16,7 +16,7 @@ concurrency:
jobs:
web-template:
runs-on: "ubuntu-20.04"
- name: Template (target=release, tools=no)
+ name: Template (target=template_release)
steps:
- uses: actions/checkout@v3
@@ -43,8 +43,7 @@ jobs:
with:
sconsflags: ${{ env.SCONSFLAGS }}
platform: web
- target: release
- tools: false
+ target: template_release
tests: false
- name: Upload artifact
diff --git a/.github/workflows/windows_builds.yml b/.github/workflows/windows_builds.yml
index 9033e1ab1d..b35c811763 100644
--- a/.github/workflows/windows_builds.yml
+++ b/.github/workflows/windows_builds.yml
@@ -22,19 +22,17 @@ jobs:
fail-fast: false
matrix:
include:
- - name: Editor (target=release_debug, tools=yes, tests=yes)
+ - name: Editor (target=editor, tests=yes)
cache-name: windows-editor
- target: release_debug
- tools: true
+ target: editor
tests: true
# Skip debug symbols, they're way too big with MSVC.
sconsflags: debug_symbols=no
- bin: "./bin/godot.windows.opt.tools.x86_64.exe"
+ bin: "./bin/godot.windows.editor.x86_64.exe"
- - name: Template (target=release, tools=no)
+ - name: Template (target=template_release, tools=no)
cache-name: windows-template
- target: release
- tools: false
+ target: template_release
tests: false
sconsflags: debug_symbols=no
@@ -57,7 +55,6 @@ jobs:
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
platform: windows
target: ${{ matrix.target }}
- tools: ${{ matrix.tools }}
tests: ${{ matrix.tests }}
# Execute unit tests for the editor