Skip to content

CoverityScan

CoverityScan #266

Workflow file for this run

name: CoverityScan
on:
schedule:
- cron: '0 4 * * 1' # Every monday at 4:00 UTC
push:
paths:
# Workflow file itself
- '.github/workflows/CoverityScan.yml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
trunk:
runs-on: ubuntu-20.04
# Don't run on dependabot PRs
if: github.actor != 'dependabot[bot]'
env:
GCC_VERSION: "8"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Environment
run: scripts/ci/SetupEnvironment.sh
- name: Install compiler
run: scripts/ci/InstallTools.sh gcc-${{ env.GCC_VERSION }} ninja
- name: Download Coverity Build Tool
run: |
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=AMS21%2FPhi" -O cov-analysis-linux64.tar.gz
mkdir cov-analysis-linux64 -p
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
- name: Configure
run: |
mkdir -p build
cd build
cmake -DPHI_TEST_WITH_ALL_STANDARDS:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING="Debug" ..
- name: Configure cov-build
run: |
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
cov-configure --comptype gcc --compiler /usr/bin/g++-${{ env.GCC_VERSION }} -- -std=c++2a
- name: Build with cov-build
env:
COVERITY_UNSUPPORTED_COMPILER_INVOCATION: 1
run: |
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
cd build
cov-build --dir cov-int ninja
- name: Submit the result to Coverity Scan
working-directory: ./build
run: |
tar czvf phi.tgz cov-int
curl --form token=$TOKEN \
--form email=hansfritzenmeister@protonmail.com \
--form file=@phi.tgz \
--form version="trunk" \
--form description="Automatic submission" \
https://scan.coverity.com/builds?project=AMS21%2FPhi
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}