Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Coverity scan CI #1128

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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