-
Notifications
You must be signed in to change notification settings - Fork 185
Enable 'make build' testing in CI + add small fixed to opencv.cmake, rdkafka.cmake and build documentation #518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 15 commits
2dbd69c
330de18
6f67c1b
5f53568
4e08ccd
271f049
05fad4a
13aca18
cac3d18
058127b
b78e040
b5774db
131cfcd
5572621
45fd0dd
3843499
e6fc478
2f0fef1
b5ea602
fd99f30
ab45533
0f9319d
a9acdc3
b20f3b7
cdd8339
3e39f04
d8f4323
70aef07
6c7227d
7a80165
6eeced6
c0a7e5a
d47d509
6adbcf4
0b2e8ae
682bedc
4fe0127
8befa5b
962c150
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,178 @@ | ||
| name: "[DLS] [U22/24] Build from sources using make build" | ||
| run-name: "[DLS] [U22/24] Build from sources using make build (by ${{ github.actor }})" | ||
| on: | ||
| workflow_call: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: {} | ||
| env: | ||
| dlstreamer-version: "2025.2.0" | ||
| DLS_REL_PATH: "./dlstreamer-repo" | ||
|
|
||
| jobs: | ||
| build: | ||
| name: "Build from sources using make build on ${{ matrix.ubuntu_version }}" | ||
| runs-on: ${{ matrix.os }} | ||
| permissions: | ||
| contents: read | ||
| packages: read | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - os: ubuntu-22.04 | ||
| ubuntu_version: ubuntu22 | ||
| - os: ubuntu-24.04 | ||
| ubuntu_version: ubuntu24 | ||
| steps: | ||
| - name: Initial environment clean | ||
| run: | | ||
| sudo rm -rf dlstreamer-repo | ||
| - name: Check out dlstreamer repository | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| path: dlstreamer-repo | ||
|
|
||
| - name: Init submodules | ||
| run: | | ||
| cd dlstreamer-repo | ||
| git submodule update --init thirdparty/spdlog | ||
| # ======================================================== BUILDING PART ======================================================== | ||
| - name: Install prerequisites | ||
| run: | | ||
| cd ${{ env.DLS_REL_PATH }}/scripts | ||
| ./DLS_install_prerequisites.sh | ||
| - name: Install build dependencies | ||
| run: | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Optional: maybe it's good idea to make a script similar to DLS_install_prerequisites.sh, for example DLS_install_build_dependecies.sh |
||
| echo "Installing build dependencies for ${{ matrix.ubuntu_version }}" | ||
| if [[ ${{ matrix.ubuntu_version }} == "ubuntu22" ]]; then | ||
| echo "Executing Ubuntu 22.04 specific setup..." | ||
| sudo apt-get update && \ | ||
| sudo apt-get install -y wget curl vainfo xz-utils python3-pip python3-gi gcc-multilib libglib2.0-dev \ | ||
| flex bison autoconf automake libtool libogg-dev make g++ libva-dev yasm libglx-dev libdrm-dev \ | ||
| python-gi-dev python3-dev unzip libgflags-dev \ | ||
| libgirepository1.0-dev libx265-dev libx264-dev libde265-dev gudev-1.0 libusb-1.0 nasm python3-venv \ | ||
| libcairo2-dev libxt-dev libgirepository1.0-dev libgles2-mesa-dev wayland-protocols libcurl4-openssl-dev \ | ||
| libssh2-1-dev cmake git valgrind numactl libvpx-dev libopus-dev libsrtp2-dev libxv-dev \ | ||
| linux-libc-dev libpmix2 libhwloc15 libhwloc-plugins libxcb1-dev libx11-xcb-dev \ | ||
| ffmpeg libpaho-mqtt-dev libpostproc-dev libavfilter-dev libavdevice-dev \ | ||
| libswscale-dev libswresample-dev libavutil-dev libavformat-dev libavcodec-dev libxml2-dev ocl-icd-opencl-dev \ | ||
| opencl-headers | ||
| elif [[ ${{ matrix.ubuntu_version }} == "ubuntu24" ]]; then | ||
| echo "Executing Ubuntu 24.04 specific setup..." | ||
| sudo apt-get update && \ | ||
| sudo apt-get install -y wget curl vainfo xz-utils python3-pip python3-gi gcc-multilib libglib2.0-dev \ | ||
| flex bison autoconf automake libtool libogg-dev make g++ libva-dev yasm libglx-dev libdrm-dev \ | ||
| python-gi-dev python3-dev unzip libgflags-dev libcurl4-openssl-dev \ | ||
| libgirepository1.0-dev libx265-dev libx264-dev libde265-dev gudev-1.0 libusb-1.0 nasm python3-venv \ | ||
| libcairo2-dev libxt-dev libgirepository1.0-dev libgles2-mesa-dev wayland-protocols \ | ||
| libssh2-1-dev cmake git valgrind numactl libvpx-dev libopus-dev libsrtp2-dev libxv-dev \ | ||
| linux-libc-dev libpmix2t64 libhwloc15 libhwloc-plugins libxcb1-dev libx11-xcb-dev \ | ||
| ffmpeg libpaho-mqtt-dev libopencv-dev libpostproc-dev libavfilter-dev libavdevice-dev \ | ||
| libswscale-dev libswresample-dev libavutil-dev libavformat-dev libavcodec-dev libtbb12 libxml2-dev \ | ||
| ocl-icd-opencl-dev | ||
| else | ||
| echo "Unknown Ubuntu version: ${{ matrix.ubuntu_version }}" | ||
| exit 1 | ||
| fi | ||
| - name: Set up a Python environment | ||
| run: | | ||
| python3 -m venv ~/python3venv | ||
| source ~/python3venv/bin/activate | ||
| pip install --upgrade pip==24.0 | ||
| pip install meson==1.4.1 ninja==1.11.1.1 | ||
| - name: Install OpenVINO | ||
| run: | | ||
| cd ${{ env.DLS_REL_PATH }} | ||
| echo "Installing OpenVINO..." | ||
| sudo ./scripts/install_dependencies/install_openvino.sh | ||
| echo " " | ||
| echo "Installing OpenVINO dependencies..." | ||
| sudo -E /opt/intel/openvino_2025/install_dependencies/install_openvino_dependencies.sh | ||
| - name: Install OpenVINO GenAI | ||
| run: | | ||
| cd ${{ env.DLS_REL_PATH }} | ||
| echo "Installing OpenVINO GenAI for ${{ matrix.ubuntu_version }}..." | ||
| if [[ ${{ matrix.ubuntu_version }} == "ubuntu22" ]]; then | ||
| echo "Executing Ubuntu 22.04 specific setup..." | ||
| curl -L https://storage.openvinotoolkit.org/repositories/openvino_genai/packages/2025.4/linux/openvino_genai_ubuntu22_2025.4.0.0_x86_64.tar.gz | tar -xz | ||
| mv openvino_genai_ubuntu22_2025.4.0.0_x86_64 /opt/intel/openvino_genai | ||
| source /opt/intel/openvino_genai/setupvars.sh | ||
| elif [[ ${{ matrix.ubuntu_version }} == "ubuntu24" ]]; then | ||
| echo "Executing Ubuntu 24.04 specific setup..." | ||
| curl -L https://storage.openvinotoolkit.org/repositories/openvino_genai/packages/2025.4/linux/openvino_genai_ubuntu24_2025.4.0.0_x86_64.tar.gz | tar -xz | ||
| sudo mv openvino_genai_ubuntu24_2025.4.0.0_x86_64 /opt/intel/openvino_genai | ||
| source /opt/intel/openvino_genai/setupvars.sh | ||
| else | ||
| echo "Unknown Ubuntu version: ${{ matrix.ubuntu_version }}" | ||
| exit 1 | ||
| fi | ||
| - name: Build DL Streamer using make build | ||
| run: | | ||
| echo "Activating Python virtual environment..." | ||
| source ~/python3venv/bin/activate | ||
| cd ${{ env.DLS_REL_PATH }} | ||
| echo " " | ||
| echo "Sourcing OpenVINO environment..." | ||
| source /opt/intel/openvino_2025/setupvars.sh | ||
| echo " " | ||
| echo "Sourcing OpenVINO GenAI environment..." | ||
| source /opt/intel/openvino_genai/setupvars.sh | ||
| echo " " | ||
| echo "Building DL Streamer using make build..." | ||
| make build | ||
| - name: Install DL Streamer | ||
| run: | | ||
| cd ${{ env.DLS_REL_PATH }} | ||
| sudo -E make install | ||
| - name: Install Python dependencies | ||
| run: | | ||
| sudo apt-get install -y -q --no-install-recommends gcc cmake python3-full python-gi-dev python3-dev python3-pip \ | ||
| libglib2.0-dev libcairo2-dev libopencv-objdetect-dev libopencv-photo-dev libopencv-stitching-dev libopencv-video-dev \ | ||
| libopencv-calib3d-dev libopencv-core-dev libopencv-dnn-dev libgirepository1.0-dev | ||
| source ~/python3venv/bin/activate | ||
| cd ${{ env.DLS_REL_PATH }} | ||
| python3 -m pip install -r requirements.txt | ||
| - name: Verify DL Streamer installation | ||
| run: | | ||
| echo "Setting up DL Streamer environment..." | ||
| export LIBVA_DRIVER_NAME=iHD | ||
| export GST_PLUGIN_PATH="/opt/intel/dlstreamer/Release/lib:/opt/intel/dlstreamer/gstreamer/lib/gstreamer-1.0:$GST_PLUGIN_PATH" | ||
| export LD_LIBRARY_PATH="/opt/intel/dlstreamer/Release/lib:/opt/intel/dlstreamer/gstreamer/lib:/opt/intel/dlstreamer/opencv/lib:/opt/intel/dlstreamer/rdkafka/lib:$LD_LIBRARY_PATH" | ||
| export LIBVA_DRIVERS_PATH="/usr/lib/x86_64-linux-gnu/dri" | ||
| export GST_VA_ALL_DRIVERS="1" | ||
| export PATH="/opt/intel/dlstreamer/Release/bin:/opt/intel/dlstreamer/gstreamer/bin:/opt/intel/dlstreamer/opencv/bin:$HOME/.local/bin:$HOME/python3venv/bin:$PATH" | ||
| export PKG_CONFIG_PATH="/opt/intel/dlstreamer/Release/lib/pkgconfig:/opt/intel/dlstreamer/gstreamer/lib/pkgconfig:$PKG_CONFIG_PATH" | ||
| export GST_PLUGIN_FEATURE_RANK=${GST_PLUGIN_FEATURE_RANK},ximagesink:MAX | ||
| export GI_TYPELIB_PATH="/opt/intel/dlstreamer/gstreamer/lib/girepository-1.0:/usr/lib/x86_64-linux-gnu/girepository-1.0gi" | ||
| export PYTHONPATH="/opt/intel/dlstreamer/gstreamer/lib/python3/dist-packages:/opt/intel/dlstreamer/python:/opt/intel/dlstreamer/gstreamer/lib/python3/dist-packages:$PYTHONPATH" | ||
| source ~/python3venv/bin/activate | ||
| echo "Verifying DL Streamer installation..." | ||
| gst-inspect-1.0 | grep gva | ||
| gst-inspect-1.0 gvadetect | ||
| gst-inspect-1.0 gvawatermark3d | ||
| gst-inspect-1.0 gvapython | ||
| gst-inspect-1.0 gvamotiondetect | ||
| gst-inspect-1.0 gvafpscounter | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you extend list about gvagenai as well ? |
||
| # ======================================================== CLEANUP PART ======================================================== | ||
| - name: Clean up | ||
| if: always() | ||
| run: | | ||
| rm -rf ~/python3venv | ||
| sudo rm -rf ${{ env.DLS_REL_PATH }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,31 +10,34 @@ include(ExternalProject) | |
| set(DESIRED_VERSION 4.12.0) | ||
|
|
||
| ExternalProject_Add( | ||
| opencv-contrib | ||
| PREFIX ${CMAKE_BINARY_DIR}/opencv-contrib | ||
| opencv_contrib | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only naming convention alignment |
||
| PREFIX ${CMAKE_BINARY_DIR}/opencv_contrib | ||
| URL https://github.com/opencv/opencv_contrib/archive/${DESIRED_VERSION}.zip | ||
| URL_MD5 2eecff53ebd74f6291108247d365cb61 | ||
| DOWNLOAD_EXTRACT_TIMESTAMP TRUE | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Eliminates warnigns |
||
| CONFIGURE_COMMAND "" | ||
| BUILD_COMMAND "" | ||
| INSTALL_COMMAND "" | ||
| TEST_COMMAND "" | ||
| ) | ||
|
|
||
| ExternalProject_Get_Property(opencv-contrib SOURCE_DIR) | ||
| ExternalProject_Get_Property(opencv_contrib SOURCE_DIR) | ||
| ExternalProject_Add( | ||
| opencv | ||
| PREFIX ${CMAKE_BINARY_DIR}/opencv | ||
| URL https://github.com/opencv/opencv/archive/${DESIRED_VERSION}.zip | ||
| URL_MD5 6bc2ed099ff31451242f37a5f2dac0cf | ||
| DOWNLOAD_EXTRACT_TIMESTAMP TRUE | ||
| CMAKE_GENERATOR Ninja | ||
| TEST_COMMAND "" | ||
| CMAKE_ARGS -DBUILD_TESTS=OFF | ||
| INSTALL_COMMAND ninja install | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing INSTALL_COMMAND |
||
| CMAKE_ARGS -DBUILD_TESTS=OFF | ||
| -DCMAKE_BUILD_TYPE=Release | ||
| -DOPENCV_GENERATE_PKGCONFIG=ON | ||
| -DBUILD_SHARED_LIBS=ON | ||
| -DBUILD_PERF_TESTS=OFF | ||
| -DBUILD_EXAMPLES=OFF | ||
| -DBUILD_opencv_apps=OFF | ||
| -DBUILD_PERF_TESTS=OFF | ||
| -DBUILD_EXAMPLES=OFF | ||
| -DBUILD_opencv_apps=OFF | ||
| -DOPENCV_EXTRA_MODULES_PATH=${SOURCE_DIR}/modules | ||
| -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/opencv-bin | ||
| -DWITH_VA=ON | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,11 +14,12 @@ ExternalProject_Add( | |
| PREFIX ${CMAKE_BINARY_DIR}/rdkafka | ||
| URL https://github.com/edenhill/librdkafka/archive/v${DESIRED_VERSION}.tar.gz | ||
| URL_MD5 86ed3acd2f9d9046250dea654cee59a8 | ||
| DOWNLOAD_EXTRACT_TIMESTAMP TRUE | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Eliminates warnigns |
||
| BUILD_IN_SOURCE 1 | ||
| BUILD_COMMAND make | ||
| INSTALL_COMMAND make install | ||
| TEST_COMMAND "" | ||
| CONFIGURE_COMMAND ./configure | ||
| CONFIGURE_COMMAND ./configure | ||
| --prefix=${CMAKE_BINARY_DIR}/rdkafka-bin | ||
| ) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,15 +22,15 @@ Follow the instructions in | |
|
|
||
| ```bash | ||
| sudo apt-get update && \ | ||
| sudo apt-get install -y wget vainfo xz-utils python3-pip python3-gi gcc-multilib libglib2.0-dev \ | ||
| sudo apt-get install -y wget curl vainfo xz-utils python3-pip python3-gi gcc-multilib libglib2.0-dev \ | ||
|
||
| flex bison autoconf automake libtool libogg-dev make g++ libva-dev yasm libglx-dev libdrm-dev \ | ||
| python-gi-dev python3-dev unzip libgflags-dev libcurl4-openssl-dev \ | ||
| libgirepository1.0-dev libx265-dev libx264-dev libde265-dev gudev-1.0 libusb-1.0 nasm python3-venv \ | ||
| libcairo2-dev libxt-dev libgirepository1.0-dev libgles2-mesa-dev wayland-protocols \ | ||
| libssh2-1-dev cmake git valgrind numactl libvpx-dev libopus-dev libsrtp2-dev libxv-dev \ | ||
| linux-libc-dev libpmix2t64 libhwloc15 libhwloc-plugins libxcb1-dev libx11-xcb-dev \ | ||
| ffmpeg libpaho-mqtt-dev libopencv-dev libpostproc-dev libavfilter-dev libavdevice-dev \ | ||
| libswscale-dev libswresample-dev libavutil-dev libavformat-dev libavcodec-dev libtbb12 libxml2-dev libopencv-dev \ | ||
| libswscale-dev libswresample-dev libavutil-dev libavformat-dev libavcodec-dev libtbb12 libxml2-dev \ | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| ocl-icd-opencl-dev | ||
| ``` | ||
|
|
||
|
|
@@ -40,7 +40,7 @@ Follow the instructions in | |
|
|
||
| ```bash | ||
| sudo apt-get update && \ | ||
| sudo apt-get install -y wget vainfo xz-utils python3-pip python3-gi gcc-multilib libglib2.0-dev \ | ||
| sudo apt-get install -y wget curl vainfo xz-utils python3-pip python3-gi gcc-multilib libglib2.0-dev \ | ||
| flex bison autoconf automake libtool libogg-dev make g++ libva-dev yasm libglx-dev libdrm-dev \ | ||
| python-gi-dev python3-dev unzip libgflags-dev \ | ||
| libgirepository1.0-dev libx265-dev libx264-dev libde265-dev gudev-1.0 libusb-1.0 nasm python3-venv \ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need 2 similar variables? i think we can only use "os"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One is used for
runs-on, the second for printing in logs etc.Technically, there can be only one.