Code coverage #187
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
name: Code coverage | |
on: workflow_dispatch | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: read-all | |
jobs: | |
Coverage: | |
runs-on: ${{ matrix.config.os }} | |
env: | |
CMAKE_BUILD_TYPE: 'Release' | |
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@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: '3.10.10' | |
architecture: 'x64' | |
- name: Setup ccache | |
uses: hendrikmuhs/ccache-action@53911442209d5c18de8a31615e0923161e435875 # v1.2.16 | |
with: | |
max-size: 50G | |
- name: Clone OpenVINO | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
timeout-minutes: 15 | |
with: | |
submodules: 'true' | |
- 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 | |
# 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 | |
- name: Build OpenVINO with CMake | |
uses: ashutoshvarma/action-cmake-build@ade188313bc7eaa6f14349569a64d8bc716342ff # 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: ${{ env.CMAKE_BUILD_TYPE }} | |
- name: Install wheel packages | |
run: cmake -DCOMPONENT=python_wheels -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install_pkg -P '${{ github.workspace }}/build/cmake_install.cmake' | |
- name: List binaries | |
run: ls -la ${{ github.workspace }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }} | |
- 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/${{ env.CMAKE_BUILD_TYPE }}/ov_core_unit_tests | |
- name: Run OV Proxy plugin tests | |
run: ${{ github.workspace }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/ov_proxy_plugin_tests | |
- name: Run OV Hetero Func tests | |
run: ${{ github.workspace }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/ov_hetero_func_tests --gtest_filter="*smoke*" | |
- name: Run IR frontend tests | |
run: ${{ github.workspace }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/ov_ir_frontend_tests | |
- name: Run ONNX frontend tests | |
run: ${{ github.workspace }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/ov_onnx_frontend_tests --gtest_filter=-*IE_GPU* | |
#- name: Run Paddle frontend unit tests | |
# run: ${{ github.workspace }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/paddle_tests --gtest_filter=-*IE_GPU* | |
- name: Run TensorFlow frontend unit tests | |
run: ${{ github.workspace }}/bin/intel64/${{ env.CMAKE_BUILD_TYPE }}/ov_tensorflow_frontend_tests --gtest_filter=-*IE_GPU* | |
- name: Build coverage with CMake | |
uses: ashutoshvarma/action-cmake-build@ade188313bc7eaa6f14349569a64d8bc716342ff # 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 | |
- 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@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1 | |
with: | |
verbose: true |