Skip to content

ci: install lcov in coverage summary job #9

ci: install lcov in coverage summary job

ci: install lcov in coverage summary job #9

Workflow file for this run

name: OpenVX CI
on:
push:
branches: ['**']
pull_request:
branches: ['**']
env:
INSTALL_PREFIX: ${{ github.workspace }}/install
jobs:
# ====================================================================
# 1. Build sample impl (Debug + extensions + coverage) + CTS
# Note: --conf_nnef excluded because NNEF-Tools breaks on GCC≥11
# ====================================================================
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake lcov
- name: Build OpenVX sample impl (Debug + extensions + coverage)
run: |
python3 Build.py \
--os=linux --arch=64 --conf=Debug --build=true \
--conf_vision \
--enh_vision \
--conf_nn \
--nn \
--ix \
--pipelining \
--streaming \
--userdataobj \
--c_flags="-fprofile-arcs -ftest-coverage" \
--cpp_flags="-fprofile-arcs -ftest-coverage"
- name: Patch CTS test_module include dirs
run: |
sed -i "s|\${CMAKE_SOURCE_DIR}/include|\${CMAKE_SOURCE_DIR}/include ${{ env.INSTALL_PREFIX }}/Linux/x64/Debug/include|g" cts/test_conformance/test_module/CMakeLists.txt
- name: Build CTS
env:
INC: ${{ env.INSTALL_PREFIX }}/Linux/x64/Debug/include
run: |
mkdir -p build-cts
cd build-cts
cmake \
-DCMAKE_C_FLAGS="-I$INC" \
-DCMAKE_CXX_FLAGS="-I$INC" \
-DOPENVX_INCLUDES="$INC" \
-DOPENVX_LIBRARIES="${{ env.INSTALL_PREFIX }}/Linux/x64/Debug/lib/libopenvx.so;${{ env.INSTALL_PREFIX }}/Linux/x64/Debug/lib/libvxu.so;pthread;dl;m;rt" \
-DOPENVX_CONFORMANCE_VISION=ON \
-DOPENVX_USE_ENHANCED_VISION=ON \
-DOPENVX_CONFORMANCE_NEURAL_NETWORKS=ON \
-DOPENVX_USE_NN=ON \
-DOPENVX_USE_NN_16=ON \
-DOPENVX_USE_IX=ON \
-DOPENVX_USE_PIPELINING=ON \
-DOPENVX_USE_STREAMING=ON \
-DOPENVX_USE_USER_DATA_OBJECT=ON \
../cts/
cmake --build . --parallel $(nproc)
- name: Run CTS — Smoke / Baseline (generate .gcda)
run: |
cd build-cts
export LD_LIBRARY_PATH=${{ env.INSTALL_PREFIX }}/Linux/x64/Debug/lib
export VX_TEST_DATA_PATH=${{ github.workspace }}/cts/test_data/
timeout 300 ./bin/vx_test_conformance \
--filter="GraphBase.*:SmokeTestBase.*:SmokeTest.*:TargetBase.*:Target.*:Logging.*" \
--verbose || true
- name: Collect code-coverage data
run: |
lcov --directory build/Linux/x64/Debug --capture --output-file coverage.info
lcov --remove coverage.info '/usr/*' '${{ github.workspace }}/cts/*' --output-file coverage.info
lcov --list coverage.info
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: openvx-build
path: |
${{ env.INSTALL_PREFIX }}/
build/Linux/x64/Debug/
build-cts/
cts/test_data/
coverage.info
retention-days: 1
# ====================================================================
# 2. Coverage report (download + display)
# ====================================================================
coverage:
needs: build
runs-on: ubuntu-22.04
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: openvx-build
path: ${{ github.workspace }}
- name: Install lcov
run: |
sudo apt-get update
sudo apt-get install -y lcov
- name: Show coverage summary
run: |
lcov --summary coverage.info
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.info
retention-days: 7
# ====================================================================
# 3. CTS — Enhanced Vision
# ====================================================================
cts-enhanced-vision:
needs: build
runs-on: ubuntu-22.04
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: openvx-build
path: ${{ github.workspace }}
- name: Run CTS — Enhanced Vision
run: |
cd build-cts
export LD_LIBRARY_PATH=${{ env.INSTALL_PREFIX }}/Linux/x64/Debug/lib
export VX_TEST_DATA_PATH=${{ github.workspace }}/cts/test_data/
timeout 600 ./bin/vx_test_conformance \
--filter="Graph/Conv*:Graph/HoG*:Graph/Nonmax*:Graph/HoughLinesP*:Graph/Weighted*" \
--verbose || true
# ====================================================================
# 4. CTS — Neural Networks
# ====================================================================
cts-neural-networks:
needs: build
runs-on: ubuntu-22.04
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: openvx-build
path: ${{ github.workspace }}
- name: Run CTS — Neural Networks
run: |
cd build-cts
export LD_LIBRARY_PATH=${{ env.INSTALL_PREFIX }}/Linux/x64/Debug/lib
timeout 600 ./bin/vx_test_conformance \
--filter="TensorNetworks.*:*NN*:VxKernelOfNNAndNNEF.*:VxParameterOfNNAndNNEF.*:MetaFormatOfNNAndNNEF.*:UserKernelsOfNNAndNNEF.*" \
--verbose || true
# ====================================================================
# 5. CTS — Import / Export (IX)
# ====================================================================
cts-ix:
needs: build
runs-on: ubuntu-22.04
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: openvx-build
path: ${{ github.workspace }}
- name: Run CTS — Import/Export
run: |
cd build-cts
export LD_LIBRARY_PATH=${{ env.INSTALL_PREFIX }}/Linux/x64/Debug/lib
export VX_TEST_DATA_PATH=${{ github.workspace }}/cts/test_data/
timeout 600 ./bin/vx_test_conformance \
--filter="Graph/ExportImport*:*IX*" \
--verbose || true
# ====================================================================
# 6. CTS — Graph features (delay, ROI, callback, pipeline, streaming)
# ====================================================================
cts-graph-features:
needs: build
runs-on: ubuntu-22.04
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: openvx-build
path: ${{ github.workspace }}
- name: Run CTS — Graph Delay / ROI / Callbacks / Pipeline / Streaming
run: |
cd build-cts
export LD_LIBRARY_PATH=${{ env.INSTALL_PREFIX }}/Linux/x64/Debug/lib
export VX_TEST_DATA_PATH=${{ github.workspace }}/cts/test_data/
timeout 600 ./bin/vx_test_conformance \
--filter="GraphDelay.*:GraphROI.*:GraphCallback.*:GraphPipeline.*:GraphStreaming.*:GraphPipe*" \
--verbose || true
# ====================================================================
# 7. CTS — Data objects + User kernels
# ====================================================================
cts-data-objects:
needs: build
runs-on: ubuntu-22.04
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: openvx-build
path: ${{ github.workspace }}
- name: Run CTS — Data objects / Arrays / Scalars / Tensors
run: |
cd build-cts
export LD_LIBRARY_PATH=${{ env.INSTALL_PREFIX }}/Linux/x64/Debug/lib
export VX_TEST_DATA_PATH=${{ github.workspace }}/cts/test_data/
timeout 600 ./bin/vx_test_conformance \
--filter="Array.*:Image.*:Scalar.*:Matrix.*:Distribution.*:LUT.*:Remap.*:Tensor.*:ObjectArray.*:UserDataObject.*" \
--verbose || true
# ====================================================================
# 8. CTS — User-defined kernels
# ====================================================================
cts-user-kernels:
needs: build
runs-on: ubuntu-22.04
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: openvx-build
path: ${{ github.workspace }}
- name: Run CTS — User kernels / nodes
run: |
cd build-cts
export LD_LIBRARY_PATH=${{ env.INSTALL_PREFIX }}/Linux/x64/Debug/lib
export VX_TEST_DATA_PATH=${{ github.workspace }}/cts/test_data/
timeout 600 ./bin/vx_test_conformance \
--filter="UserNode.*:UserKernel.*" \
--verbose || true
# ====================================================================
# 9. Release build sanity check
# ====================================================================
build-release:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake
- name: Build (Release)
run: |
python3 Build.py \
--os=linux --arch=64 --conf=Release --build=true \
--conf_vision --enh_vision --conf_nn \
--nn --ix --pipelining --streaming --userdataobj