From: Vincent Fu Date: Thu, 18 Jan 2024 17:20:29 +0000 (-0500) Subject: ci: stop hard coding number of jobs for make X-Git-Tag: fio-3.37~67 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=aa84b5ba581add84ce6e73b20ca0fbd04f6058c8;p=fio.git 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 --- 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