Mercurial > vim
changeset 31225:39d22d78ce92 v9.0.0946
patch 9.0.0946: CI: Error in Coverity flow is not reported
Commit: https://github.com/vim/vim/commit/ad85af5b384d8d36d7bd3e9b4086190d3a40ab15
Author: K.Takata <kentkt@csc.jp>
Date: Fri Nov 25 00:57:05 2022 +0000
patch 9.0.0946: CI: Error in Coverity flow is not reported
Problem: CI: Error in Coverity flow is not reported.
Solution: Use another way to avoid errors in a forked repository. (Ken
Takata, closes #11609)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 25 Nov 2022 02:00:04 +0100 |
parents | 02453993be3a |
children | 8338f377b098 |
files | .github/workflows/coverity.yml src/version.c |
diffstat | 2 files changed, 15 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -15,21 +15,22 @@ jobs: CC: gcc CFLAGS: -Wno-deprecated-declarations DEBIAN_FRONTEND: noninteractive + TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} steps: - name: Checkout repository from github + if: env.TOKEN uses: actions/checkout@v3 - name: Download Coverity + if: env.TOKEN run: | - # probably no TOKEN if it was a forked repo - [ -n "${TOKEN}" ] && wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=vim" -O coverity_tool.tgz || exit 0 + wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=vim" -O coverity_tool.tgz mkdir cov-scan tar ax -f coverity_tool.tgz --strip-components=1 -C cov-scan - env: - TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} - name: Install packages + if: env.TOKEN run: | sudo apt update && sudo apt install -y \ autoconf \ @@ -48,6 +49,7 @@ jobs: libsodium-dev - name: Set up environment + if: env.TOKEN run: | echo "$(pwd)/cov-scan/bin" >> $GITHUB_PATH ( @@ -56,6 +58,7 @@ jobs: ) >> $GITHUB_ENV - name: Configure + if: env.TOKEN run: | ./configure --with-features=huge ${CONFOPT} --enable-fail-if-missing # Append various warning flags to CFLAGS. @@ -63,21 +66,19 @@ jobs: sed -i -f ci/config.mk.${CC}.sed src/auto/config.mk - name: Build/scan vim + if: env.TOKEN run: | - # if no 'cov-build' there, then just cancel the process - [ -x "$(which cov-build)" ] && cov-build --dir cov-int make -j${NPROC} || exit 0 + cov-build --dir cov-int make -j${NPROC} - name: Submit results + if: env.TOKEN run: | - [ -d 'cov-int' ] && tar zcf cov-scan.tgz cov-int - [ -n "${TOKEN}" ] \ - && curl --form token=$TOKEN \ + tar zcf cov-scan.tgz cov-int + curl --form token=$TOKEN \ --form email=$EMAIL \ --form file=@cov-scan.tgz \ --form version="$(git rev-parse HEAD)" \ --form description="Automatic GHA scan" \ - 'https://scan.coverity.com/builds?project=vim' \ - || exit 0 + 'https://scan.coverity.com/builds?project=vim' env: - TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}