File tree Expand file tree Collapse file tree 4 files changed +62
-5
lines changed Expand file tree Collapse file tree 4 files changed +62
-5
lines changed Original file line number Diff line number Diff line change
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}}
Original file line number Diff line number Diff line change 22
22
.mypy_cache /
23
23
.ipynb_checkpoints /
24
24
__pycache__ /
25
+ _skbuild
25
26
26
27
docs /source /developer /autogen *
27
28
Original file line number Diff line number Diff line change 2
2
[ ![ Coverage Status] ( https://coveralls.io/repos/github/IntelPython/numba-dpex/badge.svg?branch=main )] ( https://coveralls.io/github/IntelPython/numba-dpex?branch=main )
3
3
[ ![ pre-commit] ( https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white )] ( https://github.com/pre-commit/pre-commit )
4
4
[ ![ 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 )
5
6
<img align =" left " src =" https://spec.oneapi.io/oneapi-logo-white-scaled.jpg " alt =" oneAPI logo " width =" 75 " />
6
7
<br />
7
8
<br />
Original file line number Diff line number Diff line change 3
3
# SPDX-License-Identifier: Apache-2.0
4
4
5
5
6
+ import re
6
7
import sys
7
8
8
9
from setuptools import find_packages
35
36
"""
36
37
37
38
38
- def to_cmake_format (version ):
39
+ def to_cmake_format (version : str ):
39
40
"""Convert pep440 version string into a cmake compatible string."""
40
- version = version .strip ()
41
- parts = version .split ("+" )
42
- tag , dist = parts [0 ], parts [1 ].split ("." )[0 ]
43
- return tag + "." + dist
41
+ # cmake version just support up to 4 numbers separated by dot.
42
+ # https://peps.python.org/pep-0440/
43
+ # https://cmake.org/cmake/help/latest/command/project.html
44
+
45
+ match = re .search (r"^\d+(?:\.\d+(?:\.\d+(?:\.\d+)?)?)?" , version )
46
+ if not match :
47
+ raise Exception ("Unsupported version" )
48
+
49
+ return match .group (0 )
44
50
45
51
46
52
# Set is_install and is_develop flags
You can’t perform that action at this time.
0 commit comments