Add script to determine proc count in CI
This commit is contained in:
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
@@ -119,23 +119,7 @@ jobs:
|
||||
run: |
|
||||
echo LD_LIBRARY_PATH=`pwd`/lib >> $GITHUB_ENV
|
||||
|
||||
case `uname` in
|
||||
Linux)
|
||||
wxPROC_COUNT=`nproc`
|
||||
;;
|
||||
|
||||
Darwin)
|
||||
wxPROC_COUNT=`sysctl -n hw.ncpu`
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "*** Unknown platform: `uname` ***"
|
||||
wxPROC_COUNT=0
|
||||
;;
|
||||
esac
|
||||
|
||||
((wxPROC_COUNT++))
|
||||
echo wxPROC_COUNT=$wxPROC_COUNT >> $GITHUB_ENV
|
||||
wxPROC_COUNT=`./build/tools/proc_count.sh`
|
||||
echo wxBUILD_ARGS=-j$wxPROC_COUNT >> $GITHUB_ENV
|
||||
|
||||
# Setting this variable suppresses "Error retrieving accessibility bus address"
|
||||
|
18
build/tools/proc_count.sh
Executable file
18
build/tools/proc_count.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
# This script outputs the number of available processors/cores plus one.
|
||||
|
||||
case `uname` in
|
||||
Linux)
|
||||
wxPROC_COUNT=`nproc`
|
||||
;;
|
||||
|
||||
Darwin)
|
||||
wxPROC_COUNT=`sysctl -n hw.ncpu`
|
||||
;;
|
||||
|
||||
*)
|
||||
wxPROC_COUNT=0
|
||||
;;
|
||||
esac
|
||||
|
||||
((wxPROC_COUNT++))
|
||||
echo $wxPROC_COUNT
|
Reference in New Issue
Block a user