Enable code coverage for github actions (#15767)
* Add code coverage for github actions * Add code coverage for github actions * Add code coverage for github actions * Add code coverage for github actions * Split tests to parts * minor fix * minor fixes * minor fixes * minor fixes * minor fixes * minor fixes * minor fixes * minor fixes * Fixed dependencies * Fixed dependencies * ubuntu 16 cores * revert ubu and add coverage dependency * minor fixes * minor fixes * minor fixes * Update coverage.yml * Update coverage.yml * Coverage * Coverage * ubuntu-latest-16-cores * ubuntu-latest-16-cores * change triggers * add newline * Added GNinja and ccache * Change to ubuntu-latest for testing purposes * Change to ubuntu-latest for testing purposes * Change to ubuntu-latest for testing purposes * Fix getting cpu cores * Disable GNinja * Enable GNinja, change compiler, warnings no longer as errors * Enable GNinja, change compiler, warnings no longer as errors * Enable GNinja, change compiler, warnings no longer as errors * Enable GNinja, change compiler, warnings no longer as errors * Enable GNinja, change compiler, warnings no longer as errors * Enable GNinja, change compiler, warnings no longer as errors * Enable GNinja, change compiler, warnings no longer as errors * Enable GNinja, change compiler, warnings no longer as errors * fixes * change coverage cmake * 16-cores * Disable GNinja * GNinja comes back, turned off dependencies and py * Update coverage.yml * Update coverage.yml * Update coverage.yml * only test OV * only test OV * install lcov * change coverage building * only OV * no tests * change coverage building method * wrong directory fix * disable onnx * enable python * enable python * enable python * disable action for cmake * Revert "disable action for cmake" This reverts commit d0294570fa82c5ce06170866ab1f3572221c8407. * disable lcov * check files after build * disable gninja for coverage * change trigger to trigger by /coverage comment * Added rest of the tests * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Disable gninja, run tests by ctest * tf req * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml * Update coverage.yml --------- Co-authored-by: Ilya Churaev <ilya.churaev@intel.com>
This commit is contained in:
143
.github/workflows/coverage.yml
vendored
Normal file
143
.github/workflows/coverage.yml
vendored
Normal file
@@ -0,0 +1,143 @@
|
||||
name: Code coverage
|
||||
on: workflow_dispatch
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
Coverage:
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- { name: "Ubuntu gcc", os: ubuntu-latest-16-cores, cc: "gcc", cxx: "g++" }
|
||||
|
||||
steps:
|
||||
- name: Setup python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10.10'
|
||||
architecture: 'x64'
|
||||
|
||||
|
||||
- name: Setup ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
max-size: 50G
|
||||
|
||||
- name: Clone OpenVINO
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt --assume-yes update
|
||||
sudo -E ${{ github.workspace }}/install_build_dependencies.sh
|
||||
sudo apt --assume-yes install lcov
|
||||
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install -r ${{ github.workspace }}/src/bindings/python/wheel/requirements-dev.txt
|
||||
python3 -m pip install -r ${{ github.workspace }}/src/bindings/python/requirements.txt
|
||||
# For running Python API tests
|
||||
python3 -m pip install -r ${{ github.workspace }}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
|
||||
# For running Paddle frontend unit tests
|
||||
python3 -m pip install -r ${{ github.workspace }}/src/frontends/paddle/tests/requirements.txt
|
||||
# For running ONNX frontend unit tests
|
||||
python3 -m pip install -r ${{ github.workspace }}/src/frontends/onnx/tests/requirements.txt
|
||||
# For running TensorFlow frontend unit tests
|
||||
python3 -m pip install -r ${{ github.workspace }}/src/frontends/tensorflow/tests/requirements.txt
|
||||
# For MO unit tests
|
||||
python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_mxnet.txt
|
||||
python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_caffe.txt
|
||||
python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_kaldi.txt
|
||||
python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_onnx.txt
|
||||
python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_tf2.txt
|
||||
python3 -m pip install -r ${{ github.workspace }}/tools/mo/requirements_dev.txt
|
||||
|
||||
- name: Get number of CPU cores
|
||||
uses: SimenB/github-actions-cpu-cores@v1
|
||||
id: cpu-cores
|
||||
|
||||
- name: Build OpenVINO with CMake
|
||||
uses: ashutoshvarma/action-cmake-build@master
|
||||
with:
|
||||
build-dir: ${{ github.workspace }}/build
|
||||
cc: ${{ matrix.config.cc }}
|
||||
cxx: ${{ matrix.config.cxx }}
|
||||
configure-options: >
|
||||
-GNinja
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
-DENABLE_PYTHON=ON
|
||||
-DENABLE_ONEDNN_FOR_GPU=ON
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DENABLE_TESTS=ON
|
||||
-DENABLE_OV_ONNX_FRONTEND=ON
|
||||
-DENABLE_FASTER_BUILD=ON
|
||||
-DENABLE_STRICT_DEPENDENCIES=OFF
|
||||
-DENABLE_COVERAGE=ON
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
-DCMAKE_C_LINKER_LAUNCHER=ccache
|
||||
-DCMAKE_CXX_LINKER_LAUNCHER=ccache
|
||||
-DENABLE_SYSTEM_SNAPPY=ON
|
||||
build-type: Release
|
||||
parallel: ${{ steps.cpu-cores.outputs.count }}
|
||||
|
||||
- name: Install wheel packages
|
||||
run: cmake -DCOMPONENT=python_wheels -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install_pkg -P '${{ github.workspace }}/build/cmake_install.cmake'
|
||||
|
||||
- name: Install python wheels
|
||||
run: python3 -m pip install openvino-dev --find-links=${{ github.workspace }}/install_pkg/tools
|
||||
|
||||
- name: List binaries
|
||||
run: ls -la ${{ github.workspace }}/bin/intel64/Release
|
||||
|
||||
- name: Install OpenVINO
|
||||
run: cmake -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install_pkg -P '${{ github.workspace }}/build/cmake_install.cmake'
|
||||
|
||||
- name: Run OV core unit tests
|
||||
run: ${{ github.workspace }}/bin/intel64/Release/ov_core_unit_tests # --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:${{ github.workspace }}/testdata/TEST-NGraphUT.xml
|
||||
|
||||
- name: Run IR frontend tests
|
||||
run: ${{ github.workspace }}/bin/intel64/Release/ov_ir_frontend_tests # --gtest_print_time=1 --gtest_output=xml:${{ github.workspace }}/testdata/TEST-IRFrontend.xml
|
||||
|
||||
- name: Run ONNX frontend tests
|
||||
run: ${{ github.workspace }}/bin/intel64/Release/ov_onnx_frontend_tests --gtest_filter=-*IE_GPU*
|
||||
|
||||
#- name: Run Paddle frontend unit tests
|
||||
# run: ${{ github.workspace }}/bin/intel64/Release/paddle_tests --gtest_filter=-*IE_GPU*
|
||||
|
||||
- name: Run TensorFlow frontend unit tests
|
||||
run: ${{ github.workspace }}/bin/intel64/Release/ov_tensorflow_frontend_tests --gtest_filter=-*IE_GPU*
|
||||
|
||||
- name: Build coverage with CMake
|
||||
uses: ashutoshvarma/action-cmake-build@master
|
||||
with:
|
||||
build-dir: ${{ github.workspace }}/coverage
|
||||
cc: ${{ matrix.config.cc }}
|
||||
cxx: ${{ matrix.config.cxx }}
|
||||
target: ov_coverage
|
||||
configure-options: >
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
-DCMAKE_C_LINKER_LAUNCHER=ccache
|
||||
-DCMAKE_CXX_LINKER_LAUNCHER=ccache
|
||||
parallel: ${{ steps.cpu-cores.outputs.count }}
|
||||
|
||||
|
||||
- name: Print info
|
||||
run: |
|
||||
ls -laR
|
||||
pwd
|
||||
- name: Generate raport
|
||||
run: |
|
||||
lcov --capture --directory ${{ github.workspace }}/. --output-file coverage.info
|
||||
genhtml coverage.info --output-directory coverage-report
|
||||
- name: Collect coverage
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
verbose: true
|
||||
Reference in New Issue
Block a user