forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
140 lines (117 loc) · 5.33 KB
/
coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
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@v5
with:
python-version: '3.10.10'
architecture: 'x64'
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
max-size: 50G
- name: Clone OpenVINO
uses: actions/checkout@v4
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
# 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: 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
- 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
- name: Run OV Proxy plugin tests
run: ${{ github.workspace }}/bin/intel64/Release/ov_proxy_plugin_tests
- name: Run OV Hetero Func tests
run: ${{ github.workspace }}/bin/intel64/Release/ov_hetero_func_tests --gtest_filter="*smoke*"
- name: Run IR frontend tests
run: ${{ github.workspace }}/bin/intel64/Release/ov_ir_frontend_tests
- 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
- 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@v4
with:
verbose: true