Commit graph

138 commits

Author SHA1 Message Date
Andrew Kaster
c62c10caf0 Meta+CI+Documentation: Bump host gcc requirement up to gcc 11
Bump macOS CI version to macOS 11 while we're here.
2022-01-07 11:02:30 +01:00
Brian Gianforcaro
c6c59653ce CI: Update the lint commits error message to be more user friendly
We often see PR's opened and then immediately closed because folks think
they did something bad, or don't know how to fix the situation. So lets
try to give them a few pointers.
2022-01-07 00:39:12 -08:00
Ben Wiederhake
7ba7668fbb Meta: Allow overlong 'fixup!' commit titles in pre-commit hook 2021-11-28 11:49:13 -08:00
Linus Groh
f538df7572 CI: Bump prettier to latest version (2.4.1)
We didn't initially upgrade because it started to (incorrectly) see
files as strict mode and chokes on things that then would be syntax
errors - but we're starting to fall behind a bit, so I'd rather put
these files on the ignore list instead.
2021-11-21 01:18:23 +00:00
thislooksfun
d2ef8b29e8 CI: Prevent false errors if a commit message contains CRLF
Previously if a commit message contained any carriage returns it would
correctly fail the 'contains CRLF line breaks' test, but it would also
report 'Commit message lines are too long' and 'Commit title ends in a
period', even if neither is true.
2021-11-19 22:30:11 +02:00
Ben Wiederhake
55e1edd51b Meta: Check auto-generated manpages for completeness on CI 2021-11-01 21:12:58 +01:00
Brian Gianforcaro
35617ba2d3 Meta: Suppress rule v1047 in PVS-Studio Static Analysis
This rule appears to produce a lot of noise, most of them look like
false positives (400+). Lets suppress for now to try to move the signal
to noise ratio higher for PVS-Studio.

Reference: https://pvs-studio.com/en/docs/warnings/v1047/
2021-10-31 00:19:33 +02:00
thislooksfun
7eaac7d2c1 CI: Notify Discord on all new PRs, even drafts 2021-10-29 22:37:48 +03:00
thislooksfun
7ee409ef98 CI: Rewrite the lintcommits workflow using an inline script
tim-actions/commit-message-checker-with-regex@v0.3.1 only uses the
keys 'sha' and 'commit.message'. Passing more information than that
is unnecessary and can lead to CI failures like this one:
https://github.com/SerenityOS/serenity/runs/4029269017?check_suite_focus=true#step:4:7

Instead of trying to pass data between workflow steps, we can instead
just do it all at once (plus this gives us more control over
formatting, which has also been improved).
2021-10-29 16:51:22 +03:00
Ben Wiederhake
8d13f6ddce Kernel+SystemServer: Change bootmode to system_mode
'bootmode' now only controls which set of services are started by
SystemServer, so it is more appropriate to rename it to system_mode, and
no longer validate it in the Kernel.
2021-10-25 23:38:28 +02:00
Ben Wiederhake
09432a8241 Kernel: Separate panic behavior from bootmode
Bootmode used to control panic behavior and SystemServer.
This patch factors panic behavior control into a separate flag.
2021-10-25 23:38:28 +02:00
Ben Wiederhake
542a88a7be Kernel: Separate framebuffers from bootmode
Bootmode used to control framebuffers, panic behavior, and SystemServer.
This patch factors framebuffer control into a separate flag.
Note that the combination 'bootmode=self-test fbdev=on' leads to
unexpected behavior, which can only be fixed in a later commit.
2021-10-25 23:38:28 +02:00
Ben Wiederhake
7e52b6fa24 man.serenityos.org: Simplify local builds
I simply extracted the script from .github/workflows/manpages.yml,
without significant modification.
2021-10-22 19:49:28 +03:00
Timothy Flynn
1e1cd07549 CI: Add a cache for the CLDR on the test262 runner 2021-10-21 17:41:13 +01:00
Timothy Flynn
cff39734f1 CI: Use correct CLDR cache path on GitHub Actions 2021-10-21 17:41:13 +01:00
Ben Wiederhake
ae9b52e387 Meta: Enable header checking in CI 2021-10-20 09:20:18 +01:00
Brian Gianforcaro
3b7d8ed6a5 Meta: Add actions work flow to run pvs-studio static analysis
Much like the sonar cloud workflow, this workflow runs pvs-studio
static analysis, and uploads the SARIF results to github. This
is the most "convenient" way to publish results, but unfortunately
users need write access to the repository to reach static analysis
results rendered in github.

As a work around folks can just look at the logs where issues are
printed during analysis, this works reasonably well.

In the future it might make sense to also render the results as HTML
and publish them using github page, much like we do with man pages.
I believe the pvs-studio plog-converter tool supports that as well.
https://pvs-studio.com/en/docs/manual/0036/
2021-10-05 20:07:04 +00:00
Brian Gianforcaro
dc99b702be Meta: Include source sha in sonarcloud analysis metadata
Having the version included in each analysis allows you to do more
filtering in the UI where results are viewed.
2021-10-02 18:16:15 +02:00
Brian Gianforcaro
ca7bb812f6 Meta: Explicitly disable caching in the Sonar Cloud workflow
Sonar Cloud raises a warning if this is not Explicitly enabled or
disabled, so lets mark it disabled to avoid that.
2021-09-28 10:58:09 +02:00
Brian Gianforcaro
0f76e6e149 Meta: Fix typo in release sonar-scanner version
The version is 4.6.2.2472, I had a typo when I committed the previous
change to update the version.
2021-09-26 21:29:39 +00:00
Brian Gianforcaro
0b9e633482 Meta: Upgrade sonar scanner to latest 4.6.2.2475 release
I didn't realize there was a new release, as it wasn't posted in the
Sonar Cloud Documentatoin, but was tagged on the github project page.

See: https://github.com/SonarSource/sonar-scanner-cli/releases
2021-09-23 20:37:37 +00:00
Brian Gianforcaro
925f21353e Meta: Exclude LibWasm Parser.cpp from Sonar Cloud Static Analysis
We need to exclude this file from analysis for now, as there is a bug in
the sonar-runner tool where it crashes when trying to understand the use
of AK::Variant in LibWasm/Parser/Parser.cpp

See #10122 for details + link to the bug report to Sonar Cloud.
2021-09-23 01:07:11 +02:00
Brian Gianforcaro
eddccf11da Meta: Remove unused caching from Sonar Cloud configuration
I was experimenting with using caching while doing the initial prototype
of the Sonar Cloud workflow. However the cache size for the static
analysis data ended up being large enough that it would put us over the
git hub actions limit. Given that we currently only run this pipeline
once a day, it seems reasonable to just remove caching.

If in the future we decide to run the pipeline on every PR, caching
would become crucial as the current un-cached analysis time is around
1 hour and 50 minutes. If we did this we would need to move the pipeline
to Azure DevOps where we have effectively infinite cache available.
2021-09-23 01:07:11 +02:00
Andrew Kaster
99b526731e CI: Add missing $ to Sonar Cloud build steps
Without the `$` GitHub Actions doesn't do the environment variable
replacement and CMake thinks we want a source directory of `./}}`
2021-09-17 11:03:27 +01:00
Andrew Kaster
454a839f49 CI+Meta: Update Sonar Cloud CI job for new SuperBuild configuration
This requires exposing the `configure` step on the `serenity`
ExternalProject in the SuperBuild CMakeLists so that we can continue to
only build the generated sources and not the entire OS.
2021-09-16 15:47:13 +00:00
Andrew Kaster
b5c98ede08 Meta: Switch to a SuperBuild that splits host and target builds
Replace the old logic where we would start with a host build, and swap
all the CMake compiler and target variables underneath it to trick
CMake into building for Serenity after we configured and built the Lagom
code generators.

The SuperBuild creates two ExternalProjects, one for Lagom and one for
Serenity. The Serenity project depends on the install stage for the
Lagom build. The SuperBuild also generates a CMakeToolchain file for the
Serenity build to use that replaces the old toolchain file that was only
used for Ports.

To ensure that code generators are rebuilt when core libraries such as
AK and LibCore are modified, developers will need to direct their manual
`ninja` invocations to the SuperBuild's binary directory instead of the
Serenity binary directory.

This commit includes warning coalescing and option style cleanup for the
affected CMakeLists in the Kernel, top level, and runtime support
libraries. A large part of the cleanup is replacing USE_CLANG_TOOLCHAIN
with the proper CMAKE_CXX_COMPILER_ID variable, which will no longer be
confused by a host clang compiler.
2021-09-15 19:04:52 +04:30
Rodolfo Olivieri
706323beb1 CI: Add statement to ensure workflow runs only on serenity
This statement ensures that the `Sonar Cloud Static Analysis` workflow
runs only for the official repository and not for the forks.
2021-09-10 01:20:39 +00:00
Idan Horowitz
24ed8511dd CI+Meta: Add Signed-off-by tag filter to the commit message linter 2021-09-07 20:46:34 +01:00
Brian Gianforcaro
d30be39215 Meta: Remove Coverity workflow until it's ready
This commit snuck into the tree via a PR for some sonar cloud fixes.
Some how I cross contaminated my branches.

Unfortunately the coverity workflow isn't ready for prime time yet,
so lets remove it until we have all the issues ironed out.
2021-09-03 19:01:10 +04:30
Brian Gianforcaro
2b13c9942d Meta: Fix toolchain caching for Sonar Cloud workflow
The matrix variables were left over from copy/pasting the contents
of the normal CI workflow. We also should always skip saving the
cache, as the normal CI pipeliens will refresh the toolchain and
we should just be reading the cache.
2021-09-03 11:46:15 +02:00
Brian Gianforcaro
a746d612ac Meta: Add github actions workflow to run coverity build analysis 2021-09-03 11:46:15 +02:00
Brian Gianforcaro
4c21aa2eed Meta: Remove sonar cloud worklow triggering for PRs
Sonar cloud detects PRs and fails the job at the very end, so there
isn't much use in including this testing feature.
2021-09-03 11:46:15 +02:00
Brian Gianforcaro
0da144322a Meta: Remove sonar cloud pipeline cache
The cache is saving, but by the time we run again, it looks like the
cache has been purged from other jobs consuming the cache.

This causes the cache to fail restore. Given we run nightly and there
is no time bound, we can just run without cache.
2021-09-03 11:46:15 +02:00
Brian Gianforcaro
3ad2b39eef Meta: Add sonar.python.version config to silence sonar cloud warning
All of our python scripts use python3
2021-09-03 11:46:15 +02:00
Brian Gianforcaro
beb8c48f26 Meta: Don't allow overlap in sonar cube file classification
Test files were getting analyzed twice, which the tool does
not like, and causes it to exit with a fatal error.

Also make the workflow run in PRs anytime the file is edited,
so that we can get immediate feedback without waiting till the
next day.
2021-08-31 12:41:18 +02:00
Brian Gianforcaro
51ea4d38d5 Meta: Fix yaml syntax of Sonar Cube Workflow
I fat fingered this last minute when converting from the trigger
I was using for development/testing to the cron schedule for use
in the main repo.
2021-08-30 20:13:53 +02:00
Brian Gianforcaro
ab07d8bbf0 Meta: Action workflow to build and upload results in sonar-cloud
This action executes once a day, the sonar cloud runner analyzes the
code and then uploads the results.

The current code base takes almost 3 hours of computer time to analyze.
The runner supports multi threaded executing and caching of results, so
we save that cache as part of the github action work flow to allow for
the analysis to skip unchanged files.
2021-08-30 16:44:16 +02:00
Andrew Kaster
e88761b2b9 Meta+LibUnicode: Move unicode_data helper to Meta/CMake
Moving this helper CMake file to the centralized Meta/CMake folder helps
to get a better grasp on what extra files are required for the build,
and what files are generated.

While we're at it, don't use add_compile_definitions for
ENABLE_UNICODE_DATA, which only needs to be seen by LibUnicode sources.
2021-08-28 08:44:17 +01:00
Timothy Flynn
9663525542 CI: Ensure unzip is installed on the builders
The CLDR database comes in a .zip file.
2021-08-26 23:40:23 +02:00
Timothy Flynn
e883792fd4 CI: Cache downloaded Unicode CLDR database 2021-08-26 22:04:09 +01:00
Idan Horowitz
d5ce24627e CI: Increase ccache size limit for serenity builds
Now that we only have 3 ccached builds on CI we can comfortably increase
the ccache size limit to get some free speed-up in CI.
2021-08-21 22:28:49 +01:00
Andrew Kaster
9bdb44c5d2 CI: Ensure relevant patch files are part of Toolchain cache hash
We were over-hashing for the GNU build on GitHub Actions by including
the LLVM patch as well. The GNU Toolchain doesn't care about our LLVM
patches.

For Azure, fix the inversion of the condition for which jobs check which
Build*.sh script, and add the Toolchain patch files to the cache
hash calculation.
2021-08-18 08:26:38 +02:00
Timothy Flynn
ef3ab8dd5f CI: Remove Lagom from GitHub Actions entirely
Fuzzing was the only Lagom build left.
2021-08-17 21:06:15 +01:00
Timothy Flynn
86069fa28d CI: Remove nightly Clang toolchain GitHub Action 2021-08-17 13:31:43 +01:00
Timothy Flynn
7d23d9d557 CI: Remove NO_FUZZ Lagom builds from GitHub Actions 2021-08-16 18:04:33 +01:00
Idan Horowitz
6602ab27e1 CI: Disable variable substitution on input to the twitter script
This prevents command injection through backticks in commit messages.
2021-08-15 23:21:20 +04:30
Idan Horowitz
151c940827 CI: Remove leftover ccache step and fix a broken link in the clang build 2021-08-09 09:03:31 +02:00
Idan Horowitz
bac3c2cf6d CI: Split off clang toolchain builds from normal CI and schedule them
Clang builds will no longer be apart of the automated CI for every Push/
Pull Request, and will instead be ran at 00:00 UTC every day, with the
results posted to the discord #clang-toolchain channel.
2021-08-08 22:31:35 +02:00
Daniel Bertalan
e04d20ec20 CI: Try building Serenity with Clang 2021-08-08 10:55:36 +02:00
Andrew Kaster
c4604bc080 CI: Don't build libjs for Lagom twice
We need test-js for the parser tests for test262, but we don't need to
rebuild all of Lagom twice. This was missed when we did the initial
change to shared libraries. Before #9017, the Lagom build for test-js
is what built libLagom.a for the libjs-test262-runner to link against.

Now that we are building libjs.so and its dependencies in the runner's
build directory, we should build test-js there as well.

Requires linusg/libjs-test262#32 in order to properly find the built
test-js.
2021-08-07 16:34:06 +01:00