git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] .github/workflows: add coverity action

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 21, 2023, 23:30 UTC
Message-ID
<xmqqo7hv3y11.fsf@gitster.g>
In-Reply-To
<b23951c569660e1891a7fb3ad2c2ea1952897bd7.1695332105.git.me@ttaylorr.com>
Taylor Blau <me@ttaylorr.com> writes:
Show 7 quoted lines
> This fell to the bottom of my queue, but I got back to it today while
> doing some ~~spring~~ fall inbox cleaning :-). Thanks Peff and Johannes
> for helpful review in the first round. Range-diff is below:
>
> Range-diff against v1:
> 1:  f74ae75ddb < -:  ---------- .github/workflows: add coverity action
> -:  ---------- > 1:  b23951c569 .github/workflows: add coverity action

That's a useful range-diff ;-). Even with --word-diff, range-diff does not notice that they correspond to each other, without an absurd setting like --creation-factor=999.

Show 15 quoted lines
>  .github/workflows/coverity.yml | 22 ++++++++++++++++++++++
>  ci/install-dependencies.sh     |  2 +-
>  ci/lib.sh                      |  2 +-
>  3 files changed, 24 insertions(+), 2 deletions(-)
>  create mode 100644 .github/workflows/coverity.yml
>
> diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml
> new file mode 100644
> index 0000000000..3ba00b3929
> --- /dev/null
> +++ b/.github/workflows/coverity.yml
> @@ -0,0 +1,22 @@
> +name: Coverity
> +
> +on: [push, pull_request]

This no longer hardcocdes the condition to master and tagged ones, as ...

Show 6 quoted lines
> +jobs:
> +  coverity:
> +    if: (vars.ENABLE_COVERITY == 'true') &&
> +      (vars.COVERITY_BRANCHES == '' ||
> +       contains(vars.COVERITY_BRANCHES, github.ref_name) ||
> +       contains(vars.COVERITY_BRANCHES, '*'))

... this lets you control when to run it via the "vars". This round also can act on pull-requests in addition to pushes.

Show 11 quoted lines
> +    runs-on: ubuntu-latest
> +    steps:
> +      - uses: actions/checkout@v3
> +      - run: ci/install-dependencies.sh
> +        env:
> +          jobname: coverity
> +      - uses: vapier/coverity-scan-action@cae3c096a2eb21c431961a49375ac17aea2670ce
> +        with:
> +          email: ${{ secrets.COVERITY_SCAN_EMAIL }}
> +          token: ${{ secrets.COVERITY_SCAN_TOKEN }}
> +          command: make -j8

And the actual implementation is vastly different by just using a canned one, which requires less maintenance on our end, which is nice.

Show 13 quoted lines
> diff --git a/ci/lib.sh b/ci/lib.sh
> index 6fbb5bade1..2ad0ae340e 100755
> --- a/ci/lib.sh
> +++ b/ci/lib.sh
> @@ -227,7 +227,7 @@ export SKIP_DASHED_BUILT_INS=YesPlease
>
>  case "$runs_on_pool" in
>  ubuntu-*)
> -	if test "$jobname" = "linux-gcc-default"
> +	if test "$jobname" = "linux-gcc-default" || test "$jobname" = "coverity"
>  	then
>  		break
>  	fi

This part is new in this iteration, to avoid further customization that enables more exotic features, which makes sense.

Previous: Taylor BlauNext: Johannes Schindelin
Message 9 of 13 in “.github/workflows: add coverity action”
  1. .github/workflows: add coverity actionTaylor Blau, Aug 22, 2023
  2. Jeff KingAug 25, 2023
  3. Jeff KingAug 25, 2023
  4. Johannes SchindelinAug 29, 2023
  5. Jeff KingAug 30, 2023
  6. Johannes SchindelinAug 30, 2023
  7. Jeff KingAug 30, 2023
  8. .github/workflows: add coverity actionTaylor Blau, Sep 21, 2023
  9. Junio C HamanoSep 21, 2023
  10. Johannes SchindelinSep 22, 2023
  11. Jeff KingSep 23, 2023
  12. Jeff KingSep 23, 2023
  13. Jeff KingSep 23, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.