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 06BEB57FBB4; Mon, 7 Aug 2023 14:32:19 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 06BEB57FBB4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1691407939; bh=Z6UNgoF41xNggR4RTf9a/YFNr6QxikYIwf0yzAj1q5Q=; 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=sb5nHju3gnRE5f2XYQWPMiPr7DnTbfNo4GvIj9RzV0kh35AdPyExclZ9WtGTGDLCT zPzuZ0OYJfx0VVzu7RoAVMnL821/bcMIYQpMKuRs5uSJkd0RMkntSX5V9MAQQxySLc AalBIVbOydCNJqubdDU9OLdGxydqdeBCC0S7pKc0= Received: from smtp35.i.mail.ru (smtp35.i.mail.ru [95.163.41.76]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id D198A57FBB4 for ; Mon, 7 Aug 2023 14:32:17 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D198A57FBB4 Received: by smtp35.i.mail.ru with esmtpa (envelope-from ) id 1qSyTA-005NY4-1L; Mon, 07 Aug 2023 14:32:16 +0300 Message-ID: <988924c9-ec9e-736e-59df-3f82e7e454e9@tarantool.org> Date: Mon, 7 Aug 2023 14:32:16 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: Sergey Kaplun , Maxim Kokryashkin Cc: Sergey Bronnikov , tarantool-patches@dev.tarantool.org, max.kokryashkin@gmail.com References: <6535409abb0242a342285f683db945f54b01e5d2.1690915289.git.sergeyb@tarantool.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD969E04B5EED670DC804E38A5F9341E5D8C5E4A5EF3DB2E749182A05F53808504004680168CBE01984DF76B6FD484B2E79DDAF1825B8A6F5FA99FA49233C0DDAB6 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7AEA4A6B3AFC9B957C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE72FFC9A718DD021A9EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BE5CCB53A13BC8DBA735C1CE2A9F9EC69956F26A77BFC8410CC7F00164DA146DAFE8445B8C89999728AA50765F7900637CAEE156C82D3D7D9389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8DA7BFA4571439BB2F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947C2D01283D1ACF37BA302FCEF25BFAB3454AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C31DD302B0B79430F8BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166176DF2183F8FC7C0F43AACC0BCEB2632725E5C173C3A84C39D7D3120FB43BDE335872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A547DB6A9F634748709AEDA9967629AEB0A5BB2383CD4DD81EF87CCE6106E1FC07E67D4AC08A07B9B01DAA61796BF5227BCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF5BCBB0FBCB1FD925EF404B357A8DB2BDF680589A0885CB2D9CF156E5525784DB9B332213384B53536CFA265C340F28BA04A66FD7C08E480928A087A3C0E1A74A461A413F07889F2102C26D483E81D6BE0DBAE6F56676BC7117BB6831D7356A2DEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj/xSHLV4ZQPv12MK5qS0C8Q== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A7695557C60F9FC17278DF76B6FD484B2E79825871508D9F3970EBA65886582A37BD66FEC6BF5C9C28D98A98C1125256619760D574B6FC815AB872D6B4FCE48DF648AE208404248635DF X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 2/2 v2] ci: support coveralls 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" Hi, Sergey thanks for a long-awaited review! On 8/6/23 14:41, Sergey Kaplun via Tarantool-patches wrote: > Hi, Maxim, Sergey! > Thanks for the patch and the review! > LGTM, just a minor comments below. > > On 02.08.23, Maxim Kokryashkin wrote: >> Hi, Sergey! >> Thanks for the patch! >> LGTM, except for a few nits regarding the commit message. >> >> Best regards, >> Maxim Kokryashkin >> >> On Tue, Aug 01, 2023 at 09:46:10PM +0300, Sergey Bronnikov via Tarantool-patches wrote: >>> From: Sergey Bronnikov >>> >>> The patch adds a workflow that runs regression test suites, produces a >>> summary about current code coverage and send code coverage data to >> Typo: s/about/of/ >> Typo: s/send code/sends code/ >>> Coveralls. Coveralls is a web-service that lets you inspect every detail >> Typo: s/web-service/web service/ >>> of your coverage. See Tarantool's LuaJIT page on Coveralls [1]. >>> >>> 1. https://coveralls.io/github/tarantool/luajit >>> --- >>> .github/actions/setup-linux/action.yml | 1 + >>> .github/workflows/coverage.yml | 60 ++++++++++++++++++++++++++ >>> 2 files changed, 61 insertions(+) >>> create mode 100644 .github/workflows/coverage.yml >>> >>> diff --git a/.github/actions/setup-linux/action.yml b/.github/actions/setup-linux/action.yml >>> index f0171b83..71619a60 100644 >>> --- a/.github/actions/setup-linux/action.yml >>> +++ b/.github/actions/setup-linux/action.yml >>> @@ -16,4 +16,5 @@ runs: >>> run: | >>> apt -y update >>> apt -y install cmake gcc make ninja-build perl >>> + pip3 install gcovr > Should it be done in the separate action, like it is done for ASan? > Because we don't need gcovr for all our linux testing. Well, added a separate GH action for that. > >>> shell: bash >>> diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml >>> new file mode 100644 >>> index 00000000..9fff06c7 >>> --- /dev/null >>> +++ b/.github/workflows/coverage.yml >>> @@ -0,0 +1,60 @@ >>> +name: Code coverage >>> + >>> +on: >>> + push: >>> + branches-ignore: >>> + - '**-notest' >>> + - 'upstream-**' >>> + tags-ignore: >>> + - '**' >>> + >>> +concurrency: >>> + # An update of a developer branch cancels the previously >>> + # scheduled workflow run for this branch. However, the default >>> + # branch, and long-term branch (tarantool/release/2.11, >>> + # tarantool/release/2.10, etc) workflow runs are never canceled. >>> + # >>> + # We use a trick here: define the concurrency group as 'workflow >>> + # run ID' + # 'workflow run attempt' because it is a unique >>> + # combination for any run. So it effectively discards grouping. >>> + # >>> + # XXX: we cannot use `github.sha` as a unique identifier because >>> + # pushing a tag may cancel a run that works on a branch push >>> + # event. >>> + group: ${{ startsWith(github.ref, 'refs/heads/tarantool/') >>> + && format('{0}-{1}', github.run_id, github.run_attempt) >>> + || format('{0}-{1}', github.workflow, github.ref) }} >>> + cancel-in-progress: true >>> + >>> +jobs: >>> + coverage: >>> + strategy: >>> + fail-fast: false >>> + runs-on: [self-hosted, regular, x86_64, Linux] >>> + steps: >>> + - uses: actions/checkout@v3 >>> + with: >>> + fetch-depth: 0 >>> + submodules: recursive >>> + - name: setup Linux >>> + uses: ./.github/actions/setup-linux >>> + - name: configure >>> + run: > >>> + cmake -S . -B ${{ env.BUILDDIR }} >>> + -G Ninja >>> + -DCMAKE_BUILD_TYPE=RelWithDebInfo >>> + -DLUAJIT_ENABLE_COVERAGE=ON >>> + -DLUAJIT_ENABLE_GC64=ON > Is there a way to joing GC64/non-GC64 testsing? > Same for ARM64. Yes, there is a thing named "parallel build" that allows reporting code coverage data from a number of CI jobs, see [1]. We definitely need this for jobs with tests that covers non-common parts of code like GC64/ARM64 etc, but in scope of other patch series. 1. https://docs.coveralls.io/parallel-builds#whats-a-parallel-build >>> + - name: build >>> + run: cmake --build . --parallel >>> + working-directory: ${{ env.BUILDDIR }} >>> + - name: test and generate code coverage report >>> + run: cmake --build ${{ env.BUILDDIR }} --parallel --target coverage > I see no test target here, so will we get the correct coverage results? > Am I missing something? If yes, than comment is desirable. - target "LuaJIT-coverage" runs gcov and gcovr and builds a code coverage report - target "coverage" connected to "test" (running tests) and "LuaJIT-coverage" (builds code coverage report) I suppose comment is not required here. > >>> + - name: send code coverage to coveralls.io >>> + run: | >>> + curl -LO https://coveralls.io/coveralls-linux.tar.gz >>> + tar xvzf coveralls-linux.tar.gz >>> + ./coveralls -f ./coverage/luajit.xml >>> + working-directory: ${{ env.BUILDDIR }} >>> + env: >>> + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} >>> -- >>> 2.34.1 >>>