Skip to content

Commit

Permalink
use parallel processes in ci specific astyle calls (CleverRaven#62680)
Browse files Browse the repository at this point in the history
usually half astyle's execution time for the astyle ci test and also the
pr code reviewer

total execution time is like 11 secs, still in the case of the code
reviewer I'll take any time improvements

use xargs' `-P` option
```
  -P, --max-procs=MAX-PROCS    run at most MAX-PROCS processes at a time
```

Co-authored-by: casswedson <[email protected]>
  • Loading branch information
casswedson and casswedson authored Dec 11, 2022
1 parent 2150a13 commit 047902f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ $(ODIR)/.astyle-check-stamp: $(ASTYLE_SOURCES)
endif

astyle-fast: $(ASTYLE_SOURCES)
$(ASTYLE_BINARY) --options=.astylerc -n $(ASTYLE_SOURCES)
echo $(ASTYLE_SOURCES) | xargs -P 0 -L 1 $(ASTYLE_BINARY) --quiet --options=.astylerc -n

astyle-diff: $(ASTYLE_SOURCES)
$(ASTYLE_BINARY) --options=.astylerc -n $$(git diff --name-only src/*.h src/*.cpp tests/*.h tests/*.cpp)
Expand Down

0 comments on commit 047902f

Please sign in to comment.