Make project independent of OpenVX version and add CI #3
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout openvx-mark | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y cmake build-essential | |
| - name: Build Khronos OpenVX sample implementation | |
| run: | | |
| git clone --recursive --depth 1 https://github.com/KhronosGroup/OpenVX-sample-impl.git /tmp/openvx-sample | |
| cd /tmp/openvx-sample | |
| python Build.py --os=Linux --arch=64 --conf=Release | |
| - name: Find OpenVX libraries | |
| id: openvx | |
| run: | | |
| LIB_DIR=$(dirname $(find /tmp/openvx-sample -name "libopenvx.so" | head -1)) | |
| echo "lib_dir=$LIB_DIR" >> "$GITHUB_OUTPUT" | |
| echo "Found OpenVX libraries in: $LIB_DIR" | |
| ls -la "$LIB_DIR"/libopenvx* "$LIB_DIR"/libvxu* 2>/dev/null || true | |
| - name: Build openvx-mark | |
| run: | | |
| mkdir build && cd build | |
| cmake -DOPENVX_INCLUDES=/tmp/openvx-sample/api-docs/include \ | |
| -DOPENVX_LIB_DIR=${{ steps.openvx.outputs.lib_dir }} .. | |
| cmake --build . -j$(nproc) | |
| - name: Run openvx-mark | |
| run: | | |
| cd build | |
| export LD_LIBRARY_PATH=${{ steps.openvx.outputs.lib_dir }}:$LD_LIBRARY_PATH | |
| ./openvx-mark --resolution VGA --iterations 10 --warmup 3 |