From d621efd0c58f106305b05d9000c826838c401a57 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Fri, 14 Jul 2023 18:28:27 +0300 Subject: [PATCH] Test Python bindings and typing with CUDA modules too. --- .../workflows/OCV-Contrib-PR-4.x-U20-Cuda.yaml | 15 +++++++++++++++ .../workflows/OCV-Contrib-PR-5.x-U20-Cuda.yaml | 15 +++++++++++++++ .github/workflows/OCV-PR-4.x-U20-Cuda.yaml | 15 ++++++++++++++- .github/workflows/OCV-PR-5.x-U20-Cuda.yaml | 15 ++++++++++++++- 4 files changed, 58 insertions(+), 2 deletions(-) diff --git a/.github/workflows/OCV-Contrib-PR-4.x-U20-Cuda.yaml b/.github/workflows/OCV-Contrib-PR-4.x-U20-Cuda.yaml index 21327c57..1e8b0631 100644 --- a/.github/workflows/OCV-Contrib-PR-4.x-U20-Cuda.yaml +++ b/.github/workflows/OCV-Contrib-PR-4.x-U20-Cuda.yaml @@ -20,6 +20,7 @@ env: TARGET_BRANCH_NAME: ${{ github.base_ref }} ANT_HOME: '/usr/share/ant' GIT_CACHE_DOCKER: '/home/ci/git_cache' + PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' OPENCV_CONTRIB_DOCKER_WORKDIR: '/home/ci/opencv_contrib' PARALLEL_JOBS: 8 @@ -223,3 +224,17 @@ jobs: run: cd $HOME/build && xvfb-run -a bin/opencv_perf_cudawarping --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --perf_threads=${{ env.PARALLEL_JOBS }} --gtest_filter=${{ env.GTEST_FILTER_STRING }} env: GTEST_FILTER_STRING: '-Sz_Depth_Cn_Inter_Rotate.Rotate/7:Sz_Depth_Cn_Inter_Rotate.Rotate/34:Sz_Depth_Cn_Inter_Rotate.Rotate/55' + - name: Python3 Bindings + timeout-minutes: 60 + if: ${{ always() && steps.build-opencv-contrib.outcome == 'success' }} + run: | + cd $HOME/build + python3 $HOME/opencv/modules/python/test/test.py --repo $HOME/opencv -v + - name: Python3 Apps + timeout-minutes: 60 + if: ${{ always() && steps.build-opencv-contrib.outcome == 'success' }} + run: | + cd $HOME/build + if [ -f "$HOME/opencv/apps/python_app_test.py" ]; then + python3 "$HOME/opencv/apps/python_app_test.py" --repo $HOME/opencv -v + fi diff --git a/.github/workflows/OCV-Contrib-PR-5.x-U20-Cuda.yaml b/.github/workflows/OCV-Contrib-PR-5.x-U20-Cuda.yaml index 8f81a526..9f1ac1ce 100644 --- a/.github/workflows/OCV-Contrib-PR-5.x-U20-Cuda.yaml +++ b/.github/workflows/OCV-Contrib-PR-5.x-U20-Cuda.yaml @@ -20,6 +20,7 @@ env: TARGET_BRANCH_NAME: ${{ github.base_ref }} ANT_HOME: '/usr/share/ant' GIT_CACHE_DOCKER: '/home/ci/git_cache' + PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' OPENCV_CONTRIB_DOCKER_WORKDIR: '/home/ci/opencv_contrib' PARALLEL_JOBS: 8 @@ -223,3 +224,17 @@ jobs: run: cd $HOME/build && xvfb-run -a bin/opencv_perf_cudawarping --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --perf_threads=${{ env.PARALLEL_JOBS }} --gtest_filter=${{ env.GTEST_FILTER_STRING }} env: GTEST_FILTER_STRING: '-Sz_Depth_Cn_Inter_Rotate.Rotate/7:Sz_Depth_Cn_Inter_Rotate.Rotate/34:Sz_Depth_Cn_Inter_Rotate.Rotate/55' + - name: Python3 Bindings + timeout-minutes: 60 + if: ${{ always() && steps.build-opencv-contrib.outcome == 'success' }} + run: | + cd $HOME/build + python3 $HOME/opencv/modules/python/test/test.py --repo $HOME/opencv -v + - name: Python3 Apps + timeout-minutes: 60 + if: ${{ always() && steps.build-opencv-contrib.outcome == 'success' }} + run: | + cd $HOME/build + if [ -f "$HOME/opencv/apps/python_app_test.py" ]; then + python3 "$HOME/opencv/apps/python_app_test.py" --repo $HOME/opencv -v + fi diff --git a/.github/workflows/OCV-PR-4.x-U20-Cuda.yaml b/.github/workflows/OCV-PR-4.x-U20-Cuda.yaml index 5649cb7f..0b49d034 100644 --- a/.github/workflows/OCV-PR-4.x-U20-Cuda.yaml +++ b/.github/workflows/OCV-PR-4.x-U20-Cuda.yaml @@ -13,13 +13,14 @@ concurrency: cancel-in-progress: true env: - EXTRA_CMAKE_OPTIONS: '-DBUILD_DOCS=ON -DPYTHON_DEFAULT_EXECUTABLE=/usr/bin/python3 -DOPENCV_DOWNLOAD_PATH=/home/ci/binaries_cache -DBUILD_EXAMPLES=ON -DOPENCV_ENABLE_NONFREE=ON -DWITH_CUDA=ON -DBUILD_LIST=dnn,cudev,ts -DCUDA_ARCH_BIN=6.1 -DWITH_VA=OFF' + EXTRA_CMAKE_OPTIONS: '-DBUILD_DOCS=ON -DPYTHON_DEFAULT_EXECUTABLE=/usr/bin/python3 -DOPENCV_DOWNLOAD_PATH=/home/ci/binaries_cache -DBUILD_EXAMPLES=ON -DOPENCV_ENABLE_NONFREE=ON -DWITH_CUDA=ON -DBUILD_LIST=dnn,cudev,ts,python3 -DCUDA_ARCH_BIN=6.1 -DWITH_VA=OFF' PR_AUTHOR: ${{ github.event.pull_request.user.login }} PR_AUTHOR_FORK: ${{ github.event.pull_request.head.repo.full_name }} SOURCE_BRANCH_NAME: ${{ github.head_ref }} TARGET_BRANCH_NAME: ${{ github.base_ref }} ANT_HOME: '/usr/share/ant' GIT_CACHE_DOCKER: '/home/ci/git_cache' + PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' OPENCV_DOCKER_WORKDIR: '/home/ci/opencv' DNN_MODELS: '/home/ci/dnn-models' @@ -139,3 +140,15 @@ jobs: run: cd $HOME/build && xvfb-run -a bin/opencv_test_dnn --test_threads=${{ env.PARALLEL_JOBS }} --gtest_filter=${{ env.GTEST_FILTER_STRING }} ${{ env.EXTRA_GTEST_OPTIONS }} env: GTEST_FILTER_STRING: '-Test_Model.TextRecognition/0:Test_Model.TextRecognition/1:Test_Model.TextRecognitionWithCTCPrefixBeamSearch/0:Test_Model.TextRecognitionWithCTCPrefixBeamSearch/1:Test_ONNX_layers.Convolution3D/1:Test_ONNX_layers.Convolution3D_bias/1:Test_ONNX_layers.Shape/0:Test_ONNX_layers.Shape/1:Test_ONNX_layers.Power/0:Test_ONNX_layers.Power/1:Test_ONNX_layers.Elementwise_Log/0:Test_ONNX_layers.Elementwise_Log/1:Test_ONNX_layers.Elementwise_not/0:Test_ONNX_layers.Elementwise_not/1:Test_ONNX_layers.Compare_EQ/0:Test_ONNX_layers.Compare_EQ/1:Test_ONNX_layers.Compare_GT/0:Test_ONNX_layers.Compare_GT/1:Test_ONNX_layers.Compare_LT/0:Test_ONNX_layers.Compare_LT/1:Test_ONNX_layers.Compare_GTorEQ/0:Test_ONNX_layers.Compare_GTorEQ/1:Test_ONNX_layers.Compare_LEorEQ/0:Test_ONNX_layers.Compare_LEorEQ/1:Test_ONNX_layers.Eltwise3D/0:Test_ONNX_layers.Eltwise3D/1:Test_ONNX_layers.PoolConv3D/1:Test_ONNX_layers.Div/0:Test_ONNX_layers.Div/1:Test_ONNX_layers.Split/0:Test_ONNX_layers.Split/1:Test_ONNX_layers.SubFromConst/0:Test_ONNX_layers.SubFromConst/1:Test_TensorFlow_layers.Convolution3D/1:Test_TensorFlow_layers.concat_3d/1:Test_ONNX_layers.LSTM_Activations/0:Test_ONNX_nets.LResNet100E_IR/1:Test_ONNX_nets.Emotion_ferplus/0:Test_ONNX_nets.Emotion_ferplus/1:Test_ONNX_nets.Resnet34_kinetics/1' + - name: Python3 Bindings + timeout-minutes: 60 + run: | + cd $HOME/build + python3 $HOME/opencv/modules/python/test/test.py --repo $HOME/opencv -v + - name: Python3 Apps + timeout-minutes: 60 + run: | + cd $HOME/build + if [ -f "$HOME/opencv/apps/python_app_test.py" ]; then + python3 "$HOME/opencv/apps/python_app_test.py" --repo $HOME/opencv -v + fi diff --git a/.github/workflows/OCV-PR-5.x-U20-Cuda.yaml b/.github/workflows/OCV-PR-5.x-U20-Cuda.yaml index f8958715..57d32d41 100644 --- a/.github/workflows/OCV-PR-5.x-U20-Cuda.yaml +++ b/.github/workflows/OCV-PR-5.x-U20-Cuda.yaml @@ -13,13 +13,14 @@ concurrency: cancel-in-progress: true env: - EXTRA_CMAKE_OPTIONS: '-DBUILD_DOCS=ON -DPYTHON_DEFAULT_EXECUTABLE=/usr/bin/python3 -DOPENCV_DOWNLOAD_PATH=/home/ci/binaries_cache -DBUILD_EXAMPLES=ON -DOPENCV_ENABLE_NONFREE=ON -DWITH_CUDA=ON -DBUILD_LIST=dnn,cudev,ts -DCUDA_ARCH_BIN=6.1 -DWITH_VA=OFF' + EXTRA_CMAKE_OPTIONS: '-DBUILD_DOCS=ON -DPYTHON_DEFAULT_EXECUTABLE=/usr/bin/python3 -DOPENCV_DOWNLOAD_PATH=/home/ci/binaries_cache -DBUILD_EXAMPLES=ON -DOPENCV_ENABLE_NONFREE=ON -DWITH_CUDA=ON -DBUILD_LIST=dnn,cudev,ts,python3 -DCUDA_ARCH_BIN=6.1 -DWITH_VA=OFF' PR_AUTHOR: ${{ github.event.pull_request.user.login }} PR_AUTHOR_FORK: ${{ github.event.pull_request.head.repo.full_name }} SOURCE_BRANCH_NAME: ${{ github.head_ref }} TARGET_BRANCH_NAME: ${{ github.base_ref }} ANT_HOME: '/usr/share/ant' GIT_CACHE_DOCKER: '/home/ci/git_cache' + PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' OPENCV_DOCKER_WORKDIR: '/home/ci/opencv' DNN_MODELS: '/home/ci/dnn-models' @@ -139,3 +140,15 @@ jobs: run: cd $HOME/build && xvfb-run -a bin/opencv_test_dnn --test_threads=${{ env.PARALLEL_JOBS }} --gtest_filter=${{ env.GTEST_FILTER_STRING }} ${{ env.EXTRA_GTEST_OPTIONS }} env: GTEST_FILTER_STRING: '-Test_Model.TextRecognition/0:Test_Model.TextRecognition/1:Test_Model.TextRecognitionWithCTCPrefixBeamSearch/0:Test_Model.TextRecognitionWithCTCPrefixBeamSearch/1:Test_ONNX_layers.Convolution3D/1:Test_ONNX_layers.Convolution3D_bias/1:Test_ONNX_layers.Shape/0:Test_ONNX_layers.Shape/1:Test_ONNX_layers.Power/0:Test_ONNX_layers.Power/1:Test_ONNX_layers.Elementwise_Log/0:Test_ONNX_layers.Elementwise_Log/1:Test_ONNX_layers.Elementwise_not/0:Test_ONNX_layers.Elementwise_not/1:Test_ONNX_layers.Compare_EQ/0:Test_ONNX_layers.Compare_EQ/1:Test_ONNX_layers.Compare_GT/0:Test_ONNX_layers.Compare_GT/1:Test_ONNX_layers.Compare_LT/0:Test_ONNX_layers.Compare_LT/1:Test_ONNX_layers.Compare_GTorEQ/0:Test_ONNX_layers.Compare_GTorEQ/1:Test_ONNX_layers.Compare_LEorEQ/0:Test_ONNX_layers.Compare_LEorEQ/1:Test_ONNX_layers.Eltwise3D/0:Test_ONNX_layers.Eltwise3D/1:Test_ONNX_layers.PoolConv3D/1:Test_ONNX_layers.Div/0:Test_ONNX_layers.Div/1:Test_ONNX_layers.Split/0:Test_ONNX_layers.Split/1:Test_ONNX_layers.SubFromConst/0:Test_ONNX_layers.SubFromConst/1:Test_TensorFlow_layers.Convolution3D/1:Test_TensorFlow_layers.concat_3d/1:Test_ONNX_layers.LSTM_Activations/0:Test_ONNX_nets.LResNet100E_IR/1:Test_ONNX_nets.Emotion_ferplus/0:Test_ONNX_nets.Emotion_ferplus/1:Test_ONNX_nets.Resnet34_kinetics/1' + - name: Python3 Bindings + timeout-minutes: 60 + run: | + cd $HOME/build + python3 $HOME/opencv/modules/python/test/test.py --repo $HOME/opencv -v + - name: Python3 Apps + timeout-minutes: 60 + run: | + cd $HOME/build + if [ -f "$HOME/opencv/apps/python_app_test.py" ]; then + python3 "$HOME/opencv/apps/python_app_test.py" --repo $HOME/opencv -v + fi