-
Notifications
You must be signed in to change notification settings - Fork 29
56 lines (47 loc) · 1.84 KB
/
cmake-linux-coverity.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
name: Coverity code analysis
on:
push:
branches: [ coverity_scan ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ coverity_scan ]
env:
BUILD_TYPE: RelWithDebInfo
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
PROJECTNAME: web-eid/web-eid-app
CMAKE_BUILD_PARALLEL_LEVEL: 3
jobs:
coverity:
name: Run Coverity tests
if: github.repository == 'web-eid/web-eid-app'
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt update -qq && sudo apt install --no-install-recommends -y cmake libpcsclite-dev libgtest-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure CMake
run: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -B build -S .
- name: Download Coverity Build Tool
working-directory: ${{github.workspace}}/build
run: |
curl --silent --data "token=$TOKEN&project=$PROJECTNAME" -o cov-analysis-linux64.tar.gz https://scan.coverity.com/download/cxx/linux64
mkdir cov-analysis-linux64
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
- name: Build
run: |
export PATH=$PWD/build/cov-analysis-linux64/bin:$PATH
cov-build --dir build/cov-int cmake --build build --config $BUILD_TYPE
- name: Submit the result to Coverity Scan
working-directory: ${{github.workspace}}/build
run: |
tar czvf upload.tgz cov-int
curl --silent \
--form project=$PROJECTNAME \
--form token=$TOKEN \
--form [email protected] \
--form [email protected] \
--form version=master \
--form description="Github Actions CI build" \
https://scan.coverity.com/builds?project=$PROJECTNAME