scripts: Speed up uncrustify by running 4 jobs in parallel
There are some large files, and in most setups (including CI runners) we have multiple cores available. Use xargs to run multiple parallel uncrustify jobs rather than one large one. Just hardcode 4 jobs and 4 files at the same time for now.
This commit is contained in:
parent
0ee274946d
commit
e8f9cc1fce
1 changed files with 5 additions and 2 deletions
|
@ -12,8 +12,11 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
ARGS=4
|
||||||
|
JOBS=4
|
||||||
|
|
||||||
pushd "$SRCROOT"
|
pushd "$SRCROOT"
|
||||||
uncrustify -c "$CFG" $OPTS `git ls-tree --name-only -r HEAD | grep -E '.*\.[ch]$' | grep -v nbis | grep -v fpi-byte | grep -v build/`
|
git ls-tree --name-only -r HEAD | grep -E '.*\.[ch]$' | grep -v nbis | grep -v fpi-byte | grep -v build/ | xargs -n$ARGS -P $JOBS uncrustify -c "$CFG" $OPTS
|
||||||
RES=$?
|
RES=$?
|
||||||
popd
|
popd
|
||||||
exit $RES
|
exit $RES
|
Loading…
Reference in a new issue