Skip to content

Commit 75888f2

Browse files
committed
ci: don't use ninja on macOS
Ninja is not installed by default on the macOS machines; stop trying to use it. Instead use `make -j` which should be roughly equivalent in performance but supported everywhere.
1 parent 674875d commit 75888f2

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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

.github/workflows/nightly.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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

ci/build.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ if [ -f "/etc/debian_version" ]; then
3333
(source /etc/lsb-release && echo "${DISTRIB_DESCRIPTION}") | indent
3434
fi
3535

36+
CORES=$(getconf _NPROCESSORS_ONLN || true)
37+
echo "Number of cores: ${CORES:-(Unknown)}"
38+
3639
echo "Kernel version:"
3740
uname -a 2>&1 | indent
3841

@@ -64,4 +67,12 @@ echo "##########################################################################
6467
echo "## Building libgit2"
6568
echo "##############################################################################"
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[@]}"

0 commit comments

Comments
 (0)