Commit Graph

136 Commits

Author SHA1 Message Date
antonWetzel 87ebfff46d create vector4, vector4i and projection for csharp 2022-07-31 19:42:34 +02:00
Rémi Verschelde da14b19bbf CI: Link MoltenVK statically on macOS
Same as done for official builds.

Also make artifacts executable before zipping.
2022-07-29 14:32:57 +02:00
bruvzg 36ef8f29dc
Implement support for loading system fonts on Linux, macOS / iOS and Windows. 2022-07-26 08:38:05 +03:00
Rémi Verschelde 90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
reduz 455c06ecd4 Implement Vector4, Vector4i, Projection
Implement built-in classes Vector4, Vector4i and Projection.

* Two versions of Vector4 (float and integer).
* A Projection class, which is a 4x4 matrix specialized in projection types.

These types have been requested for a long time, but given they were very corner case they were not added before.
Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity.

**Q**: Why Projection and not Matrix4?
**A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
2022-07-23 14:00:01 +02:00
Rémi Verschelde c8479c0d4d SCons: Refactor Linux linker options with `linker=<bfd|gold|lld|mold>`
The new option is `linker` and lets the user specify the argument to
the`-fuse_ld=` linker flag directly. The supported options are:

- `default`: No change, typically uses GNU ld (bfd) unless the user or
  distro picked a different default `/usr/bin/ld`.
- `bfd`: GNU ld from binutils
- `gold`: GNU gold from binutils
- `lld`: lld from LLVM
- `mold`: mold, an extremely fast modern linker, not (yet) intended for
  use in production but great for development speed. Provided by distro
  `mold` package or needs to be compiled from source and installed to
  `/usr` otherwise.

Removes the `use_lld=yes` option, and make lld actually usable with GCC
too.

Not all the above are compatible or recommend for LTO, we recommend
using GNU ld with GCC LTO, or lld with LLVM ThinLTO.
2022-07-22 01:00:35 +02:00
Rémi Verschelde a9e4eac7b9
Merge pull request #63225 from bruvzg/mac_rename 2022-07-21 10:25:26 +02:00
Rémi Verschelde 26f9e87235 CI: Use Gold (GCC) and LLD (Clang) as linker for Linux sanitizers builds
They're very memory hungry to a point where GNU ld can crash on CI.
Both Gold and LLD should be nicer to RAM and thus a safer option.
2022-07-21 08:53:11 +02:00
bruvzg 8823eae328
Rename OSX to macOS and iPhoneOS to iOS. 2022-07-21 09:37:52 +03:00
Riteo ef9039ad36 Revert "CI: Disable Linux GCC ASAN temporarily"
This reverts commit 04e955841f.

It looks like we can just remove `-pipe` for the CI to complete.
2022-07-20 19:03:38 +02:00
Rémi Verschelde 04e955841f
CI: Disable Linux GCC ASAN temporarily
Another attempt at fixing CI which seems to get a linker crash since today (likely OOM).
2022-07-20 16:35:03 +02:00
Rémi Verschelde ea21122575 SCons: Default `num_jobs` to max CPUs minus 1 if not specified
This doesn't change the behavior when `--jobs`/`-j` is specified as a
command-line argument or in `SCONSFLAGS`.

The SCons hack used to know if `num_jobs` was set by the user is derived
from the MongoDB setup.

We use `os.cpu_count()` for portability (available since Python 3.4).

With 4 CPUs or less, we use the max. With more than 4 we use max - 1 to
preserve some bandwidth for the user's other programs.
2022-07-17 12:38:41 +02:00
bruvzg b2462cfd8a
[macOS] Use statically linked MoltenVK by default, automatically detect MoltenVK SDK install (only in the default location). 2022-07-03 17:11:18 +03:00
Jan Haller d38d76d039 Fix exit code of --help and --version, and test them in CI
Corrects prior regression which caused ERROR output and exit code of 1.
2022-07-02 01:17:35 +02:00
Rémi Verschelde 56deb5889e Rewrite PR template to make it slightly less verbose 2022-06-28 16:11:54 +02:00
Rafał Mikrut 24f45bd533 Add Godot 3.x -> Godot 4.x project converter 2022-06-15 10:11:17 +02:00
Hugo Locurcio d45351f413
makerst: Print colored output for easier visual grepping
This is automatically enabled on all platforms including
Windows 10 and later, whenever a TTY environment is detected.

In non-TTY environments such as CI, this can be forced using the
`--color` command line argument.
2022-06-11 00:19:36 +02:00
Rémi Verschelde f07021fbeb CI: Update Emscripten to 3.1.10
That's the version that we'll (tentatively) use for future 3.x and 4.0
builds.
2022-05-10 13:03:13 +02:00
bruvzg 6ab672d1ef Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and Windows.
Implement TextServer word break method.
2022-04-28 14:35:41 +03:00
bruvzg 38fcb9d112
Remove redundant `godot-cpp` build stage. 2022-04-07 19:54:09 +03:00
Rémi Verschelde 77843355a0 CI: Update black formatter and apply changes 2022-04-05 17:43:12 +02:00
bruvzg ba0317be04
Add CI build with clang sanitizers, increase stack size to 30 MB for builds with sanitizers. 2022-04-01 13:15:35 +03:00
Rémi Verschelde 05ac2a4139 CI: Re-enabled godot-cpp test
Compatibility with current master was fixed in
https://github.com/godotengine/godot-cpp/pull/734
2022-03-30 15:38:46 +02:00
Pierre-Thomas Meisels 63f7f44ccb Make vararg method bind no return and return
Type emit_signal exposed method return type

set UndoRedo add_do_method and add_undo_method exposed return void

Set TreeItem::_call_recursive_bind returns void

Set _rpc_bind and _rpc_id_bind returns void in Node

Set _call_group and _call_group_flags method returns void in SceneTree

Set godot-cpp-test CI flag to false
2022-03-30 11:43:12 +02:00
Rémi Verschelde 9522032adf CI: Reduce max cache to 7 GiB, remove Windows debug symbols
GitHub Actions runners only have 14 GiB available, so we need
to keep the cache constrained.
2022-03-30 10:16:03 +02:00
Rémi Verschelde 45ec0e31c3 Remove last editor code dependencies in template build
SConstruct change also makes it possible to outright delete the `editor`
folder in a `tools=no` build, which we use in CI to ensure no invalid
cross-dependencies are added.
2022-03-28 21:13:01 +02:00
Rémi Verschelde 3393b3c8d1 CI: Limit Windows cache size again, otherwise we run out of space
And force a full rebuild as the cache is now broken.
2022-03-28 16:09:15 +02:00
Rémi Verschelde cd2e7fbc57 CI: Update to actions/cache@v3, increase cache limit to 10 GiB
And force rebuild of Linux cache which got corrupted...
2022-03-23 08:10:43 +01:00
Raul Santos 4bbfd20aa9
Ignore PhysicsServer3DExtension class in C#
PhysicsServer3DExtension inherits from PhysicsServer3D which is a
singleton class, since singleton classes are generated as static in C#
it would generate invalid C# so for now we'll be
ignoring PhysicsServer3DExtension.
2022-03-18 17:28:48 +01:00
bruvzg 96f7a08fd6
Re-enable `godot-cpp` CI. 2022-03-17 08:18:01 +02:00
reduz 8b547331be Create GDExtension clases for PhysicsServer3D
* Allows creating a GDExtension based 3D Physics Server (for Bullet, PhysX, etc. support)
* Some changes on native struct binding for PhysicsServer

This allows a 3D Physics server created entirely from GDExtension. Once it works, the idea is to port the 2D one to it.
2022-03-15 18:39:31 +01:00
Hugo Locurcio eae16f73a6
Make `-q` CLI argument toggle quiet stdout instead of quitting
`-q` is a common toggle in a command line applications for quiet mode
(see apt or dnf for examples). In contrast, `--quit` isn't needed
as often.
2022-03-13 23:55:01 +01:00
reduz 6f51eca1e3 Discern between virtual and abstract class bindings
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract".
* Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions.
* Converted a large amount of classes from "abstract" to "virtual" where it makes sense.

Most classes that make sense have been converted. Missing:

* Physics servers
* VideoStream
* Script* classes.

which will go in a separate PR due to the complexity involved.
2022-03-10 12:28:11 +01:00
Rémi Verschelde ce09a47db4 CI: Use mono_static=yes for Mono builds
This removes the dependency on shared libmonosgen installed locally
and makes the artifacts usable as standalone for testing without
needing a full Mono install.
2022-02-22 13:49:37 +01:00
Hugo Locurcio b68dd2e189
Add an XML schema for documentation
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.

Each class XML's schema conformance is also checked on GitHub Actions.
2022-02-15 00:03:31 +01:00
Hugo Locurcio 74fc4410f4
Remove support for ARMv7 (32-bit) on iOS
All iOS devices since the iPhone 5S support ARMv8 (64-bit).

The last iOS version supported on ARMv7 devices is 10.x, which is
too old to run Godot 4.0 projects since the minimum supported
iOS version is 11.0.
2022-02-08 22:11:29 +01:00
Rémi Verschelde 992794e44a
CI: Force invalidate macOS cache
I *hate* having to commit this kind of noise to our
commit history. Especially on a Friday at 10 pm.
2022-02-04 22:26:16 +01:00
Rémi Verschelde 56838ca009
CI: Rename macOS cache key to force a rebuild
The cache got corrupted and until https://github.com/actions/cache/issues/2
is prioritized we're forced to fix it up with such hacks...
2022-01-11 20:59:06 +01:00
Rémi Verschelde aafac1e33a
CI: Update SwiftShader to 2021-10-02 build
No specific reason that I know of aside from it being available in our
prebuilt CI dependencies.
2022-01-06 15:17:34 +01:00
Rémi Verschelde 94232dcb48
CI: Update links to regression test project and prebuilt SwiftShader
qarmin's repository has been moved to the godotengine organization.
2022-01-06 12:10:15 +01:00
Aaron Franke 368c0bc0ac
Misc build system fixes 2021-12-10 12:14:27 -06:00
Aaron Franke e9808e3d9a
Add a double-precision editor build to CI 2021-12-09 09:52:48 -06:00
Aaron Franke ae713f8980
Add a minimal template build to CI
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-11-12 09:30:50 -06:00
qarmin 071829acc5 Enable mono editor build in CI 2021-11-09 11:02:04 +01:00
Rémi Verschelde 5116f32db4
CI: Update black to 21.10b0
No formatting changes on our code compared to 20.8b1.
2021-11-03 13:57:49 +01:00
Rémi Verschelde f42ef8d5f9
CI: Update to clang-format 13 using LLVM repo 2021-10-28 17:11:00 +02:00
Rémi Verschelde 2ecab0491c
Merge pull request #54179 from aaronfranke/make-rst 2021-10-26 08:43:07 +02:00
Rémi Verschelde 55d05565d0
clang-format: Enable `--Wno-error=unknown` for compat with older versions
This prevents errors when encountering options which have been defined in newer
versions of clang-format, and are invalid in the YAML for the old version.

Bump minimum supported clang-format version to 12 (where `--Wno-error=unknown`
was added).

Use clang-format 12 on CI (13 is not available yet on the Ubuntu 20.04 images).
2021-10-25 00:19:22 +02:00
Aaron Franke 8f05e26198
Rename "makerst.py" to "make_rst.py" 2021-10-24 01:58:59 -05:00
Bastiaan Olij daff03576d Add CI step for compiling and testing godot-cpp 2021-10-21 20:30:19 +11:00