[Tarantool-patches] [PATCH luajit 1/3] ci: fix --parallel argument for MacOS runners

Sergey Bronnikov sergeyb at tarantool.org
Fri Jul 1 16:12:05 MSK 2022


LGTM, thanks.

On 22.06.2022 18:33, Igor Munkin wrote:
> 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


More information about the Tarantool-patches mailing list