Commit graph

45 commits

Author SHA1 Message Date
Rémi Verschelde
c7a5ce656c
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.
2023-05-10 09:44:44 +02:00
Rémi Verschelde
b3bb92ae5e
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.
2023-05-08 15:36:17 +02:00
Rémi Verschelde
b226f7e587
CI: Make codespell checks blocking, but only check changed files 2023-05-08 11:50:55 +02:00
Yuri Sizov
3ae282b452 Create an "Editor-only" section in the online class reference
This helps to find such classes without digging
through the rest of the class reference.
Editor-only classes can still be found under
your normal "Node" and "Resource" types.

This also fixes a typo and a missed case from the recent platform docs PR.
2023-04-24 21:06:55 +02:00
Rémi Verschelde
39d24ee80b
CI: Fix checks fallback logic when changed files listing is missing
The file would be one byte (newline) so the check with '-s' failed.
2023-04-20 18:22:48 +02:00
Rémi Verschelde
9063e907a7
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.
2023-04-20 17:51:53 +02:00
Rémi Verschelde
5e7b6cd75a
Merge pull request #76263 from akien-mga/ci-gotta-go-fast-with-style
CI: Speed up static checks by checking only changed files
2023-04-20 12:44:06 +02:00
Rémi Verschelde
068f893072
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.
2023-04-20 11:40:09 +02:00
bruvzg
a5128e71bb
[Export docs] Move docs to platform folders. 2023-04-20 11:02:12 +03:00
Rémi Verschelde
266280ffca
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.
2023-04-05 18:31:46 +02:00
yedpodtrzitko
93b7bcb33d ci: wait for static check results before starting builds 2023-04-04 22:05:15 +07: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
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
Jiri Suchan
c5bd2f9dce ci: add Python static analysis check via mypy 2022-09-30 19:03:17 +07: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
d20b32186f [Web] Rename JavaScript platform to Web.
Also rename export name from "HTML5" to "Web".
2022-08-29 11:52:00 +02:00
Raul Santos
ea6b8ecb6f
Add dotnet format to CI to check C# style 2022-08-27 10:11:35 +02:00
Rémi Verschelde
ef28da8006 CI: Bump various GitHub actions to latest versions
actions/cache@v3
actions/checkout@v3
actions/upload-artifact@v3
actions/setup-dotnet@v2
actions/setup-java@v3
actions/setup-python@v4
mymindstorm/setup-emsdk@v11

Also reset cache keys as we're going to cleanup all caches.
2022-08-25 13:44:22 +02:00
Jiri Suchan
388d35b74d ci: add basic test pipeline for shader builders 2022-08-19 20:32:13 +09:00
Jiri Suchan
b04593c22b ci: move slowest static job to the end of pipeline 2022-08-19 20:32:13 +09: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
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
77843355a0 CI: Update black formatter and apply changes 2022-04-05 17:43:12 +02: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
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
Max Hilbrunner
5139a19877 Fix CI after concurrency 2021-08-25 15:04:05 +02:00
Max Hilbrunner
40bb1ded7e CI: Cancel previous builds if new commit is pushed 2021-08-25 14:54:48 +02:00
Fabio Alessandrelli
472482013e [HTML5] Add jsdoc2rst tool.
A template for `jsdoc` that generat the HTML5 public classref.

The script can be run via `npm run docs` to print to stdout.

You can dry run via `npm run docs -- --d dry-run` or write to file via
`npm run docs -- -d /path/to/file.rst`

Also update Makefile in `doc/` and add dry run test to CI.
2021-02-26 11:33:59 +01:00
Rémi Verschelde
af878716f2
CI: Update to clang-format 11 and apply ternary operator changes 2021-01-12 19:32:53 +01:00
Fabio Alessandrelli
c38984d286 [HTML5] Enforce JavaScript style with eslint.
Applies to javascript files inside the platform library folder, the
exposed Engine code, and any javascript files in modules.

Files ending with ".externs.js" will be ignored, you can create a
".eslintignore" file to specify extra files to be ignored.
2020-11-23 12:15:18 +01:00
Rémi Verschelde
41c735fe50
Style: Fix black formatting after #42332
Somehow it did not run CI checks so we missed that one.

Also pin `black` version to latest upstream release.
2020-09-25 15:49:37 +02:00
Hugo Locurcio
82b30f36cb
GitHub Actions: Prepend emoji to platform names for easy visual grepping 2020-08-23 15:13:36 +02:00
Rémi Verschelde
cf2e0116d9 CI: Properly exclude Azure repositories on Ubuntu
Nuke all the pre-defined repos, we just need stock Ubuntu.
2020-08-11 17:14:47 +02:00
Rémi Verschelde
f940e5e000 CI: Install master version of psf/black
Until https://github.com/psf/black/pull/1328 makes it in a stable release,
we have to use the latest from Git.

Apply new style fixes done by latest black.
2020-07-26 19:48:25 +02:00
Aaron Franke
e5df1362df
Split CI builds into workflows for each OS 2020-07-21 15:12:16 -04:00
Gordon MacPherson
7bbae98094 added MacOS and Linux to GitHub Actions 2020-07-15 13:42:54 +01:00
Aaron Franke
61c9f11434
Globally install Python libraries in GitHub Actions
Otherwise it uses ~/.local/bin which GitHub doesn't include in PATH
2020-07-14 04:29:03 -04:00
Aaron Franke
79a2e4c1ab
Add static formatting checks for GitHub Actions 2020-07-13 14:06:13 -04:00