Skip to content

Commit

Permalink
Merge pull request #10315 from 9999years/validate-jobs-nproc
Browse files Browse the repository at this point in the history
validate.sh: `--jobs` should default to `nproc`
  • Loading branch information
mergify[bot] authored Sep 8, 2024
2 parents db167ca + 00c9b65 commit 437bf5a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See https://github.com/haskell/cabal/issues/8049
HC=ghc
CABAL=cabal
JOBS=4
JOBS=""
LIBTESTS=true
CLITESTS=true
CABALSUITETESTS=true
Expand Down Expand Up @@ -293,6 +293,15 @@ fi
# Adjust runtime configuration
#######################################################################

if [ -z "$JOBS" ]; then
if command -v nproc >/dev/null; then
JOBS=$(nproc)
else
echo "Warning: \`nproc\` not found, setting \`--jobs\` to default of 4."
JOBS=4
fi
fi

TESTSUITEJOBS="-j$JOBS"
JOBS="-j$JOBS"

Expand Down

0 comments on commit 437bf5a

Please sign in to comment.