Skip to content

GitHub - workflow updates #33

GitHub - workflow updates

GitHub - workflow updates #33

Workflow file for this run

name: OpenVX Conformance Tests
# Two-stage pipeline modelled on the rustVX CI:
# Stage 1 (build) -- build the sample implementation once (Debug + Release,
# full feature set) and build the Conformance Test Suite
# against the Debug build. Both build jobs must pass. The
# Debug build + CTS binary + test data are uploaded as a
# single self-contained artifact.
# Stage 2 (test) -- many granular jobs, each downloads the artifact and runs
# one filtered slice of the conformance suite. No rebuilds.
# Runs on pull requests and on every branch.
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
env:
OPENVX_DIR: ${{ github.workspace }}/install/Linux/x64/Debug
VX_TEST_DATA_PATH: ${{ github.workspace }}/cts/test_data/
# Full feature set built into a single library so one build serves every test.
# NNEF is included; the bundled NNEF-Tools submodule uses std::numeric_limits
# without including <limits>, so it is force-included for the C++ compile.
OPENVX_FEATURES: >-
-DOPENVX_CONFORMANCE_VISION=ON
-DOPENVX_USE_ENHANCED_VISION=ON
-DOPENVX_CONFORMANCE_NEURAL_NETWORKS=ON
-DOPENVX_CONFORMANCE_NNEF_IMPORT=ON
-DOPENVX_USE_NN=ON
-DOPENVX_USE_IX=ON
-DOPENVX_USE_U1=ON
-DOPENVX_USE_USER_DATA_OBJECT=ON
-DOPENVX_USE_PIPELINING=ON
-DOPENVX_USE_STREAMING=ON
jobs:
# ================================================================
# Stage 1 — Build sample (Debug) + Conformance Test Suite
# ================================================================
build:
name: Build Sample (Debug) + CTS
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq cmake make git python3 gcc g++
- name: Build & install sample (Debug)
run: |
mkdir -p build/Linux/x64/Debug && cd build/Linux/x64/Debug
cmake "$GITHUB_WORKSPACE" \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="$OPENVX_DIR" \
-DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_LIBDIR=bin \
-DBUILD_X64=1 \
-DCMAKE_CXX_FLAGS="-include limits" \
$OPENVX_FEATURES
make install -j$(nproc)
- name: Reduce pipeline stress loop counts for CI
run: |
# The GraphPipeline stress tests default to loop_count up to 1000000,
# which does not finish on CI runners. Reduce to 100 (longest strings
# first to avoid partial-match issues), matching the rustVX CI.
sed -i \
-e 's|loop_count=1000000|loop_count=100|g' \
-e 's|loop_count=100000|loop_count=100|g' \
-e 's|loop_count=1000|loop_count=100|g' \
cts/test_conformance/test_graph_pipeline.c || true
- name: Build Conformance Test Suite
run: |
rm -rf "$GITHUB_WORKSPACE/build-cts" && mkdir -p "$GITHUB_WORKSPACE/build-cts" && cd "$GITHUB_WORKSPACE/build-cts"
cmake \
-DOPENVX_INCLUDES="$OPENVX_DIR/include" \
-DOPENVX_LIBRARIES="$OPENVX_DIR/bin/libopenvx.so;$OPENVX_DIR/bin/libvxu.so;$OPENVX_DIR/bin/libnnef-lib.a;pthread;dl;m;rt;stdc++" \
-DCMAKE_C_FLAGS="-I$GITHUB_WORKSPACE/kernels/NNEF-Tools/parser/cpp/include" \
$OPENVX_FEATURES \
"$GITHUB_WORKSPACE/cts/"
cmake --build . -j$(nproc)
- name: Upload conformance artifact
uses: actions/upload-artifact@v4
with:
name: openvx-conformance
# Self-contained: CTS binary + built test modules (build-cts),
# the installed OpenVX libraries, and the test data.
path: |
build-cts/
install/Linux/x64/Debug/
cts/test_data/
retention-days: 1
# ================================================================
# Stage 1 — Build sample (Release) — build gate only
# ================================================================
build-release:
name: Build Sample (Release)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq cmake make git python3 gcc g++
- name: Build & install sample (Release)
run: |
mkdir -p build/Linux/x64/Release && cd build/Linux/x64/Release
cmake "$GITHUB_WORKSPACE" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install/Linux/x64/Release" \
-DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_LIBDIR=bin \
-DBUILD_X64=1 \
-DCMAKE_CXX_FLAGS="-include limits" \
$OPENVX_FEATURES
make install -j$(nproc)
- name: Upload Release install artifact
uses: actions/upload-artifact@v4
with:
name: openvx-release
path: install/Linux/x64/Release
retention-days: 1
# ================================================================
# Stage 2 — Conformance test slices (need both Stage 1 builds)
# ================================================================
baseline:
name: Baseline / smoke
needs: [build, build-release]
runs-on: ubuntu-22.04
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run baseline tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 300 ./bin/vx_test_conformance --filter="GraphBase.*:Logging.*:SmokeTestBase.*:SmokeTest.*:TargetBase.*:Target.*"
graph:
name: Graph (delay / ROI / callback / user node)
needs: [build, build-release]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run graph tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 600 ./bin/vx_test_conformance --filter="Graph.*:GraphCallback.*:GraphDelay.*:GraphROI.*:UserNode.*:-GraphPipeline.*:-GraphStreaming.*"
data-objects:
name: Data objects
needs: [build, build-release]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run data object tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 300 ./bin/vx_test_conformance --filter="Scalar.*:Array.*:ObjectArray.*:Matrix.*:Convolution.*:Distribution.*:LUT.*:Histogram.*"
user-data-object:
name: "KHR extension: user-data-object"
needs: [build, build-release]
runs-on: ubuntu-22.04
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run User Data Object tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 120 ./bin/vx_test_conformance --filter="UserDataObject.*"
user-kernels:
name: User kernels / nodes
needs: [build, build-release]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run user kernel tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 300 ./bin/vx_test_conformance --filter="UserNode.*:UserKernel.*"
import-export:
name: "KHR extension: import/export (IX)"
needs: [build, build-release]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run Import/Export tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 600 ./bin/vx_test_conformance --filter="Graph/ExportImport*:*IX*"
# ================================================================
# Pipelining (implemented on ToT) — fast + stress slices
# ================================================================
pipelining-fast:
name: "KHR extension: pipelining fast"
needs: [build, build-release]
runs-on: ubuntu-22.04
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run pipelining fast tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 900 ./bin/vx_test_conformance --filter="GraphPipeline.*:-*loop_count=100*"
pipelining-stress:
name: "KHR extension: pipelining stress"
needs: [build, build-release]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run pipelining stress tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 1200 ./bin/vx_test_conformance --filter="GraphPipeline.*loop_count=100*"
# ================================================================
# Streaming — still a stub in this repo (VX_ERROR_NOT_IMPLEMENTED),
# so these are allowed to fail and surface as warnings.
# ================================================================
streaming:
name: "KHR extension: streaming (warning only)"
needs: [build, build-release]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run streaming tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
if ! LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 900 ./bin/vx_test_conformance --filter="GraphStreaming.*"; then
echo "::warning title=Streaming conformance::GraphStreaming.* tests failed — Streaming extension is still a stub (VX_ERROR_NOT_IMPLEMENTED)."
fi
# ================================================================
# Neural Networks — AlexNet test needs weights not shipped in
# test_data, so this is allowed to fail.
# ================================================================
neural-networks:
name: Neural Networks
needs: [build, build-release]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run Neural Network tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 600 ./bin/vx_test_conformance --filter="TensorNetworks.*:-TensorNetworks.AlexNetTestNetwork:*NN*:VxKernelOfNNAndNNEF.*:VxParameterOfNNAndNNEF.*:MetaFormatOfNNAndNNEF.*:UserKernelsOfNNAndNNEF.*"
nnef-import:
name: "KHR extension: NNEF import"
needs: [build, build-release]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run NNEF import tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 600 ./bin/vx_test_conformance --filter="*NNEF*"
# ================================================================
# Vision — functional groups (mirrors rustVX)
# ================================================================
vision-color:
name: "Vision: color / channel"
needs: [build, build-release]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run color / channel tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 300 ./bin/vx_test_conformance --filter="ColorConvert.*:ChannelExtract.*:ChannelCombine.*:vxConvertDepth.*:vxuConvertDepth.*"
vision-filters:
name: "Vision: filters / morphology"
needs: [build, build-release]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run filter / morphology tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 600 ./bin/vx_test_conformance --filter="Box3x3.*:Gaussian3x3.*:Median3x3.*:Dilate3x3.*:Erode3x3.*:Sobel3x3.*:Magnitude.*:Phase.*:NonLinearFilter.*:Convolve.*:EqualizeHistogram.*"
vision-arithmetic:
name: "Vision: arithmetic / bitwise"
needs: [build, build-release]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run arithmetic / bitwise tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 600 ./bin/vx_test_conformance --filter="vxAddSub.*:vxuAddSub.*:vxMultiply.*:vxuMultiply.*:vxBinOp8u.*:vxuBinOp8u.*:vxBinOp16s.*:vxuBinOp16s.*:vxNot.*:vxuNot.*:WeightedAverage.*:Threshold.*"
vision-geometric:
name: "Vision: geometric transforms"
needs: [build, build-release]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run geometric transform tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 600 ./bin/vx_test_conformance --filter="Scale.*:WarpAffine.*:WarpPerspective.*:Remap.*:HalfScaleGaussian.*"
vision-features:
name: "Vision: features / edges"
needs: [build, build-release]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run feature / edge detection tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 600 ./bin/vx_test_conformance --filter="HarrisCorners.*:FastCorners.*:vxCanny.*:vxuCanny.*"
vision-statistics:
name: "Vision: statistics"
needs: [build, build-release]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run statistics tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 300 ./bin/vx_test_conformance --filter="MeanStdDev.*:MinMaxLoc.*:Integral.*"
vision-image-ops:
name: "Vision: image ops"
needs: [build, build-release]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run image operation tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 600 ./bin/vx_test_conformance --filter="Image.*:vxCopyImagePatch.*:vxMapImagePatch.*:vxCreateImageFromChannel.*:vxCopyRemapPatch.*:vxMapRemapPatch.*"
vision-pyramid:
name: "Vision: pyramid / optical flow"
needs: [build, build-release]
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run pyramid / optical flow tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 300 ./bin/vx_test_conformance --filter="GaussianPyramid.*:LaplacianPyramid.*:LaplacianReconstruct.*:OptFlowPyrLK.*"
# ================================================================
# Enhanced Vision — functional groups (mirrors rustVX)
# ================================================================
enhanced-vision-tensor-arithmetic:
name: "Enhanced-Vision: Tensor Arithmetic"
needs: [build, build-release]
runs-on: ubuntu-22.04
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run Tensor Arithmetic tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 600 ./bin/vx_test_conformance --filter="TensorOp.*:Min.*:Max.*"
enhanced-vision-tensor-transforms:
name: "Enhanced-Vision: Tensor Transforms"
needs: [build, build-release]
runs-on: ubuntu-22.04
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run Tensor Transforms tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 300 ./bin/vx_test_conformance --filter="Tensor*.*:-TensorOp.*"
enhanced-vision-feature-extraction:
name: "Enhanced-Vision: Feature Extraction"
needs: [build, build-release]
runs-on: ubuntu-22.04
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run Feature Extraction tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 300 ./bin/vx_test_conformance --filter="HogCells.*:HogFeatures.*:MatchTemplate.*:LBP.*"
enhanced-vision-post-processing:
name: "Enhanced-Vision: Post-Processing"
needs: [build, build-release]
runs-on: ubuntu-22.04
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run Post-Processing tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 300 ./bin/vx_test_conformance --filter="Copy.*:Nonmaxsuppression.*:Houghlinesp.*"
enhanced-vision-advanced-filtering:
name: "Enhanced-Vision: Advanced Filtering"
needs: [build, build-release]
runs-on: ubuntu-22.04
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run Advanced Filtering tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 300 ./bin/vx_test_conformance --filter="BilateralFilter.*"
enhanced-vision-control-flow:
name: "Enhanced-Vision: Control Flow"
needs: [build, build-release]
runs-on: ubuntu-22.04
steps:
- name: Download conformance artifact
uses: actions/download-artifact@v4
with:
name: openvx-conformance
- name: Run Control Flow tests
run: |
cd build-cts && chmod +x bin/vx_test_conformance
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 120 ./bin/vx_test_conformance --filter="ControlFlow.SelectNode*"
LD_LIBRARY_PATH="$OPENVX_DIR/bin:./lib" \
timeout 300 ./bin/vx_test_conformance --filter="ControlFlow.ScalarOperationNode*"