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 EEEAC6EFDA; Thu, 2 Jun 2022 15:25:19 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EEEAC6EFDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1654172720; bh=170kE1y5QlxOvoKQy0Mbt5fNu14x3q/0lu9EHlxCeZQ=; 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=EXG0FP18jas00umvm6Hh4MBucUFIEvKc2FBQ5KlGmPb6MOLnqn1rLrI4X2lbfC6WF nucyLk1tVW/6KczleNZSzghCR3/73p6avFfKBqE08jkj2F++dLYdpd9RzjejZlvx5x L1QUrp+ZbxhdXI5AxLWILIc4dKrOikzSw4PtJwF0= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 72A396EFDA for ; Thu, 2 Jun 2022 15:25:18 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 72A396EFDA Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1nwjt7-0001rw-Dn; Thu, 02 Jun 2022 15:25:17 +0300 Message-ID: <58ae0b0e-387a-2171-1d3b-dbdfa746c421@tarantool.org> Date: Thu, 2 Jun 2022 15:25:17 +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: <8826142ef8ae2e352728e3b4fdf5390851fe2e25.1654098694.git.imun@tarantool.org> In-Reply-To: <8826142ef8ae2e352728e3b4fdf5390851fe2e25.1654098694.git.imun@tarantool.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-4EC0790: 1 X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD93ED3C6BF6FFA701F29BCC495C22726AC3DDC642A338CB7A3182A05F5380850400F0C83D8C45600B14D5D4FD3DFBB70F90D5E3DEE09B7FD556328ADBF3C41E074 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE71EEA4C46C73542F4EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637539FDAA91738A5BD8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D805BDE1099D8945A49DF07CC5292E1889117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8BAA867293B0326636D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6936FEDF0B958011F089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-8FC586DF: 6EFBBC1D9D64D975 X-C1DE0DAB: 0D63561A33F958A5B827A8C6CDD4B14C94B38E0C907FA0605C77E05353D52224D59269BC5F550898D99A6476B3ADF6B4886A5961035A09600383DAD389E261318FB05168BE4CE3AF X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34B9F55CA4D2956E30D29A375025DA2CA8DC36C195436AD852F9C074B44D70A69B97F7A7B5BA6B55511D7E09C32AA3244CAFECAADB1D96D6B4484094351E6F0CA94DBEAD0ED6C55A80FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojRxBGqISLOzCYFWwrrF5Tlg== X-Mailru-Sender: 689FA8AB762F739339CABD9B3CA9A7D6332D0F142A0BA98DE4DD0C1D5663B8C1DD788429FD8613638ED9BB8B05EE7B3AFB559BB5D741EB96D19CD4E7312BAA970A04DAD6CC59E3365FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] ci: make GitHub workflows more CMake-ish 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, thanks for the patch! See my comments below. 1. I propose to use long-options for clarity. In particular I mean long-option for "-j", it is better to replace it with "--parallel", see [1]. 2. I propose to define a number of threads explicitly, because Ninja and Make have different meaning for -j without a number of threads: Ninja:       -j N   run N jobs in parallel (0 means infinity) [default=#CPUs] Make:        -j [jobs], --jobs[=jobs]             Specifies the number of jobs (commands) to run simultaneously.  If             there is more than one -j option, the last one is effective.  If             the -j option is given without an argument, make will not limit             the number of jobs that can run simultaneously. When make invokes             a sub-make, all instances of make will coordinate to run the             specified number of jobs at a time; see the section PARALLEL MAKE             AND THE JOBSERVER for details. It is recommended to use a number (CPU cores + 1), so we can explicitly set "$(nproc) + 1". There is a CMake option "" [2], but we couldn't use it as it is available since CMake 3.12, when LuaJIT build system has a minimal version only 3.1. 1. https://cmake.org/cmake/help/v3.12/manual/cmake.1.html#build-tool-mode 2. https://cmake.org/cmake/help/latest/envvar/CMAKE_BUILD_PARALLEL_LEVEL.html Sergey On 01.06.2022 18:54, Igor Munkin wrote: > Using explicit commands makes changing the build system generator > to another one (e.g. Ninja) too verbose. Fortunately, we can use > generator-agnostic command provided by CMake, so the only spot where > generator name occurs is the configuration step of GitHub workflow > (UNIX Makefiles are generated for UNIX-like platforms by default). > > Signed-off-by: Igor Munkin > --- > > Branch: https://github.com/tarantool/luajit/tree/imun/cmake-ish-workflow > CI: https://github.com/tarantool/luajit/commit/8826142 > Tarantool CI results ares excess, since the changeset relates only to > tarantool/luajit GitHub Actions. > > .github/workflows/lint.yml | 2 +- > .github/workflows/linux-aarch64.yml | 4 ++-- > .github/workflows/linux-x86_64.yml | 4 ++-- > .github/workflows/macos-m1.yml | 4 ++-- > .github/workflows/macos-x86_64.yml | 4 ++-- > 5 files changed, 9 insertions(+), 9 deletions(-) > > diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml > index 9e7cc1f1..ff4b0ac2 100644 > --- a/.github/workflows/lint.yml > +++ b/.github/workflows/lint.yml > @@ -45,4 +45,4 @@ jobs: > - name: configure > run: cmake . > - name: test > - run: make -j LuaJIT-luacheck > + run: cmake --build . -j -t LuaJIT-luacheck > diff --git a/.github/workflows/linux-aarch64.yml b/.github/workflows/linux-aarch64.yml > index 09b85b56..2f62394f 100644 > --- a/.github/workflows/linux-aarch64.yml > +++ b/.github/workflows/linux-aarch64.yml > @@ -54,6 +54,6 @@ jobs: > - name: configure > run: cmake . ${{ matrix.CMAKEFLAGS }} -DLUAJIT_ENABLE_GC64=${{ matrix.GC64 }} > - name: build > - run: make -j > + run: cmake --build . -j > - name: test > - run: make -j test > + run: cmake --build . -j -t test > diff --git a/.github/workflows/linux-x86_64.yml b/.github/workflows/linux-x86_64.yml > index a1e3a618..4e6e3d9b 100644 > --- a/.github/workflows/linux-x86_64.yml > +++ b/.github/workflows/linux-x86_64.yml > @@ -54,6 +54,6 @@ jobs: > - name: configure > run: cmake . ${{ matrix.CMAKEFLAGS }} -DLUAJIT_ENABLE_GC64=${{ matrix.GC64 }} > - name: build > - run: make -j > + run: cmake --build . -j > - name: test > - run: make -j test > + run: cmake --build . -j -t test > diff --git a/.github/workflows/macos-m1.yml b/.github/workflows/macos-m1.yml > index eb822142..a272e39b 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} make -j > + run: ${ARCH} cmake --build . -j > - name: test > - run: ${ARCH} make -j test > + run: ${ARCH} cmake --build . -j -t test > diff --git a/.github/workflows/macos-x86_64.yml b/.github/workflows/macos-x86_64.yml > index 09f391db..d639e872 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: make -j > + run: cmake --build . -j > - name: test > - run: make -j test > + run: cmake --build . -j -t test