Skip to content

Add coverity

Add coverity #61

Workflow file for this run

---
name: Coverity Static Analysis
on: [pull_request]
jobs:
polaris-scan:
name: Polaris Coverity Static Analysis
permissions:
packages: write
runs-on: ubuntu-latest
env:
VCPKG_NUGET_USER: ${{secrets.VCPKG_NUGET_USER || github.repository_owner}}
VCPKG_NUGET_TOKEN: ${{secrets.VCPKG_NUGET_TOKEN || secrets.GITHUB_TOKEN}}
steps:
- name: Get number of CPU cores
uses: SimenB/[email protected]
id: cpu-cores
- name: Checkout Source
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup build dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-10 g++-10 make mono-complete libkrb5-dev libsasl2-dev
- name: Setup VCPKG cache
run: |
. build_tooling/vcpkg_caching.sh
echo -e "VCPKG_BINARY_SOURCES=$VCPKG_BINARY_SOURCES
VCPKG_ROOT=$PLATFORM_VCPKG_ROOT" | tee -a $GITHUB_ENV
- name: Get CMake
uses: lukka/get-cmake@latest
- name: CMake configure
uses: lukka/[email protected]
with:
cmakeListsTxtPath: ${{github.workspace}}/cpp/CMakeLists.txt
configurePreset: linux-debug
configurePresetAdditionalArgs: "['-DVCPKG_INSTALL_OPTIONS=--clean-after-build', '-DCMAKE_C_COMPILER=gcc-10', '-DCMAKE_CXX_COMPILER=g++-10']"
- name: Polaris PR Scan
uses: synopsys-sig/[email protected]
with:
polaris.serverurl: ${{ vars.POLARIS_SERVER_URL }}
polaris.accesstoken: ${{ secrets.POLARIS_ACCESS_TOKEN }}
polaris.application.name: "ArcticDB"
polaris.project.name: "ArcticDB-core"
polaris.assessment.types: "SAST"
polaris.prcomment.severities: "[high,critical,medium,low]"
polaris.prcomment.enabled: true
polaris.waitforscan: true
coverity.build.command: make -j ${{ steps.cpu-cores.outputs.count }}
coverity.clean.command: make clean
github_token: ${{ secrets.POLARIS_GITHUB_TOKEN }}
project_directory: ${{github.workspace}}/cpp/out/linux-debug-build
include_diagnostics: true