Commit graph

214 commits

Author SHA1 Message Date
Rémi Verschelde
a63c37dca1
SCons: Bump min version to 3.1.2, test it on CI with one Linux job
The min SCons version had to be bumped as SCons 3.0 before 3.0.3 seems
broken (see #92043), and there's little gain from supporting 3.0.3-3.0.5.

3.1.2 is also the first version to avoid ambiguities between Python 2
and Python 3 usage, so we finally use it as the minimum baseline.

Also test against Python 3.6 which is also our minimum supported version.
This should help prevent regressions whenever we modernize the build scripts.
2024-05-17 11:18:57 +02:00
Rémi Verschelde
734f820be4
CI: Re-add CHANGED_FILES logic for pre-commit checks
Fixes #91831.
2024-05-11 15:55:23 +02:00
Rémi Verschelde
4778b24366
Merge pull request #91597 from Repiteo/ci/pre-commit-handle-everything
CI: Overhaul static checks to use `pre-commit`
2024-05-08 18:22:59 +02:00
Thaddeus Crews
df969ff742
CI: Overhaul static checks to use pre-commit 2024-05-08 10:30:24 -05:00
Rémi Verschelde
8ee0851816
CI: Use Emscripten 3.1.59 for Web platform
Works around CI failure due to mismatch between current emsdk and older releases.
2024-05-08 01:10:23 +02:00
Rémi Verschelde
4b070e8031
Fix various typos with codespell
Using 2.2.7.dev217+g10c2abcf.

Had to add `colour` to the ignore list as we used it as an alias/keyword for the
documentation of color-related APIs.
Also ignore recommendations to change `thirdparty` to either `third-party` or
`third party`, which are correct but we use the former fairly consistently.
2024-05-07 10:08:42 +02:00
Thaddeus Crews
aa3ad1889f
Buildsystem: Speedup pre-commit static check 2024-05-01 10:04:03 -05:00
A Thousand Ships
24ad73b13f
[CI] [macOS] Build for both arm64 and x86_64
Creates a universal build, to catch discrepancies on different
architectures
2024-04-24 13:00:30 +02:00
A Thousand Ships
836845f5a2
[CI] [macOS] Fix CI with new GitHub runners
New `macos-latest` run on an arm64 image instead of x86_64 breaking the
editor workflow.
2024-04-23 20:01:32 +02:00
Adam Scott
56686cd1fb
Remove buggy first interaction 2024-04-05 08:45:42 -04:00
Adam Scott
3df22bf72c
Fix first interaction line breaks 2024-04-04 16:41:42 -04:00
Adam Scott
fabd6d8ac3
Add first interaction action to better inform newcomers 2024-04-04 08:42:18 -04:00
A Thousand Ships
950743c3d8
[CI] Improve fetching of changed files
PRs always use a merge into the repo on checkout, so checking for
`HEAD^1` will show all the changes regardless of the number of commits
in a PR
2024-03-28 13:53:36 +01:00
A Thousand Ships
62531ea2d1
[CI] Work around diff size limit for static checks 2024-03-27 17:01:39 +01:00
Aaron Franke
2b2dec1f60
CI: Enable submodules on the checkout action 2024-03-15 19:53:06 -07:00
Rémi Verschelde
aa8e9fee63
Merge pull request #88671 from akien-mga/ci-actions-update
CI: Update actions to latest versions, use default runner .NET version
2024-03-06 13:17:00 +01:00
Raul Santos
97851f0340
Move dotnet-format script to pre-commit
Co-authored-by: Paul Joannon <437025+paulloz@users.noreply.github.com>
2024-03-02 08:25:48 +01:00
Aarni Koskela
20c563de40
Replace hand-written pre-commit hooks with pre-commit Python tool
`pre-commit` can be installed with pip, and configured in the Godot repo with
`pre-commit install`. It can then easily be run both locally with
`pre-commit run`, and on CI, in a cross-platform way.

This makes it much easier for contributors to set up pre-commit hooks,
without having to manually copy files to their git folder.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-02-26 14:57:53 +01:00
David Snopek
fa81e12588 Fix lint errors in WebXR module 2024-02-23 16:24:58 -06:00
David Snopek
39bd685814 Use godot-cpp 4.2 for the "Godot CPP" CI workflow 2024-02-23 15:16:09 -06:00
Rémi Verschelde
ad8d3cf1c9
CI: Update actions to latest versions, use default runner .NET version 2024-02-22 23:02:35 +01:00
Raul Santos
99b4f3086d
C#: Run source generators tests in CI
Also fixes ScriptPathAttributeGenerator for generic types and its test.
2024-02-19 19:41:15 +01:00
Andreia Gaita
7638a6c981 Add new VS proj generation logic that supports any platform that wants to opt in
Custom Visual Studio project generation logic that supports any platform that has a msvs.py
script, so Visual Studio can be used to run scons for any platform, with the right defines per target.

Invoked with `scons vsproj=yes`

To generate build configuration files for all platforms+targets+arch combinations, users should call

```
scons vsproj=yes platform=XXX target=YYY [other build flags]
```

for each combination of platform+target[+arch]. This will generate the relevant vs project files but
skip the build process, so that project files can be quickly generated without waiting for a command line
build. This lets project files be quickly generated even if there are build errors.

All possible combinations of platform+target are created in the solution file by default, but they
won't do anything until each one is set up with a scons vsproj=yes command for the respective platform
in the appropriate command line. This lets users only generate the combinations they need, and VS
won't have to parse settings for other combos.

Only platforms that opt in to vs proj generation by having a msvs.py file in the platform folder are included.
Platforms with a msvs.py file will be added to the solution, but only the current active platform+target+arch
will have a build configuration generated, because we only know what the right defines/includes/flags/etc are
on the active build target currently being processed by scons.

Platforms that don't support an editor target will have a dummy editor target that won't do anything on build,
but will have the files and configuration for the windows editor target.

To generate AND build from the command line, run

```
scons vsproj=yes vsproj_gen_only=no
```
2024-01-31 16:42:42 +01:00
Riteo
7e0f7d3abd Add Wayland support
Not everything is yet implemented, either for Godot or personal
limitations (I don't have all hardware in the world). A brief list of
the most important issues follows:

- Single-window only: the `DisplayServer` API doesn't expose enough
information for properly creating XDG shell windows.

- Very dumb rendering loop: this is very complicated, just know that
the low consumption mode is forced to 2000 Hz and some clever hacks are
in place to overcome a specific Wayland limitation. This will be
improved to the extent possible both downstream and upstream.

- Features to implement yet: IME, touch input, native file dialog,
drawing tablet (commented out due to a refactor), screen recording.

- Mouse passthrough can't be implement through a poly API, we need a
rect-based one.

- The cursor doesn't yet support fractional scaling.

- Auto scale is rounded up when using fractional scaling as we don't
have a per-window scale query API (basically we need
`DisplayServer::window_get_scale`).

- Building with `x11=no wayland=yes opengl=yes openxr=yes` fails.

This also adds a new project property and editor setting for selecting the
default DisplayServer to start, to allow this backend to start first in
exported projects (X11 is still the default for now). The editor setting
always overrides the project setting.

Special thanks to Drew Devault, toger5, Sebastian Krzyszkowiak, Leandro
Benedet Garcia, Subhransu, Yury Zhuravlev and Mara Huldra.
2024-01-30 16:44:47 +01:00
Rémi Verschelde
cd5e973d7a
Merge pull request #86717 from mrbbbaixue/d3d12-sdk-install-python
Add a python script to install Direct3D 12 SDK components.
2024-01-26 11:43:49 +01:00
Rémi Verschelde
35ef0b32b3
CI: Update mymindstorm/setup-emsdk to v14, should fix cache folder conflicts
https://github.com/mymindstorm/setup-emsdk/releases/tag/v14

Co-authored-by: Yuri Sizov <yuris@humnom.net>
2024-01-25 13:12:43 +01:00
MrBBBaiXue
ea2c6f1d0b Add a python script to install Direct3D 12 SDK components.
This makes it much faster to get started with Direct3D 12 builds,
as you only need to run `python .\misc\scripts\install_d3d12_sdk_windows.py`
then run `scons d3d12=yes`.

This installs DirectX Shader Compiler, Mesa NIR, WinPixEventRuntime
and DirectX 12 Agility SDK.

- Define a default path that uses the locations from the script.
- Now the default path is in "%LOCALAPPDATA%\Godot\build_deps\"
- Updated CI to use this new python script.

Co-Authored-By: Hugo Locurcio <hugo.locurcio@hugo.pro>
2024-01-24 20:11:43 +08:00
Adam Scott
bd70b8e1f6
Add THREADS_ENABLED macro in order to compile Godot to run on the main thread 2024-01-17 13:58:29 -05:00
Pedro J. Estébanez
2f47c57385 Add Direct3D 12 RenderingDevice implementation 2023-12-12 19:10:04 +01:00
Rémi Verschelde
ba713c80df
Fix various typos with codespell
Using 2.2.7.dev51+geb4a58fe.
2023-11-11 23:01:24 +01:00
Rémi Verschelde
51aff13ef4
CI: Pin Emscripten to 3.1.39
Due to #82865, newer versions can't be used for dlink-enabled Web builds.
This isn't a problem for CI which doesn't use dlink, but it's clearer for
users if our CI version matches the one we use for official builds.
2023-11-10 15:25:08 +01:00
Hugo Locurcio
dec26e15b3
Use colored output on CI for Doctest
GitHub Actions output is not considered a TTY, so colored output
must be forced.
2023-10-28 09:22:36 +02:00
Fredia Huya-Kouadio
56ce2d94c5 Bump the java version to version 17 2023-10-17 15:08:03 -07:00
Rémi Verschelde
261fef72ad
CI: Workaround recently broken add-apt-repository on GHA
Hopefully adding the sources manually still works.
2023-10-12 23:48:37 +02:00
Rémi Verschelde
303b54bcee
CI: Switch mesa PPA from kisak-mesa to turtle
May solve a weird name clash we seem to have on CI since yesterday.
2023-10-11 13:54:00 +02:00
Rémi Verschelde
b064008c07
Web: Workaround Emscripten 3.1.42+ LTO regression
Fixes #80010.
2023-09-05 14:58:52 +02:00
Rémi Verschelde
de14f1d295
CI: Bump version for actions/checkout@v4 and actions/setup-dotnet@v3 2023-09-04 16:05:57 +02:00
David Snopek
80126468fb Use godot-cpp 4.1 for the "Godot CPP" CI workflow to prevent circular dependency 2023-09-01 16:11:51 -05:00
Rémi Verschelde
5b5471e30a
Merge pull request #78908 from zorbathut/pr_gitignore
Add static check for overzealous .gitignores and fix an example of such.
2023-08-29 12:41:53 +02:00
Rémi Verschelde
5eb8253fc0
CI: Propagated error code when glue generation fails
This used to be ignored as we ran the X11 version with Vulkan software renderer and xvfb-run, which could crash at the time. Now that we have headless mode, this is not a problem anymore.
2023-08-21 13:21:19 +02:00
Yuri Sizov
16a93563bf
Merge pull request #73777 from myaaaaaaaaa/enable-tsan
Add a Linux ThreadSanitizer job to CI
2023-08-04 21:28:42 +02:00
Rémi Verschelde
a890457693
CI: Make extension API compatibility check mandatory
This means that any PR which breaks the extension API should
handle it properly, that is:

- Add compatibility methods to ensure that existing function hashes work
- Document the changes in the relevant misc/extension_api_validation/ file
2023-08-03 15:56:34 +02:00
Rémi Verschelde
4646762c81
CI: Allow skipping our GHA workflows with DISABLE_GODOT_CI variable
Useful for custom forks of Godot which don't want to run our CI for any
reason.

This is configured in `settings/variables/actions` for the repository,
setting it to any value aside from an empty string will skip all jobs.
2023-08-02 17:48:47 +02:00
Yuri Sizov
deb6025781 CI: Extract godot-cpp testing into its own job
This ensures that the godot-cpp job has plenty of resources
to run its build and avoid being affected by the main build.

Additionally:
- Extract test tasks into dedicated actions.
- Upload artifacts as early as possible.
- Ensure that we check master cache before random cache.
2023-08-01 20:41:45 +02:00
Rémi Verschelde
611123f7fd
CI: Free disk space on Linux runners
Removing the Android toolchain saves 14 GiB, which gives us more room
for growth and to avoid running into out-of-space errors in the Linux
sanitizers + debug symbols builds.

Related to #79919, though the caches were just one part of the problem,
the real issue is that our Linux sanitizers builds take 12 GiB, and
adding godot-cpp on top with 2 GiB leaves only a few GiB left for the
cache itself.
2023-08-01 14:29:20 +02:00
Hugo Locurcio
c16db0935f
Fix doc_status.py trying to get removed version tag from XML
This also runs `doc_status.py` on CI to catch potential future regressions.
2023-07-13 16:25:54 +02:00
Ben Rog-Wilhelm
7ea171adca Add static check for overzealous .gitignores. 2023-07-01 08:41:36 -05:00
myaaaaaaaaa
8b78ad5fc4 Add a Linux ThreadSanitizer job to CI 2023-06-26 11:47:42 -04:00
Rémi Verschelde
8c564cd974
CI: Use SCU build for Linux w/ sanitizers build
It's the slowest build so a speedup from SCU is welcome.
The other purpose of this change is to actually catch global scope
conflicts which would break the SCU build.

SCU builds have drawbacks as they won't fully validate that the
includes are correct, but we should have enough other builds in the CI
build matrix to catch this type of bug.
2023-06-20 13:15:34 +02:00
Rémi Verschelde
c9c941e339
CI: Update static checks to black 23.3.0
And apply it to the codebase, removing empty lines at the start of blocks.
2023-06-19 23:33:02 +02:00