From aa84b5ba581add84ce6e73b20ca0fbd04f6058c8 Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Thu, 18 Jan 2024 12:20:29 -0500 Subject: [PATCH] ci: stop hard coding number of jobs for make GitHub increased the number of CPUs in its GitHub-hosted runners from two to four for Linux and Windows. macOS remains at two CPUs. Stop hard-coding the number of CPUs when we build fio and detect the number at runtime. https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/ Signed-off-by: Vincent Fu --- ci/actions-build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/actions-build.sh b/ci/actions-build.sh index 31d3446c..47d4f044 100755 --- a/ci/actions-build.sh +++ b/ci/actions-build.sh @@ -61,7 +61,9 @@ main() { configure_flags+=(--extra-cflags="${extra_cflags}") ./configure "${configure_flags[@]}" - make -j 2 + make -j "$(nproc 2>/dev/null || sysctl -n hw.logicalcpu)" +# macOS does not have nproc, so we have to use sysctl to obtain the number of +# logical CPUs. } main -- 2.25.1