Parallelize build jobs according to CPU count

This commit is contained in:
Rangi
2026-07-05 20:58:50 -04:00
committed by Rangi
parent 5d5000011a
commit 189c679e13
9 changed files with 99 additions and 44 deletions
+7 -1
View File
@@ -16,6 +16,7 @@ Options:
--only-internal only run tests that build local examples
--only-external only run tests that build external codebases
--only-free skip tests that build nonfree codebases
--jobs <n> build external codebases with `make -j<n>`
--os <os> skip tests known to fail on <os> (e.g. `macos-14`)
--installed-rgbds use the system installed RGBDS
(only compatible with external codebases)
@@ -28,6 +29,7 @@ nonfree=true
internal=true
external=true
installedrgbds=false
make_jobs=
osname=
while [[ $# -gt 0 ]]; do
case "$1" in
@@ -47,6 +49,10 @@ while [[ $# -gt 0 ]]; do
--installed-rgbds)
installedrgbds=true
;;
--jobs)
shift
make_jobs="-j$1"
;;
--os)
shift
osname="$1"
@@ -122,6 +128,6 @@ for cfg in *.cfg; do (
# Run nonfree tests only if they are opted into.
if ! "$EXT_TEST_IS_NONFREE" || "$nonfree"; then
./test.sh "$test_name"
./test.sh "$test_name" "$make_jobs"
fi
); done