[Tarantool-patches] [PATCH luajit 1/3] ci: fix --parallel argument for MacOS runners
Igor Munkin
imun at tarantool.org
Wed Jun 22 18:33:12 MSK 2022
In scope of the commit 4195eb8f7e2abcf75f92eedd2859b7991cc8b363 ("ci:
make GitHub workflows more CMake-ish") --parallel value has been
explicitly set to $(nproc) + 1, since -j default behaviour differs for
Ninja and GnuMake. However, MacOS lacks nproc command, but CI silently
continues to execute pipeline.
This patch fixed MacOS-specific workflows changing nproc command with
sysctl -n hw.ncpu.
Signed-off-by: Igor Munkin <imun at tarantool.org>
---
.github/workflows/macos-m1.yml | 4 ++--
.github/workflows/macos-x86_64.yml | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/macos-m1.yml b/.github/workflows/macos-m1.yml
index 8387bbcf..d1d144f0 100644
--- a/.github/workflows/macos-m1.yml
+++ b/.github/workflows/macos-m1.yml
@@ -68,6 +68,6 @@ jobs:
- name: configure
run: ${ARCH} cmake . ${{ matrix.CMAKEFLAGS }} -DLUAJIT_ENABLE_GC64=${{ matrix.GC64 }}
- name: build
- run: ${ARCH} cmake --build . --parallel $(($(nproc) + 1))
+ run: ${ARCH} cmake --build . --parallel $(($(sysctl -n hw.ncpu) + 1))
- name: test
- run: ${ARCH} cmake --build . --parallel $(($(nproc) + 1)) --target test
+ run: ${ARCH} cmake --build . --parallel $(($(sysctl -n hw.ncpu) + 1)) --target test
diff --git a/.github/workflows/macos-x86_64.yml b/.github/workflows/macos-x86_64.yml
index 2ab2c8d0..a7c2f4e3 100644
--- a/.github/workflows/macos-x86_64.yml
+++ b/.github/workflows/macos-x86_64.yml
@@ -63,6 +63,6 @@ jobs:
- name: configure
run: cmake . ${{ matrix.CMAKEFLAGS }} -DLUAJIT_ENABLE_GC64=${{ matrix.GC64 }}
- name: build
- run: cmake --build . --parallel $(($(nproc) + 1))
+ run: cmake --build . --parallel $(($(sysctl -n hw.ncpu) + 1))
- name: test
- run: cmake --build . --parallel $(($(nproc) + 1)) --target test
+ run: cmake --build . --parallel $(($(sysctl -n hw.ncpu) + 1)) --target test
--
2.34.0
More information about the Tarantool-patches
mailing list