Skip to content
This repository was archived by the owner on May 23, 2021. It is now read-only.

Commit f36c08f

Browse files
committed
Statically set cores if on darwin
1 parent f1e3f42 commit f36c08f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cache:
88
directories:
99
- /home/travis/.ccache/
1010
- /home/travis/.centos-ccache/
11-
- /home/travis/.alpine-ccache
11+
- /home/travis/.alpine-ccache/
1212
before_install:
1313
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache; fi
1414
- export PATH="/usr/local/opt/ccache/libexec:$PATH"

scripts/node_build.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ export CC="ccache gcc"
77
export CXX="ccache g++"
88
export CCACHE_DIR="/ccache"
99
./configure --link-module './nbin.js' --link-module './lib/_third_party_main.js' --dest-cpu=x64 --openssl-no-asm
10-
cores=$(cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l)
10+
if [[ "$OSTYPE" == "darwin"* ]]; then
11+
cores="2"
12+
else
13+
cores=$(cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l)
14+
fi
1115
make -j$cores &>/dev/null &
1216
pid=$!
1317
(

0 commit comments

Comments
 (0)