Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(CI): Speed up cs:check with parallelism #46062

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Jun 24, 2024

Summary

Before:

$ composer run cs:check -- --using-cache no
> php-cs-fixer fix --dry-run --diff '--using-cache' 'no'
PHP CS Fixer 3.58.1 (8fdc3d5) 7th Gear by Fabien Potencier, Dariusz Ruminski and contributors.
PHP runtime: 8.1.29
Running analysis on 1 core sequentially.
You can enable parallel runner and speed up the analysis! Please see usage docs for more information.
Loaded config default from "…/server/.php-cs-fixer.dist.php".
 4376/4376 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%


Found 0 of 4376 files that can be fixed in 84.267 seconds, 70.00 MB memory used

After:

$ composer run cs:check -- --using-cache no
> php-cs-fixer fix --dry-run --diff '--using-cache' 'no'
PHP CS Fixer 3.58.1 (8fdc3d5) 7th Gear by Fabien Potencier, Dariusz Ruminski and contributors.
PHP runtime: 8.1.29
Running analysis on 8 cores with 10 files per process.
Parallel runner is an experimental feature and may be unstable, use it at your own risk. Feedback highly appreciated!
Loaded config default from "…/server/.php-cs-fixer.dist.php".
 4376/4376 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%


Found 0 of 4376 files that can be fixed in 20.878 seconds, 54.00 MB memory used

Checklist

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen added this to the Nextcloud 30 milestone Jun 24, 2024
@nickvergessen nickvergessen requested a review from a team June 24, 2024 08:41
@nickvergessen nickvergessen self-assigned this Jun 24, 2024
@nickvergessen nickvergessen requested review from ArtificialOwl, yemkareems and sorbaugh and removed request for a team June 24, 2024 08:41
@nickvergessen nickvergessen merged commit 8c944f4 into master Jun 24, 2024
165 checks passed
@nickvergessen nickvergessen deleted the ci/noid/parallel-cs-check branch June 24, 2024 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants