Allow to limit number of cores used for compilation
Some checks failed
ci/woodpecker/push/build Pipeline failed
Some checks failed
ci/woodpecker/push/build Pipeline failed
This commit is contained in:
parent
ae00ff07a1
commit
bfa6974cfc
@ -2,4 +2,4 @@ pipeline:
|
|||||||
build:
|
build:
|
||||||
image: codingworkshop/oscw-runner:latest
|
image: codingworkshop/oscw-runner:latest
|
||||||
commands:
|
commands:
|
||||||
- ./build-linux.sh
|
- CORES=8 ./build-linux.sh
|
||||||
|
@ -508,9 +508,11 @@ xtchain_build()
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Check number of CPU cores available
|
# Check number of CPU cores available
|
||||||
|
if [[ ! -n ${CORES} ]]; then
|
||||||
: ${CORES:=$(sysctl -n hw.ncpu 2>/dev/null)}
|
: ${CORES:=$(sysctl -n hw.ncpu 2>/dev/null)}
|
||||||
: ${CORES:=$(nproc 2>/dev/null)}
|
: ${CORES:=$(nproc 2>/dev/null)}
|
||||||
: ${CORES:=1}
|
: ${CORES:=1}
|
||||||
|
fi
|
||||||
|
|
||||||
# Create working directories
|
# Create working directories
|
||||||
mkdir -p ${BINDIR}
|
mkdir -p ${BINDIR}
|
||||||
|
Loading…
Reference in New Issue
Block a user