File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,6 @@ jobs:
153153 env :
154154 CC : clang
155155 CMAKE_OPTIONS : -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON
156- CMAKE_GENERATOR : Ninja
157156 PKG_CONFIG_PATH : /usr/local/opt/openssl/lib/pkgconfig
158157 SKIP_SSH_TESTS : true
159158 SKIP_NEGOTIATE_TESTS : true
Original file line number Diff line number Diff line change @@ -112,7 +112,6 @@ jobs:
112112 env :
113113 CC : clang
114114 CMAKE_OPTIONS : -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON
115- CMAKE_GENERATOR : Ninja
116115 PKG_CONFIG_PATH : /usr/local/opt/openssl/lib/pkgconfig
117116 SKIP_SSH_TESTS : true
118117 SKIP_NEGOTIATE_TESTS : true
Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ if [ -f "/etc/debian_version" ]; then
3333 (source /etc/lsb-release && echo " ${DISTRIB_DESCRIPTION} " ) | indent
3434fi
3535
36+ CORES=$( getconf _NPROCESSORS_ONLN || true)
37+ echo " Number of cores: ${CORES:- (Unknown)} "
38+
3639echo " Kernel version:"
3740uname -a 2>&1 | indent
3841
@@ -64,4 +67,12 @@ echo "##########################################################################
6467echo " ## Building libgit2"
6568echo " ##############################################################################"
6669
67- env PATH=" ${BUILD_PATH} " " ${CMAKE} " --build .
70+ # Determine parallelism; newer cmake supports `--build --parallel` but
71+ # we cannot yet rely on that.
72+ if [ " ${CMAKE_GENERATOR} " = " Unix Makefiles" -a " ${CORES} " != " " ]; then
73+ BUILDER=(make -j ${CORES} )
74+ else
75+ BUILDER=(" ${CMAKE} " --build .)
76+ fi
77+
78+ env PATH=" ${BUILD_PATH} " " ${BUILDER[@]} "
You can’t perform that action at this time.
0 commit comments