Skip to content

Commit

Permalink
Add coverity scan CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ZzEeKkAa authored and Diptorup Deb committed Sep 21, 2023
1 parent 1d09550 commit b1f5de6
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Coverity
on:
push:
branches:
- main
workflow_dispatch:

jobs:
Coverity:

runs-on: ubuntu-latest

env:
CHECKERS: --concurrency --security --rule --enable-constraint-fpp --enable-fnptr --enable-virtual --webapp-security --enable-audit-checkers --enable-default

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11

- name: URL encode project name
run: echo "COV_PROJECT=${{ github.repository }}" | sed -e 's:/:%2F:g' -e 's/ /%20/g' >> $GITHUB_ENV

- name: Coverity Download
run: |
mkdir -p /tmp/cov-analysis
wget https://scan.coverity.com/download/linux64 --post-data "token=${{secrets.COV_TOKEN}}&project=${{env.COV_PROJECT}}" -O cov-analysis.tgz
tar -xzf cov-analysis.tgz --strip 1 -C /tmp/cov-analysis
rm cov-analysis.tgz
- name: Coverity Full Scan
if: ${{ github.event_name != 'pull_request' }}
run: |
export PATH=$PATH:/tmp/cov-analysis/bin
set -x
cov-build --dir cov-int --fs-capture-search $GITHUB_WORKSPACE --no-command
# Not available in package, maybe will be once approved?
# cov-analyze --dir cov-int --ticker-mode none --strip-path $GITHUB_WORKSPACE $CHECKERS
tar czvf numba-dpex.tgz cov-int
rm -rf cov-int
curl --form token=${{ secrets.COV_TOKEN }} \
--form email=${{ secrets.COV_EMAIL }} \
--form [email protected] \
--form version="${{ github.sha }}" \
--form description="Coverity Scan ${{ github.repository }} / ${{ github.ref }}" \
https://scan.coverity.com/builds?project=${{env.COV_PROJECT}}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![Coverage Status](https://coveralls.io/repos/github/IntelPython/numba-dpex/badge.svg?branch=main)](https://coveralls.io/github/IntelPython/numba-dpex?branch=main)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![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)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/29068/badge.svg)](https://scan.coverity.com/projects/intelpython-numba-dpex)
<img align="left" src="https://spec.oneapi.io/oneapi-logo-white-scaled.jpg" alt="oneAPI logo" width="75"/>
<br/>
<br/>
Expand Down

0 comments on commit b1f5de6

Please sign in to comment.