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 F250E56765C; Tue, 1 Aug 2023 21:49:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org F250E56765C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1690915763; bh=YguNWExaRxBpd1JwVhNGs9O8236aBj0lytwUz5+Sphg=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=qi6lghXyYmvrvLGe4B/hAPpQTGnjFGfwr0R92FYVk/4Qbf9UTCEcDmBBNGjjFur2j 3hROM6uPC9k6MIGdKpMXUER+Ix12n2T7YF1fl1YJMpG7nPOwXj7T1NQHxexmmLJlhy rEbCPocgqp8u0gRpxKmYbp5UrI32cxaHsqCxsLA0= Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 0F617567656 for ; Tue, 1 Aug 2023 21:48:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0F617567656 Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2b9dc1bff38so53484241fa.1 for ; Tue, 01 Aug 2023 11:48:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690915719; x=1691520519; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Qj5ewG74pAsWJaUEncLeiFKTJaIUyXTJ/FKZ3tJ54CU=; b=U4uqsxS06QvMxX1dZohJpRjNLpAFtC51efXCph0oMYnVzoXpgI/d390iKnBCJN2tiR P7m7aPtNRoTyZFtrfjUvUSGoi42Mrq37to6Mx8XLaPBiECqtF/33Mrtey/WxejcCQOOu wMs5Oj2aKV3Dd+iuPmoiazPiOCp9p+s5epk0wUYK8fSIchnBYuUIttbxR7FxtxjV+3kL z0ODAwaIenBZJTLXSpPo5FRxEuXKDBJQd/BdCgwXmqLigiCVS+696yx3XTZeSaUn8sne VU7aoadOuvXy/+ZimIgu5ur30OlbS/gB+Zmde38hehiqHI8Cu//cNLsXNJlk/oPDL6Fm rIyQ== X-Gm-Message-State: ABy/qLb307SU9j962zYgL4Zh47z1kOWcN/A7sgkZAb6LXRGCGDGC3tWS ZlmK2G4YzrS+5I6iEnDqR0eu/K8qRgA= X-Google-Smtp-Source: APBJJlFGOfhcNPRy8U21WZdmeoGbT5ZznwngF0ba1kp3hL7FC/G4O4qFWck+p3xtdDqzzrPyl8RZLQ== X-Received: by 2002:a2e:7308:0:b0:2b6:ecdd:16cf with SMTP id o8-20020a2e7308000000b002b6ecdd16cfmr3235049ljc.40.1690915718787; Tue, 01 Aug 2023 11:48:38 -0700 (PDT) Received: from pony.bronevichok.ru ([79.164.223.111]) by smtp.gmail.com with ESMTPSA id t22-20020a2e9c56000000b002b9c0822951sm3188867ljj.119.2023.08.01.11.48.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Aug 2023 11:48:38 -0700 (PDT) To: tarantool-patches@dev.tarantool.org, Sergey Kaplun , max.kokryashkin@gmail.com Date: Tue, 1 Aug 2023 21:46:10 +0300 Message-Id: <6535409abb0242a342285f683db945f54b01e5d2.1690915289.git.sergeyb@tarantool.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [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" 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 Coveralls. Coveralls is a web-service that lets you inspect every detail 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 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 + - 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 + - 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