diff options
author | Vincent Fu <vincent.fu@samsung.com> | 2024-01-18 12:20:29 -0500 |
---|---|---|
committer | Vincent Fu <vincent.fu@samsung.com> | 2024-01-18 13:00:31 -0500 |
commit | aa84b5ba581add84ce6e73b20ca0fbd04f6058c8 (patch) | |
tree | bbfb373dee180eef32b411b9f8f1347940015f3f | |
parent | 9eefdcc1dd820a936684168468fa9c81960ea461 (diff) | |
download | fio-aa84b5ba581add84ce6e73b20ca0fbd04f6058c8.tar.gz |
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 <vincent.fu@samsung.com>
-rwxr-xr-x | ci/actions-build.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ci/actions-build.sh b/ci/actions-build.sh index 31d3446c0..47d4f044e 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 |