From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 484826ECE3; Tue, 5 Jul 2022 20:20:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 484826ECE3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1657041612; bh=uAx5ZF1AjFQcKqEL/4hNcF6IDPTNjpUR/y9BkVHwzI4=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=nzcx1PkIEZwwaccYE3CQ6FkaY2eBG43eJ5LJn8SJroU0/STbO3EQe62XyoEJ0RDrK Bqhh2f/emo3+hkvwbWJKctmK1z9L2OW+PkT/ASMRzrAxfaR23Pq2BRmyJxp8y1fUuG Lh1u0y2av01kxFvezy6srm9s2fKE8fEWtThq36qc= Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [217.69.128.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id A64B46ECE3 for ; Tue, 5 Jul 2022 20:20:10 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A64B46ECE3 Received: by smtp58.i.mail.ru with esmtpa (envelope-from ) id 1o8mDZ-0005ME-L3; Tue, 05 Jul 2022 20:20:10 +0300 Message-ID: <973f58ca-bcad-cc1b-7e8c-5536008d7fc1@tarantool.org> Date: Tue, 5 Jul 2022 20:20:08 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Content-Language: en-US To: Igor Munkin , Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org References: <024281fade12f71b734aece21637ea09c11bc759.1655911291.git.imun@tarantool.org> In-Reply-To: <024281fade12f71b734aece21637ea09c11bc759.1655911291.git.imun@tarantool.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD987C0EE6E7F0A597D9A8FCE36ECEFAFA081A4CA7ABD127360CD62213F67905E7AD39B6DA588DD84670668906BF45DE90929B77AAE8E4AF4A34787F701E02FBF3D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7387B291F9AC4D188EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006371777B963B59186248638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D81E972C3342E867F0E7B21E9FA4EC7C60117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC974A882099E279BDA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD182CC0D3CB04F14752D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE902A1BE408319B291B0CC92B5A49C88ED8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3CF7CD7A0D5AA5F25302FCEF25BFAB345C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F79006372A310894EFA5E9A9EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-8FC586DF: 6EFBBC1D9D64D975 X-C1DE0DAB: 9604B64F49C60606AD91A466A1DEF99B296C473AB1E142185AC9E3593CE4B31AB1881A6453793CE9274300E5CE05BD4401A9E91200F654B093C2772153FAB4E2699E857C12730288CE926C558BCB27C1F2A734B6EC4890259C2B6934AE262D3EE7EAB7254005DCED8DA55E71E02F9FC08E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34A246DFF68F0EE19E71222D927C1ECB706A4C6989AC95C1694496F10266ED0295F42BAA9AF93604761D7E09C32AA3244CA58FFCD4ABB23359ED49FA56A4093E446C24832127668422FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojDSjrPsecpvqhblJoo4aj7Q== X-Mailru-Sender: 49D287FBCBBF3A5CB7EAECBD1FD2625FDB07910F173366801D43A58B68B31DCDF7F5837242FA16B2EBA65886582A37BD66FEC6BF5C9C28D98A98C1125256619760D574B6FC815AB872D6B4FCE48DF648AE208404248635DF X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 1/3] ci: fix --parallel argument for MacOS runners X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Igor, I found that hw.ncpu sysctl setting is deprecated and it is recommended to use hw.logicalcpu, hw.logicalcpu_max, hw.physicalcpu, or hw.physicalcpu_max. I believe hw.logicalcpu is the best choice for our case. macOS manual pages are unavailable on apple.com [1], but there are other places: [2], [3], [4]. 1. https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/sysctlbyname.3.html 2. https://www.unix.com/man-page/mojave/3/sysctlbyname/ 3. Use of deprecated hw.ncpu https://github.com/ziglang/zig/issues/1252 4. sysctl name "hw.ncpu" (HW_NCPU) is deprecated in Mac OS X https://gitlab.haskell.org/ghc/ghc/-/issues/8594 Sergey 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 > --- > .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