-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI, enhancement] Add ability to build with
gcov
, adding C++ co…
…de coverage for the ```onedal``` folder in codecov (#2249) * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * force use of coverage to start * try again * attempt again * add -Xarch_host * further checking * make verbose * attempts at integration * add echos for testing * move installation * ignore error induced by numpy switch * Update generate_coverage_reports.sh * Update generate_coverage_reports.sh * Update generate_coverage_reports.sh * Update generate_coverage_reports.sh * Update ci.yml * Update ci.yml * Update ci.yml * Update generate_coverage_reports.sh * Update ci.yml * Update generate_coverage_reports.sh * Update generate_coverage_reports.sh * Update ci.yml * Update run_test.bat * Update run_test.sh * Update ci.yml * Update ci.yml * Update generate_coverage_reports.sh * Update ci.yml * Update ci.yml * Update generate_coverage_reports.sh * Update ci.yml * Update generate_coverage_reports.sh * Update generate_coverage_reports.sh * Update generate_coverage_reports.sh * Update run_sklearn_tests.py * Update generate_coverage_reports.sh * Update ci.yml * Update generate_coverage_reports.sh * Update build_backend.py * Update CMakeLists.txt * Update generate_coverage_reports.sh * Update CMakeLists.txt * Update ci.yml * Update generate_coverage_reports.sh * Update ci.yml * Update CMakeLists.txt * Update ci.yml * Update ci.yml * Update ci.yml * Update generate_coverage_reports.sh * Update generate_coverage_reports.sh * Update CMakeLists.txt * Update CMakeLists.txt * Update CMakeLists.txt * Update CMakeLists.txt * Update CMakeLists.txt * Update build_backend.py * Update CMakeLists.txt * Update ci.yml * Update generate_coverage_reports.sh * Update build_backend.py * Update CMakeLists.txt * Update ci.yml * Update CMakeLists.txt * Update CMakeLists.txt * switch azure to lcov * Update .github/scripts/generate_coverage_reports.sh Co-authored-by: david-cortes-intel <david.cortes@intel.com> --------- Co-authored-by: david-cortes-intel <david.cortes@intel.com>
- Loading branch information
1 parent
2636c8d
commit aad2a9c
Showing
10 changed files
with
113 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#=============================================================================== | ||
# Copyright Contributors to the oneDAL project | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
#=============================================================================== | ||
|
||
ci_dir=$(dirname $(dirname $(dirname "${BASH_SOURCE[0]}"))) | ||
cd $ci_dir | ||
|
||
# create coverage.py report | ||
coverage combine .coverage.sklearnex .coverage.sklearn | ||
coverage lcov -o coverage_py_"${1}".info | ||
|
||
# create gcov report (lcov format) | ||
if [[ -n "${SKLEARNEX_GCOV}" ]]; then | ||
# extract llvm tool for gcov processing | ||
if [[ -z "$2" ]]; then | ||
GCOV_EXE="$(dirname $(type -P -a icx))/compiler/llvm-cov gcov" | ||
else | ||
GCOV_EXE="gcov" | ||
fi | ||
echo $GCOV_EXE | ||
FILTER=$(realpath ./onedal).* | ||
echo $FILTER | ||
|
||
NUMPY_TEST=$(python -m pip freeze | grep numpy) | ||
# install dependencies | ||
# proper operation of gcov with sklearnex requires the header files from | ||
# the build numpy, this must be previously set as NUMPY_BUILD | ||
python -m pip install gcovr $NUMPY_BUILD | ||
|
||
gcovr --gcov-executable "${GCOV_EXE}" -r . -v --lcov --filter "${FILTER}" -o coverage_cpp_"${1}".info | ||
|
||
# reinstall previous numpy | ||
python -m pip install $NUMPY_TEST | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters