Commit Graph

197 Commits

Author SHA1 Message Date
Rémi Verschelde 3d94d7436a
CI: Pin Xcode version to 15.3, as default 15.0.1 is broken
Not needed in later Godot branches as we merged workarounds for the 15.0/15.0.1
broken linker, but there's too many commits to track down and backport with
care to avoid breaking Xcode 14 support too.
2024-04-25 16:40:38 +02:00
A Thousand Ships 1d979a9e95
[CI] [macOS] Build for both `arm64` and `x86_64`
Creates a universal build, to catch discrepancies on different
architectures

(cherry picked from commit 24ad73b13f)
2024-04-25 14:43:28 +02:00
Yuri Sizov e6a21778de 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.

(cherry picked from commit deb6025781)
2023-08-02 14:51:12 +02:00
Rémi Verschelde 1fe01a7741 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.

(cherry picked from commit 611123f7fd)
2023-08-02 14:51:12 +02:00
Yuri Sizov 0164b293f0 Update codespell and add new exceptions 2023-06-29 16:22:29 +02:00
MJacred 101adc3853 Make system information for issue reports single-line
Additionally:
* for custom builds, add commit hash
* added a tooltip to help mitigate potential/understandable confusion whether the single-line output might be a bug
* prettify driver name

(cherry picked from commit ca1ee316b5)
2023-06-29 16:03:22 +02:00
MJacred 78773b74f0 Copy system info to clipboard + Update bug_report.yml
plus minor static-related fixes
* linuxbsd: get_systemd_os_release_info_value() -> static breaks usage if used multiple times
* windows/linuxbsd: get_video_adapter_driver_info() writes info into static
* linuxbsd: get_distribution_name() + get_version() -> write bsd fallback into static variable
* windows/uwp/android: remove unnecessary use of static

(cherry picked from commit 9e5bf3d589)
2023-06-29 16:03:22 +02:00
Jason Yundt 07c4a32a84 Streamline and centralize bug reporting guides
Before this change, there was three different bug reporting guides:

- [“Filing an issue on GitHub”][1]
- [“Reporting bugs”][2]
- [The issue template][3]

This commit:

1. makes sure that [the issue template][3] contains all of the same
   information that [“Filing an issue on GitHub”][1] and
   [“Reporting bugs”][2] did and
2. makes [“Reporting bugs”][2] simply tell users to fill out the
   template.

The goal of this change is to make reporting bugs easier. This change
accomplishes that goal by presenting bug reporters with all of the
information they need to know on the bug reporting page itself.

This commit partially implements this proposal:
<https://github.com/godotengine/godot-proposals/discussions/4083>

[1]: https://docs.godotengine.org/en/stable/community/contributing/ways_to_contribute.html#filing-an-issue-on-github
[2]: ./CONTRIBUTING.md#reporting-bugs
[3]: ./.github/ISSUE_TEMPLATE/bug_report.yml

(cherry picked from commit a6dc35e5cf)
2023-06-29 16:03:22 +02:00
RedworkDE 4cabfc1756 CI: Fix running the unit tests on windows
(cherry picked from commit adbb323163)
2023-06-16 20:55:23 +02:00
Rémi Verschelde 2a5d5ef1f9 CI: Change GODOT_BASE_BRANCH to 4.0, checkout that branch for godot-cpp 2023-05-18 17:44:31 +02:00
Rémi Verschelde 4d7336e70f
CI: Skip codespell check if `CHANGED_FILES` is empty
This can happen when only thirdparty files are changed, since we grep them out.
Re-add `bin` and `thirdparty` to the skip list for good measure.

(cherry picked from commit c7a5ce656c)
2023-05-12 13:56:49 +02:00
Rémi Verschelde 9deaac5c60
CI: Use gh-cli for changed files, and workaround codespell skip list bug
For PRs, this should give a more accurate list, as the previous method would
diff to the tip of the `master` branch, which could include new commits (and
thus changed files) not present in the PR branch.

codespell's `--skip` option doesn't work at all with folders when used
together with an explicit list of paths to work with, so let's not use it.

(cherry picked from commit b3bb92ae5e)
2023-05-12 13:56:49 +02:00
Rémi Verschelde 47b3f95874
CI: Make codespell checks blocking, but only check changed files
(cherry picked from commit b226f7e587)
2023-05-12 13:56:49 +02:00
Rémi Verschelde c893968b33 CI: Fix checks fallback logic when changed files listing is missing
The file would be one byte (newline) so the check with '-s' failed.

(cherry picked from commit 39d24ee80b)
2023-04-26 14:18:39 +02:00
Rémi Verschelde 82a17d028d CI: Fixup failure to get changed files on merge
The checkout might be too shallow so the before commit isn't available.
The logic was already written to take this into account (it then generates
an empty 'changed.txt' which falls back to testing everything), but the
error code would still force terminate the job.

Hopefully we can find a way to make the logic work for merge events too in
the future, but for now this is a quick fix.

(cherry picked from commit 9063e907a7)
2023-04-26 14:18:38 +02:00
Rémi Verschelde f241b17804 CI: Speed up static checks by checking only changed files
- file_format, header_guards and clang-format benefit from this short list.
- dotnet-format, Python and JS checks don't, but they're only relevant for
  PRs changing a specific set of files, so we skip them when those files
  aren't modified.

The logic to get changed files only works reliably for:
- Pull request events
- Non-force pushed push events

So when force pushing a branch in your fork, or creating a new branch,
it will still scan all files as fallback.

Upgraded CI runner to Ubuntu 22.04 so we get clang-format 14 out of the box,
so we don't need to install a custom version (saves ~15 s). We also cache
the APT dependencies to speed up the build and avoid flaky Ubuntu/Microsoft
repos.

(cherry picked from commit 068f893072)
2023-04-26 14:18:38 +02:00
umarcor a99b046412 [ci/windows] remove obsolete 'tools' in the name
(cherry picked from commit 2abadbb58b)
2023-04-07 17:44:39 +02:00
Rémi Verschelde 2805f7b36d CI: Visibly print trailing whitespace when static checks fail
GitHub Actions seems to be hiding colored whitespace, and after lots of
attempts I couldn't find a way to work it around.

So instead I'm using a perl expression to replace trailing spaces with
`·` and tabs with `<TAB>` in the ANSI colored diff output. This ensure
that they're visible, and they are properly colored as expected too.

(cherry picked from commit 266280ffca)
2023-04-07 17:44:39 +02:00
yedpodtrzitko eab0386934 ci: wait for static check results before starting builds
(cherry picked from commit 93b7bcb33d)
2023-04-07 17:44:38 +02:00
Unai Martinez-Corral a08bee8d10 [ci/web] update mymindstorm/setup-emsdk to v12
(cherry picked from commit dcb974700b)
2023-03-27 17:59:08 +02:00
Rémi Verschelde 47114a77f8
CI: Pin SCons to 4.4.0, the new 4.5.0 is broken
(cherry picked from commit 85bb561713)
2023-03-06 10:08:43 +01:00
Rémi Verschelde 17da86eb7b
CI: Disable debug_symbols for Linux + all sanitizers build
We're running out of disk space so builds are failing...
2023-02-18 23:41:44 +01:00
Rémi Verschelde 57d0afb365
CI: Remove flaky packages.microsoft.com Ubuntu repository
We don't need it.
2023-02-11 17:05:05 +01:00
Rémi Verschelde da124e9d04
CI: Remove custom Linux deps and SwiftShader
The default environment already includes everything we need to build
all our configurations.

Remove custom SwiftShader setup as lavapipe should now be good enough,
but we need to install the latest one.
2023-02-06 18:21:15 +01:00
Rémi Verschelde 435bf4e030
CI: Add official codespell action with PR annotations 2023-02-01 12:11:36 +01:00
bruvzg 8cb7bd5230
[CI] Remove packages that are no longer necessary. 2023-01-25 10:55:34 +02:00
bruvzg daad4aed62
Cleanup and unify keyboard input.
- Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes.
- Unify IME behaviour, add inline composition string display on Windows and X11.
- Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events.
- Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS.
- Add support for media key handling on macOS.

Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-01-23 15:08:12 +02:00
Aaron Franke 06450bfb0f
Fix file formatting script dependencies and cleanup 2023-01-12 16:25:21 -06:00
Rémi Verschelde 02a1a335f7
CI: Use clang-format 15
No change compared to version 13 in our codebase.
2023-01-10 18:18:57 +01:00
Rémi Verschelde de5aaf1d13
CI: Fix dumping GDExtension interface and API for godot-cpp
Follow-up to https://github.com/godotengine/godot-cpp/pull/960.

Fix exit code for --dump-extension-api and --dump-gdextension-interface.

Removed the planned API validation step as we still didn't implement
anything, and maintaining a stub isn't useful.
2022-12-14 16:42:14 +01:00
Rémi Verschelde f1edd03d4c
Merge pull request #69718 from groud/finally_rename_gdnative_to_gdextension
Rename all gdnative occurences to gdextension
2022-12-12 11:43:59 +01:00
Gilles Roudière be1c9d677d Rename all gdnative occurences to gdextension
Non-exhaustive list of case-sensitive renames:

GDExtension -> GDNative
GDNATIVE -> GDEXTENSION
gdextension -> gdnative
ExtensionExtension ->Extension (for where there was GDNativeExtension)
EXTENSION_EXTENSION ->EXTENSION (for where there was GDNATIVE_EXTENSION)
gdnlib -> gdextension
gdn_interface -> gde_interface
gdni -> gde_interface
2022-12-12 11:04:57 +01:00
Hugo Locurcio 063637ec77
Rename `float=64` SCons option to `precision=double`
This avoids confusion with the old `bits=64` option and building
for 64-bit CPUs in general.
2022-12-10 16:43:45 +01:00
Hugo Locurcio e032152494
Emphasize the importance of uploading a minimal reproduction project
The field is now required, but "N/A" can be manually entered if
the reproduction steps are trivial and don't require any project
files to be followed.
2022-11-17 21:46:41 +01:00
Rémi Verschelde ee43b7da28
Merge pull request #68543 from DarkKilauea/msvc-problem-matcher 2022-11-11 22:57:01 +01:00
Josh Jones ed2c1d1c51 Add MSVC problem matcher to CI 2022-11-11 13:23:59 -08:00
Raul Santos d3641c9d0d
Add GCC problem matcher to CI 2022-11-11 19:41:36 +01:00
kobewi 246c39a2e7 Mention .godot folder in issue template 2022-11-11 15:36:19 +01:00
clayjohn 8345ef8579 Add rendering team as GLES3 CODEOWNER 2022-11-02 10:42:57 -07:00
bruvzg 0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
TechnoPorg f124616a5f Various enhancements to Visual Studio solution generation.
This adds support for building solutions with dev_mode and/or float=64 enabled.
Additionally, it adds solution generation to the Windows CI to catch future regressions.
2022-10-04 19:10:02 -06:00
Rémi Verschelde 0056acf46f CI: Update target for godot-cpp after https://github.com/godotengine/godot-cpp/pull/867 2022-10-04 16:51:58 +02:00
Aaron Franke 267d267f3d
Fix CODEOWNERS and fix missing quote in "Building for platform" message 2022-10-01 01:57:50 -05:00
Jiri Suchan c5bd2f9dce ci: add Python static analysis check via mypy 2022-09-30 19:03:17 +07:00
Rémi Verschelde 39facb35a0 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-26 16:31:46 +02:00
RedMser 5c5c3ab90e Further cleanup of VisualScript references 2022-09-19 21:37:26 +02:00
Rémi Verschelde b353336037 CI: Downgrade Emscripten to 3.1.18
Emscripten 3.1.19 and 3.1.20 have a showstopping regression that breaks
calling our main function for the editor build.
2022-09-09 14:02:16 +02:00
Gergely Kis 20bf72751c Fix UTF-8 validation in static checks
Use isutf8 instead of recode to detect invalid UTF-8 sequences.

Also add the necessary dependencies to run the static checks locally
using act (https://github.com/nektos/act) with the Medium size image.
2022-09-05 13:18:27 +02:00
Fabio Alessandrelli f958f00283 [Web] Require threads, rtti, allow optimize=speed.
Update export names (web[_dlink]_[release|debug].zip).

The Build with dynamic linking is broken due to high number of imports
in output wasm (likely emscripten regression issue 15487).
2022-08-30 20:01:19 +02:00
Fabio Alessandrelli d20b32186f [Web] Rename JavaScript platform to Web.
Also rename export name from "HTML5" to "Web".
2022-08-29 11:52:00 +02:00