From cbe474b4d96bd2aebf2ea0c9a68f42a5e0fb77a1 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sun, 21 Mar 2021 10:29:10 +0100 Subject: [PATCH] build: reenable Coverity Scan --- .github/workflows/coverity.yml | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/coverity.yml diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml new file mode 100644 index 00000000..d874f968 --- /dev/null +++ b/.github/workflows/coverity.yml @@ -0,0 +1,43 @@ +name: Coverity Scan +on: + push: + schedule: + - cron: '0 9 * * 1,5' # Bi-weekly at 09:00 UTC on Monday and Thursday + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install stuff + run: ./tests/ci/install.sh + - name: Download Coverity Scan + run: | + wget -q https://scan.coverity.com/download/cxx/linux64 \ + --post-data "token=$TOKEN&project=vincentbernat%2Flldpd" \ + -O cov-analysis-linux64.tar.gz + mkdir cov-analysis-linux64 + tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64 + env: + TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} + - name: Build + run: | + ./autogen.sh + ./configure --with-snmp + export PATH=`pwd`/cov-analysis-linux64/bin:$PATH + cov-build --dir cov-int make + - name: Submit the result to Coverity Scan + run: | + tar czvf lldpd.tgz cov-int + curl \ + --form project=vincentbernat-lldpd \ + --form token=$TOKEN \ + --form email=vincent@bernat.ch \ + --form file=@lldpd.tgz \ + --form version=trunk \ + --form description="lldpd $(git describe --tags)" \ + https://scan.coverity.com/builds?project=vincentbernat%2Flldpd + env: + TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} -- 2.39.5