-
Notifications
You must be signed in to change notification settings - Fork 70
ci(lint): Use multi file argument in lint #2259
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Joas Schilling <coding@schilljs.com>
bd3189a to
2bdf918
Compare
|
Switching to |
| "@lint-8.2-or-earlier", | ||
| "@lint-8.3-or-later" | ||
| ], | ||
| "lint-8.2-or-earlier": "[ $(php -r \"echo PHP_VERSION_ID;\") -ge 80300 ] || git ls-files | grep '.php$' | xargs php -l", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "lint-8.2-or-earlier": "[ $(php -r \"echo PHP_VERSION_ID;\") -ge 80300 ] || git ls-files | grep '.php$' | xargs php -l", | |
| "lint-8.2-or-earlier": "[ $(php -r \"echo PHP_VERSION_ID;\") -ge 80300 ] || git ls-files | grep '.php$' | xargs -P$(nproc) php -l", |
We can try something like this to run several processes at the same time (one per core)
|
For the if [[ $(php -r 'echo PHP_VERSION_ID;') -gt 80300 ]]; then
git ls-files '*.php' '**/*.php' | xargs -n100 -P$(nproc) -- php -l;
else
git ls-files '*.php' '**/*.php' | xargs -n1 -P$(nproc) -- php -l;
fiUse n=1 for PHP < 8.3, 100 or more for PHP >= 8.3 |
|
Local notes before I loose them: |
Comparison
mtdowling/jmespath.phpwhich is actually not a file8.3: 3m36s
8.4: 3m16s
8.5: 3m42s
https://github.com/nextcloud/3rdparty/actions/runs/20912296381
8.3: 2s
8.4: 1s
8.5: 3s
https://github.com/nextcloud/3rdparty/actions/runs/21028170705?pr=2259
Will prepare the same for server later