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 2222.mypy_cache /
2323.ipynb_checkpoints /
2424__pycache__ /
25+ _skbuild
2526
2627docs /source /developer /autogen *
2728
Original file line number Diff line number Diff line change 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 />
Original file line number Diff line number Diff line change 33# SPDX-License-Identifier: Apache-2.0
44
55
6+ import re
67import sys
78
89from setuptools import find_packages
3536"""
3637
3738
38- def to_cmake_format (version ):
39+ def to_cmake_format (version : str ):
3940 """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 )
4450
4551
4652# Set is_install and is_develop flags
You can’t perform that action at this time.
0 commit comments