Skip to content

Commit 68c5610

Browse files
author
Diptorup Deb
authored
Merge pull request #1128 from IntelPython/feature/add_coverity_scan
Add Coverity scan CI
2 parents 1d09550 + b1f5de6 commit 68c5610

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.github/workflows/coverity.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Coverity
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
jobs:
9+
Coverity:
10+
11+
runs-on: ubuntu-latest
12+
13+
env:
14+
CHECKERS: --concurrency --security --rule --enable-constraint-fpp --enable-fnptr --enable-virtual --webapp-security --enable-audit-checkers --enable-default
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-java@v1
19+
with:
20+
java-version: 11
21+
22+
- name: URL encode project name
23+
run: echo "COV_PROJECT=${{ github.repository }}" | sed -e 's:/:%2F:g' -e 's/ /%20/g' >> $GITHUB_ENV
24+
25+
- name: Coverity Download
26+
run: |
27+
mkdir -p /tmp/cov-analysis
28+
wget https://scan.coverity.com/download/linux64 --post-data "token=${{secrets.COV_TOKEN}}&project=${{env.COV_PROJECT}}" -O cov-analysis.tgz
29+
tar -xzf cov-analysis.tgz --strip 1 -C /tmp/cov-analysis
30+
rm cov-analysis.tgz
31+
32+
- name: Coverity Full Scan
33+
if: ${{ github.event_name != 'pull_request' }}
34+
run: |
35+
export PATH=$PATH:/tmp/cov-analysis/bin
36+
set -x
37+
cov-build --dir cov-int --fs-capture-search $GITHUB_WORKSPACE --no-command
38+
# Not available in package, maybe will be once approved?
39+
# cov-analyze --dir cov-int --ticker-mode none --strip-path $GITHUB_WORKSPACE $CHECKERS
40+
41+
tar czvf numba-dpex.tgz cov-int
42+
rm -rf cov-int
43+
44+
curl --form token=${{ secrets.COV_TOKEN }} \
45+
--form email=${{ secrets.COV_EMAIL }} \
46+
47+
--form version="${{ github.sha }}" \
48+
--form description="Coverity Scan ${{ github.repository }} / ${{ github.ref }}" \
49+
https://scan.coverity.com/builds?project=${{env.COV_PROJECT}}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
[![Coverage Status](https://coveralls.io/repos/github/IntelPython/numba-dpex/badge.svg?branch=main)](https://coveralls.io/github/IntelPython/numba-dpex?branch=main)
33
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
44
[![Join the chat at https://matrix.to/#/#Data-Parallel-Python_community:gitter.im](https://badges.gitter.im/Join%20Chat.svg)](https://app.gitter.im/#/room/#Data-Parallel-Python_community:gitter.im)
5+
[![Coverity Scan Build Status](https://scan.coverity.com/projects/29068/badge.svg)](https://scan.coverity.com/projects/intelpython-numba-dpex)
56
<img align="left" src="https://spec.oneapi.io/oneapi-logo-white-scaled.jpg" alt="oneAPI logo" width="75"/>
67
<br/>
78
<br/>

0 commit comments

Comments
 (0)