-
Notifications
You must be signed in to change notification settings - Fork 98
73 lines (65 loc) · 2.7 KB
/
static_analysis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
name: Coverity Static Analysis
on:
workflow_dispatch:
schedule:
- cron: "0 3 * * *"
jobs:
polaris-scan:
name: Polaris Coverity Static Analysis
permissions:
packages: write
runs-on: ubuntu-22.04
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/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8
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/run-cmake@v10.8
env:
CC: "gcc-10"
CXX: "g++-10"
with:
cmakeListsTxtPath: ${{github.workspace}}/cpp/CMakeLists.txt
configurePreset: linux-release
configurePresetAdditionalArgs: "['-DVCPKG_INSTALL_OPTIONS=--clean-after-build', '-DCMAKE_C_COMPILER=gcc-10', '-DCMAKE_CXX_COMPILER=g++-10']"
- name: Copy Coverity config
run: cp ${{github.workspace}}/coverity.yaml ${{github.workspace}}/cpp/out/linux-release-build
- name: Polaris PR Scan
uses: synopsys-sig/synopsys-action@v1.13.0
with:
polaris_server_url: ${{ vars.POLARIS_SERVER_URL }}
polaris_access_token: ${{ secrets.POLARIS_ACCESS_TOKEN }}
polaris_application_name: "ArcticDB"
polaris_project_name: "ArcticDB-core"
polaris_assessment_types: "SAST"
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-release-build
include_diagnostics: true
polaris_reports_sarif_create: true
polaris_reports_sarif_groupSCAIssues: true
polaris_upload_sarif_report: true
polaris_prComment_severities: "high,critical,medium,low"