2020-08-22 21:04:57 +00:00
|
|
|
name: 🐧 Linux Builds
|
2023-04-04 13:56:53 +00:00
|
|
|
on:
|
|
|
|
workflow_call:
|
2020-07-20 22:36:22 +00:00
|
|
|
|
2020-10-09 20:18:51 +00:00
|
|
|
# Global Settings
|
2020-07-20 22:36:22 +00:00
|
|
|
env:
|
2023-08-01 18:38:07 +00:00
|
|
|
# Used for the cache key. Add version suffix to force clean build.
|
2022-08-25 11:44:22 +00:00
|
|
|
GODOT_BASE_BRANCH: master
|
2021-09-21 19:54:55 +00:00
|
|
|
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
|
2021-09-22 03:11:05 +00:00
|
|
|
DOTNET_NOLOGO: true
|
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.
2022-09-22 06:28:55 +00:00
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
2023-02-22 19:20:29 +00:00
|
|
|
TSAN_OPTIONS: suppressions=misc/error_suppressions/tsan.txt
|
2020-07-20 22:36:22 +00:00
|
|
|
|
2021-08-24 18:49:06 +00:00
|
|
|
concurrency:
|
2021-08-25 13:04:05 +00:00
|
|
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux
|
2021-08-24 18:49:06 +00:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2020-07-20 22:36:22 +00:00
|
|
|
jobs:
|
2021-09-01 15:26:01 +00:00
|
|
|
build-linux:
|
2020-07-20 22:36:22 +00:00
|
|
|
runs-on: "ubuntu-20.04"
|
2021-09-01 15:26:01 +00:00
|
|
|
name: ${{ matrix.name }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
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.
2022-09-22 06:28:55 +00:00
|
|
|
- name: Editor w/ Mono (target=editor)
|
2022-03-18 16:28:48 +00:00
|
|
|
cache-name: linux-editor-mono
|
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.
2022-09-22 06:28:55 +00:00
|
|
|
target: editor
|
2022-08-23 02:23:29 +00:00
|
|
|
sconsflags: module_mono_enabled=yes
|
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.
2022-09-22 06:28:55 +00:00
|
|
|
bin: "./bin/godot.linuxbsd.editor.x86_64.mono"
|
2022-07-26 14:19:05 +00:00
|
|
|
build-mono: true
|
2023-08-01 18:38:07 +00:00
|
|
|
tests: false # Disabled due freeze caused by mix Mono build and CI
|
|
|
|
doc-test: true
|
2022-03-10 15:21:22 +00:00
|
|
|
proj-conv: true
|
2023-08-01 18:38:07 +00:00
|
|
|
api-compat: true
|
2022-03-18 16:28:48 +00:00
|
|
|
artifact: true
|
2021-09-01 15:26:01 +00:00
|
|
|
|
2023-06-20 08:09:01 +00:00
|
|
|
- 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)
|
2021-09-16 06:03:50 +00:00
|
|
|
cache-name: linux-editor-double-sanitizers
|
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.
2022-09-22 06:28:55 +00:00
|
|
|
target: editor
|
2023-02-18 22:41:44 +00:00
|
|
|
# Debug symbols disabled as they're huge on this build and we hit the 14 GB limit for runners.
|
2023-06-20 08:09:01 +00:00
|
|
|
sconsflags: dev_build=yes scu_build=yes debug_symbols=no precision=double use_asan=yes use_ubsan=yes linker=gold
|
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.
2022-09-22 06:28:55 +00:00
|
|
|
bin: "./bin/godot.linuxbsd.editor.dev.double.x86_64.san"
|
2021-10-01 06:14:54 +00:00
|
|
|
build-mono: false
|
2023-08-01 18:38:07 +00:00
|
|
|
tests: true
|
|
|
|
proj-test: true
|
|
|
|
# Generate an API dump for godot-cpp tests.
|
|
|
|
api-dump: true
|
2021-09-01 15:26:01 +00:00
|
|
|
# Skip 2GiB artifact speeding up action.
|
|
|
|
artifact: false
|
|
|
|
|
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.
2022-09-22 06:28:55 +00:00
|
|
|
- name: Editor with clang sanitizers (target=editor, tests=yes, dev_build=yes, use_asan=yes, use_ubsan=yes, use_llvm=yes, linker=lld)
|
2022-04-01 10:15:35 +00:00
|
|
|
cache-name: linux-editor-llvm-sanitizers
|
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.
2022-09-22 06:28:55 +00:00
|
|
|
target: editor
|
|
|
|
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"
|
2022-04-01 10:15:35 +00:00
|
|
|
build-mono: false
|
2023-08-01 18:38:07 +00:00
|
|
|
tests: true
|
2022-04-01 10:15:35 +00:00
|
|
|
# Skip 2GiB artifact speeding up action.
|
|
|
|
artifact: false
|
|
|
|
|
2023-02-22 19:20:29 +00:00
|
|
|
- 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
|
|
|
|
target: editor
|
|
|
|
tests: true
|
|
|
|
sconsflags: dev_build=yes use_tsan=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.
|
2022-04-01 10:15:35 +00:00
|
|
|
artifact: false
|
|
|
|
|
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.
2022-09-22 06:28:55 +00:00
|
|
|
- name: Template w/ Mono (target=template_release)
|
2022-03-18 16:28:48 +00:00
|
|
|
cache-name: linux-template-mono
|
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.
2022-09-22 06:28:55 +00:00
|
|
|
target: template_release
|
|
|
|
sconsflags: module_mono_enabled=yes
|
2022-03-18 16:28:48 +00:00
|
|
|
build-mono: false
|
2023-08-01 18:38:07 +00:00
|
|
|
tests: false
|
2022-03-18 16:28:48 +00:00
|
|
|
artifact: true
|
2020-07-20 22:36:22 +00:00
|
|
|
|
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.
2022-09-22 06:28:55 +00:00
|
|
|
- name: Minimal template (target=template_release, everything disabled)
|
2021-11-12 15:30:34 +00:00
|
|
|
cache-name: linux-template-minimal
|
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.
2022-09-22 06:28:55 +00:00
|
|
|
target: template_release
|
2021-11-12 15:30:34 +00:00
|
|
|
sconsflags: modules_enabled_by_default=no disable_3d=yes disable_advanced_gui=yes deprecated=no minizip=no
|
2023-08-01 18:38:07 +00:00
|
|
|
tests: false
|
2021-11-12 15:30:34 +00:00
|
|
|
artifact: true
|
|
|
|
|
2020-07-20 22:36:22 +00:00
|
|
|
steps:
|
2023-09-04 14:05:38 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-07-20 22:36:22 +00:00
|
|
|
|
2023-02-06 13:23:14 +00:00
|
|
|
# Need newer mesa for lavapipe to work properly.
|
|
|
|
- name: Linux dependencies for tests
|
|
|
|
if: ${{ matrix.proj-test }}
|
2020-07-20 22:36:22 +00:00
|
|
|
run: |
|
2023-02-10 20:59:47 +00:00
|
|
|
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
|
2023-10-12 20:27:53 +00:00
|
|
|
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EB8B81E14DA65431D7504EA8F63F0F2B90935439
|
|
|
|
sudo add-apt-repository "deb https://ppa.launchpadcontent.net/kisak/turtle/ubuntu focal main"
|
2023-02-06 13:23:14 +00:00
|
|
|
sudo apt-get install -qq mesa-vulkan-drivers
|
2020-07-20 22:36:22 +00:00
|
|
|
|
2023-08-01 12:28:56 +00:00
|
|
|
- name: Free disk space on runner
|
|
|
|
run: |
|
|
|
|
echo "Disk usage before:" && df -h
|
|
|
|
sudo rm -rf /usr/local/lib/android
|
|
|
|
echo "Disk usage after:" && df -h
|
|
|
|
|
2021-09-01 15:26:01 +00:00
|
|
|
- name: Setup Godot build cache
|
|
|
|
uses: ./.github/actions/godot-cache
|
2020-07-20 22:36:22 +00:00
|
|
|
with:
|
2021-09-01 15:26:01 +00:00
|
|
|
cache-name: ${{ matrix.cache-name }}
|
2021-08-18 19:00:56 +00:00
|
|
|
continue-on-error: true
|
2020-07-20 22:36:22 +00:00
|
|
|
|
2021-09-01 15:26:01 +00:00
|
|
|
- name: Setup python and scons
|
|
|
|
uses: ./.github/actions/godot-deps
|
2020-07-20 22:36:22 +00:00
|
|
|
|
2021-09-22 03:11:05 +00:00
|
|
|
- name: Set up .NET Sdk
|
2023-09-04 14:05:38 +00:00
|
|
|
uses: actions/setup-dotnet@v3
|
2021-09-22 03:11:05 +00:00
|
|
|
if: ${{ matrix.build-mono }}
|
|
|
|
with:
|
2022-02-27 20:57:50 +00:00
|
|
|
dotnet-version: '6.0.x'
|
2021-09-22 03:11:05 +00:00
|
|
|
|
2022-10-31 15:21:33 +00:00
|
|
|
- name: Setup GCC problem matcher
|
|
|
|
uses: ammaraskar/gcc-problem-matcher@master
|
|
|
|
|
2020-07-20 22:36:22 +00:00
|
|
|
- name: Compilation
|
2021-09-01 15:26:01 +00:00
|
|
|
uses: ./.github/actions/godot-build
|
|
|
|
with:
|
|
|
|
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
|
|
|
|
platform: linuxbsd
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
tests: ${{ matrix.tests }}
|
2020-07-20 22:36:22 +00:00
|
|
|
|
2021-09-22 03:11:05 +00:00
|
|
|
- name: Generate C# glue
|
|
|
|
if: ${{ matrix.build-mono }}
|
|
|
|
run: |
|
2023-08-21 11:21:19 +00:00
|
|
|
${{ matrix.bin }} --headless --generate-mono-glue ./modules/mono/glue
|
2021-09-22 03:11:05 +00:00
|
|
|
|
|
|
|
- name: Build .NET solutions
|
2021-10-01 06:14:54 +00:00
|
|
|
if: ${{ matrix.build-mono }}
|
|
|
|
run: |
|
2021-09-22 03:11:05 +00:00
|
|
|
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
|
2021-10-01 06:14:54 +00:00
|
|
|
|
2023-08-01 18:38:07 +00:00
|
|
|
- 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 }}
|
|
|
|
|
|
|
|
- name: Dump Godot API
|
|
|
|
uses: ./.github/actions/godot-api-dump
|
|
|
|
if: ${{ matrix.api-dump }}
|
|
|
|
with:
|
|
|
|
bin: ${{ matrix.bin }}
|
|
|
|
|
2020-07-20 16:35:34 +00:00
|
|
|
# Execute unit tests for the editor
|
2021-09-01 15:26:01 +00:00
|
|
|
- name: Unit tests
|
|
|
|
if: ${{ matrix.tests }}
|
2020-07-20 16:35:34 +00:00
|
|
|
run: |
|
2022-07-01 23:05:20 +00:00
|
|
|
${{ matrix.bin }} --version
|
|
|
|
${{ matrix.bin }} --help
|
2021-10-01 06:14:54 +00:00
|
|
|
${{ matrix.bin }} --test --headless
|
2020-07-20 16:35:34 +00:00
|
|
|
|
2021-10-20 14:38:22 +00:00
|
|
|
# Check class reference
|
|
|
|
- name: Check for class reference updates
|
|
|
|
if: ${{ matrix.doc-test }}
|
|
|
|
run: |
|
|
|
|
echo "Running --doctool to see if this changes the public API without updating the documentation."
|
|
|
|
echo -e "If a diff is shown, it means that your code/doc changes are incomplete and you should update the class reference with --doctool.\n\n"
|
|
|
|
${{ matrix.bin }} --doctool --headless 2>&1 > /dev/null || true
|
|
|
|
git diff --color --exit-code && ! git ls-files --others --exclude-standard | sed -e 's/^/New doc file missing in PR: /' | grep 'xml$'
|
|
|
|
|
2023-08-01 18:38:07 +00:00
|
|
|
# Check API backwards compatibility
|
2023-05-16 16:38:46 +00:00
|
|
|
- name: Check for GDExtension compatibility
|
2023-08-01 18:38:07 +00:00
|
|
|
if: ${{ matrix.api-compat }}
|
2023-05-16 16:38:46 +00:00
|
|
|
run: |
|
2023-08-03 13:56:25 +00:00
|
|
|
./misc/scripts/validate_extension_api.sh "${{ matrix.bin }}"
|
2023-05-16 16:38:46 +00:00
|
|
|
|
2023-08-01 18:38:07 +00:00
|
|
|
# Download and run the test project
|
|
|
|
- name: Test Godot project
|
|
|
|
uses: ./.github/actions/godot-project-test
|
|
|
|
if: ${{ matrix.proj-test }}
|
|
|
|
with:
|
|
|
|
bin: ${{ matrix.bin }}
|
2021-09-21 19:54:55 +00:00
|
|
|
|
2023-08-01 18:38:07 +00:00
|
|
|
# Test the project converter
|
|
|
|
- name: Test project converter
|
|
|
|
uses: ./.github/actions/godot-converter-test
|
|
|
|
if: ${{ matrix.proj-conv }}
|
2020-09-29 21:42:41 +00:00
|
|
|
with:
|
2023-08-01 18:38:07 +00:00
|
|
|
bin: ${{ matrix.bin }}
|