Skip to content

ci: rewrite GHA workflow — unified build + stage-based test runs + co… #3

ci: rewrite GHA workflow — unified build + stage-based test runs + co…

ci: rewrite GHA workflow — unified build + stage-based test runs + co… #3

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 + all extensions + coverage)
# + build CTS once with all conformance/extension flags
# ====================================================================
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 + all extensions + coverage)
run: |
python3 Build.py \
--os=linux --arch=64 --conf=Debug --build=true \
--conf_vision \
--enh_vision \
--conf_nn \
--conf_nnef \
--nn \
--ix \
--pipelining \
--streaming \
--userdataobj \
--c_flags="-fprofile-arcs -ftest-coverage" \
--cpp_flags="-fprofile-arcs -ftest-coverage"
- name: Build CTS (all conformance + extensions)
run: |
mkdir -p build-cts
cd build-cts
cmake \
-DOPENVX_INCLUDES="${{ env.INSTALL_PREFIX }}/Linux/x64/Debug/include" \
-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_CONFORMANCE_NNEF_IMPORT=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: List compiled test names
run: |
export LD_LIBRARY_PATH=${{ env.INSTALL_PREFIX }}/Linux/x64/Debug/lib
cd build-cts
./bin/vx_test_conformance --list_tests 2>/dev/null | head -80 || true
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: openvx-build
path: |
${{ env.INSTALL_PREFIX }}/
build-cts/
retention-days: 1
# ====================================================================
# 2. Code coverage (runs CTS Vision + collects lcov)
# ====================================================================
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: Run CTS — Vision (baseline)
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="GraphBase.*:SmokeTestBase.*:SmokeTest.*:TargetBase.*:Target.*:Logging.*" \
--verbose || true
- name: Run CTS — Core kernels (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/vxNot*:Graph/vxuNot*:Graph/vxConvertDepth*:Graph/vxuConvertDepth*:Graph/ChannelCombine*:Graph/ChannelExtract*:Graph/Gaussian3x3*:Graph/Box3x3*:Graph/Median3x3*:Graph/Erode3x3*:Graph/Dilate3x3*:Graph/Convolve*:Graph/Sobel3x3*:Graph/HarrisCorners*:Graph/FAST*:Graph/OptFlowPyrLK*:Graph/Canny*:Graph/Histogram*:Graph/EqualizeHist*:Graph/Integral*:Graph/TableLookup*:Graph/MatchTemplate*:Graph/MeanStdDev*:Graph/Magnitude*:Graph/Phase*:Graph/Scale*:Graph/WarpAffine*:Graph/WarpPerspective*:Graph/LUT*:Graph/Remap*:Graph/BilateralFilter*:Graph/LBP*:Graph/NonLinearFilter*:Graph/GaussianPyramid*:Graph/LaplacianPyramid*:Graph/LaplacianReconstruct*:Graph/HalfScaleGaussian*:Graph/Threshold*:Graph/Accumulate*" \
--verbose || true
- name: Collect code-coverage data
run: |
lcov --directory . --capture --output-file coverage.info --ignore-errors inconsistent --ignore-errors mismatch
lcov --remove coverage.info '/usr/*' '${{ github.workspace }}/cts/*' --output-file coverage.info
lcov --list 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="*TensorNN*:TensorNetworks.*:*NN*" \
--verbose || true
# ====================================================================
# 5. CTS — NNEF Import
# ====================================================================
cts-nnef-import:
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 — NNEF Import
run: |
cd build-cts
export LD_LIBRARY_PATH=${{ env.INSTALL_PREFIX }}/Linux/x64/Debug/lib
timeout 600 ./bin/vx_test_conformance \
--filter="*NNEF*:*Nnef*" \
--verbose || true
# ====================================================================
# 6. 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="*Export*:Graph/ExportImport*:*IX*" \
--verbose || true
# ====================================================================
# 7. 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
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.*" \
--verbose || true
# ====================================================================
# 8. CTS — Pipelining + Streaming
# ====================================================================
cts-pipelining-streaming:
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 — Pipelining + 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="GraphPipeline.*:GraphStreaming.*:GraphPipe*" \
--verbose || true
# ====================================================================
# 9. 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
# ====================================================================
# 10. 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
# ====================================================================
# 11. 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 --conf_nnef \
--nn --ix --pipelining --streaming --userdataobj