From 100e51925552ec4ccc2ecaa97bf25edb75acc071 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Tue, 9 Jan 2024 15:02:18 +0300 Subject: [PATCH 1/4] Force OPENCV_TEST_REQUIRE_DATA in CI environments in 4.x --- .github/workflows/OCV-Contrib-PR-4.x-ARM64.yaml | 1 + .github/workflows/OCV-Contrib-PR-4.x-O22-CANN.yaml | 1 + .github/workflows/OCV-Contrib-PR-4.x-RISCV.yaml | 1 + .github/workflows/OCV-Contrib-PR-4.x-U20-Cuda.yaml | 1 + .github/workflows/OCV-Contrib-PR-4.x-U20.yaml | 1 + .github/workflows/OCV-Contrib-PR-4.x-U22.yaml | 1 + .github/workflows/OCV-Contrib-PR-4.x-W10.yaml | 1 + .github/workflows/OCV-Contrib-PR-4.x-macOS-ARM64.yaml | 1 + .github/workflows/OCV-Contrib-PR-4.x-macOS-x86_64.yaml | 1 + .github/workflows/OCV-PR-4.x-ARM64-Debug.yaml | 1 + .github/workflows/OCV-PR-4.x-ARM64.yaml | 1 + .github/workflows/OCV-PR-4.x-RISCV.yaml | 4 ++-- .github/workflows/OCV-PR-4.x-U20-Cuda.yaml | 1 + .github/workflows/OCV-PR-4.x-U20-OpenVINO.yaml | 1 + .github/workflows/OCV-PR-4.x-U20.yaml | 1 + .github/workflows/OCV-PR-4.x-U22.yaml | 1 + .github/workflows/OCV-PR-4.x-W10-Vulkan.yaml | 3 ++- .github/workflows/OCV-PR-4.x-W10.yaml | 1 + .github/workflows/OCV-PR-4.x-macOS-ARM64-Vulkan.yaml | 3 ++- .github/workflows/OCV-PR-4.x-macOS-ARM64.yaml | 1 + .github/workflows/OCV-PR-4.x-macOS-x86_64.yaml | 1 + 21 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/OCV-Contrib-PR-4.x-ARM64.yaml b/.github/workflows/OCV-Contrib-PR-4.x-ARM64.yaml index 31bd449a..75f78282 100644 --- a/.github/workflows/OCV-Contrib-PR-4.x-ARM64.yaml +++ b/.github/workflows/OCV-Contrib-PR-4.x-ARM64.yaml @@ -22,6 +22,7 @@ env: GIT_CACHE_DOCKER: '/home/ci/git_cache' PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_CONTRIB_DOCKER_WORKDIR: '/home/ci/opencv_contrib' DNN_MODELS: '/home/ci/dnn-models' GTEST_FILTER_STRING: '-tracking_GOTURN.GOTURN/*' diff --git a/.github/workflows/OCV-Contrib-PR-4.x-O22-CANN.yaml b/.github/workflows/OCV-Contrib-PR-4.x-O22-CANN.yaml index baec6a18..3512634b 100644 --- a/.github/workflows/OCV-Contrib-PR-4.x-O22-CANN.yaml +++ b/.github/workflows/OCV-Contrib-PR-4.x-O22-CANN.yaml @@ -20,6 +20,7 @@ env: TARGET_BRANCH_NAME: ${{ github.base_ref }} GIT_CACHE_DOCKER: '/home/ci/git_cache' OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_CONTRIB_DOCKER_WORKDIR: '/home/ci/opencv_contrib' PARALLEL_JOBS: 8 diff --git a/.github/workflows/OCV-Contrib-PR-4.x-RISCV.yaml b/.github/workflows/OCV-Contrib-PR-4.x-RISCV.yaml index cfa68269..ee9d4b92 100644 --- a/.github/workflows/OCV-Contrib-PR-4.x-RISCV.yaml +++ b/.github/workflows/OCV-Contrib-PR-4.x-RISCV.yaml @@ -22,6 +22,7 @@ env: GIT_CACHE_DOCKER: '/home/ci/git_cache' OPENCV_DOWNLOAD_PATH: '/home/ci/binaries_cache' OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_CONTRIB_DOCKER_WORKDIR: '/home/ci/opencv_contrib' OPENCV_DOCKER_WORKDIR: '/home/ci/opencv' PYTHONPATH: '/home/ci/build/python_loader:$PYTHONPATH' 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..eac8e340 100644 --- a/.github/workflows/OCV-Contrib-PR-4.x-U20-Cuda.yaml +++ b/.github/workflows/OCV-Contrib-PR-4.x-U20-Cuda.yaml @@ -21,6 +21,7 @@ env: ANT_HOME: '/usr/share/ant' GIT_CACHE_DOCKER: '/home/ci/git_cache' OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_CONTRIB_DOCKER_WORKDIR: '/home/ci/opencv_contrib' PARALLEL_JOBS: 8 diff --git a/.github/workflows/OCV-Contrib-PR-4.x-U20.yaml b/.github/workflows/OCV-Contrib-PR-4.x-U20.yaml index 090cc069..abe32eb0 100644 --- a/.github/workflows/OCV-Contrib-PR-4.x-U20.yaml +++ b/.github/workflows/OCV-Contrib-PR-4.x-U20.yaml @@ -22,6 +22,7 @@ env: GIT_CACHE_DOCKER: '/home/ci/git_cache' PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_CONTRIB_DOCKER_WORKDIR: '/home/ci/opencv_contrib' DNN_MODELS: '/home/ci/dnn-models' GTEST_FILTER_STRING: '-tracking_GOTURN.GOTURN/*' diff --git a/.github/workflows/OCV-Contrib-PR-4.x-U22.yaml b/.github/workflows/OCV-Contrib-PR-4.x-U22.yaml index f2d02f66..2a3767ef 100644 --- a/.github/workflows/OCV-Contrib-PR-4.x-U22.yaml +++ b/.github/workflows/OCV-Contrib-PR-4.x-U22.yaml @@ -22,6 +22,7 @@ env: GIT_CACHE_DOCKER: '/home/ci/git_cache' PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_CONTRIB_DOCKER_WORKDIR: '/home/ci/opencv_contrib' DNN_MODELS: '/home/ci/dnn-models' # GStreamer 1.20 distributed with Ubuntu 22.04 as bug in JPEG integration diff --git a/.github/workflows/OCV-Contrib-PR-4.x-W10.yaml b/.github/workflows/OCV-Contrib-PR-4.x-W10.yaml index a072d377..c5119878 100644 --- a/.github/workflows/OCV-Contrib-PR-4.x-W10.yaml +++ b/.github/workflows/OCV-Contrib-PR-4.x-W10.yaml @@ -19,6 +19,7 @@ env: SOURCE_BRANCH_NAME: ${{ github.head_ref }} TARGET_BRANCH_NAME: ${{ github.base_ref }} OPENCV_TEST_DATA_PATH: ${{ github.workspace }}\opencv_extra\testdata + OPENCV_TEST_REQUIRE_DATA: 1 GTEST_FILTER_STRING: '-Samples.findFile:videoio/videocapture_acceleration.read/122:videoio/videocapture_acceleration.read/126' DOWNLOAD_DNN_MODELS_FILE: 'download_models.py' diff --git a/.github/workflows/OCV-Contrib-PR-4.x-macOS-ARM64.yaml b/.github/workflows/OCV-Contrib-PR-4.x-macOS-ARM64.yaml index 17a8141a..72c9a517 100644 --- a/.github/workflows/OCV-Contrib-PR-4.x-macOS-ARM64.yaml +++ b/.github/workflows/OCV-Contrib-PR-4.x-macOS-ARM64.yaml @@ -21,6 +21,7 @@ env: ANT_HOME: '/usr/share/ant' PYTHONPATH: '${{ github.workspace }}/build/python_loader:$PYTHONPATH' OPENCV_TEST_DATA_PATH: '${{ github.workspace }}/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 GTEST_FILTER_STRING: '-GOTURN.memory_usage:DaSiamRPN.memory_usage:videoio_dynamic.basic_write:Tracking_Boosting.Boosting/0:Tracking_Boosting.Boosting/1:Tracking_Boosting.Boosting/2:Tracking_TLD.TLD/0:Tracking_TLD.TLD/1:Tracking_TLD.TLD/2:Tracking/DistanceAndOverlap.TLD/2:Tracking/DistanceAndOverlap.Scaled_Data_TLD/2:videoio/videocapture_acceleration.read/64:videoio/videocapture_acceleration.read/65:videoio/videocapture_acceleration.read/66:videoio/videocapture_acceleration.read/67' jobs: diff --git a/.github/workflows/OCV-Contrib-PR-4.x-macOS-x86_64.yaml b/.github/workflows/OCV-Contrib-PR-4.x-macOS-x86_64.yaml index 4efe4496..b52e6410 100644 --- a/.github/workflows/OCV-Contrib-PR-4.x-macOS-x86_64.yaml +++ b/.github/workflows/OCV-Contrib-PR-4.x-macOS-x86_64.yaml @@ -21,6 +21,7 @@ env: ANT_HOME: '/usr/share/ant' PYTHONPATH: '${{ github.workspace }}/build/python_loader:$PYTHONPATH' OPENCV_TEST_DATA_PATH: '${{ github.workspace }}/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 GTEST_FILTER_STRING: '-tracking_GOTURN.GOTURN/*:Tracking/DistanceAndOverlap.TLD/2:Tracking/DistanceAndOverlap.Scaled_Data_TLD/2' jobs: diff --git a/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml b/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml index 0b220be1..1a8b1464 100644 --- a/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml +++ b/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml @@ -22,6 +22,7 @@ env: GIT_CACHE_DOCKER: '/home/ci/git_cache' PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_DOCKER_WORKDIR: '/home/ci/opencv' PARALLEL_JOBS: 16 diff --git a/.github/workflows/OCV-PR-4.x-ARM64.yaml b/.github/workflows/OCV-PR-4.x-ARM64.yaml index 86b0d75d..e4c33121 100644 --- a/.github/workflows/OCV-PR-4.x-ARM64.yaml +++ b/.github/workflows/OCV-PR-4.x-ARM64.yaml @@ -22,6 +22,7 @@ env: GIT_CACHE_DOCKER: '/home/ci/git_cache' PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_DOCKER_WORKDIR: '/home/ci/opencv' DNN_MODELS: '/home/ci/dnn-models' PARALLEL_JOBS: 16 diff --git a/.github/workflows/OCV-PR-4.x-RISCV.yaml b/.github/workflows/OCV-PR-4.x-RISCV.yaml index fc9a29b7..b1d32b6f 100644 --- a/.github/workflows/OCV-PR-4.x-RISCV.yaml +++ b/.github/workflows/OCV-PR-4.x-RISCV.yaml @@ -111,7 +111,7 @@ jobs: cmake -G Ninja \ -S ${{ env.OPENCV_DOCKER_WORKDIR }} \ -B $HOME/build \ - ${{ env.EXTRA_CMAKE_OPTIONS }} + ${{ env.EXTRA_CMAKE_OPTIONS }} - name: Build OpenCV timeout-minutes: 60 id: build-opencv @@ -222,7 +222,7 @@ jobs: -S ${{ env.OPENCV_DOCKER_WORKDIR }} \ -B $HOME/build \ -DOPENCV_EXTRA_MODULES_PATH=$HOME/opencv_contrib/modules \ - ${{ env.EXTRA_CMAKE_OPTIONS }} + ${{ env.EXTRA_CMAKE_OPTIONS }} - name: Build OpenCV Contrib timeout-minutes: 60 run: | diff --git a/.github/workflows/OCV-PR-4.x-U20-Cuda.yaml b/.github/workflows/OCV-PR-4.x-U20-Cuda.yaml index 5649cb7f..13b85992 100644 --- a/.github/workflows/OCV-PR-4.x-U20-Cuda.yaml +++ b/.github/workflows/OCV-PR-4.x-U20-Cuda.yaml @@ -21,6 +21,7 @@ env: ANT_HOME: '/usr/share/ant' GIT_CACHE_DOCKER: '/home/ci/git_cache' OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_DOCKER_WORKDIR: '/home/ci/opencv' DNN_MODELS: '/home/ci/dnn-models' PARALLEL_JOBS: 8 diff --git a/.github/workflows/OCV-PR-4.x-U20-OpenVINO.yaml b/.github/workflows/OCV-PR-4.x-U20-OpenVINO.yaml index f0849ff2..264bc183 100644 --- a/.github/workflows/OCV-PR-4.x-U20-OpenVINO.yaml +++ b/.github/workflows/OCV-PR-4.x-U20-OpenVINO.yaml @@ -21,6 +21,7 @@ env: GIT_CACHE_DOCKER: '/home/openvino/git_cache' PYTHONPATH: /home/openvino/build/python_loader:$PYTHONPATH OPENCV_TEST_DATA_PATH: '/home/openvino/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_DOCKER_WORKDIR: '/home/openvino/opencv' DNN_MODELS: '/home/openvino/dnn-models' PARALLEL_JOBS: 8 diff --git a/.github/workflows/OCV-PR-4.x-U20.yaml b/.github/workflows/OCV-PR-4.x-U20.yaml index 07e78df8..c5653cf4 100644 --- a/.github/workflows/OCV-PR-4.x-U20.yaml +++ b/.github/workflows/OCV-PR-4.x-U20.yaml @@ -22,6 +22,7 @@ env: GIT_CACHE_DOCKER: '/home/ci/git_cache' PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_DOCKER_WORKDIR: '/home/ci/opencv' DNN_MODELS: '/home/ci/dnn-models' PARALLEL_JOBS: 8 diff --git a/.github/workflows/OCV-PR-4.x-U22.yaml b/.github/workflows/OCV-PR-4.x-U22.yaml index e12bc5e7..8e382a79 100644 --- a/.github/workflows/OCV-PR-4.x-U22.yaml +++ b/.github/workflows/OCV-PR-4.x-U22.yaml @@ -22,6 +22,7 @@ env: GIT_CACHE_DOCKER: '/home/ci/git_cache' PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_DOCKER_WORKDIR: '/home/ci/opencv' DNN_MODELS: '/home/ci/dnn-models' PARALLEL_JOBS: 8 diff --git a/.github/workflows/OCV-PR-4.x-W10-Vulkan.yaml b/.github/workflows/OCV-PR-4.x-W10-Vulkan.yaml index c4baac50..288c2255 100644 --- a/.github/workflows/OCV-PR-4.x-W10-Vulkan.yaml +++ b/.github/workflows/OCV-PR-4.x-W10-Vulkan.yaml @@ -15,6 +15,7 @@ concurrency: env: EXTRA_CMAKE_OPTIONS: '-DCL_Z_OPTION=/Z7 -DOPENCV_DOWNLOAD_PATH=%BINARIES_CACHE% -DOPENCV_ENABLE_NONFREE=ON -DCMAKE_BUILD_TYPE=Release -DWITH_OPENCL=OFF -DWITH_VULKAN=ON' OPENCV_TEST_DATA_PATH: ${{ github.workspace }}\opencv_extra\testdata + OPENCV_TEST_REQUIRE_DATA: 1 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 }} @@ -127,4 +128,4 @@ jobs: if: ${{ always() && steps.java-test.outcome == 'success' && steps.build-opencv.outcome == 'success' }} with: name: junit-html-windows10 - path: ${{ github.workspace }}\build\java_test\testResults\junit-noframes.html \ No newline at end of file + path: ${{ github.workspace }}\build\java_test\testResults\junit-noframes.html diff --git a/.github/workflows/OCV-PR-4.x-W10.yaml b/.github/workflows/OCV-PR-4.x-W10.yaml index 9b720f9a..c3896712 100644 --- a/.github/workflows/OCV-PR-4.x-W10.yaml +++ b/.github/workflows/OCV-PR-4.x-W10.yaml @@ -15,6 +15,7 @@ concurrency: env: EXTRA_CMAKE_OPTIONS: '-DCL_Z_OPTION=/Z7 -DOPENCV_DOWNLOAD_PATH=%BINARIES_CACHE% -DBUILD_EXAMPLES=ON -DOPENCV_ENABLE_NONFREE=ON -DCMAKE_BUILD_TYPE=Release' OPENCV_TEST_DATA_PATH: ${{ github.workspace }}\opencv_extra\testdata + OPENCV_TEST_REQUIRE_DATA: 1 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 }} diff --git a/.github/workflows/OCV-PR-4.x-macOS-ARM64-Vulkan.yaml b/.github/workflows/OCV-PR-4.x-macOS-ARM64-Vulkan.yaml index d441fe53..8453c082 100644 --- a/.github/workflows/OCV-PR-4.x-macOS-ARM64-Vulkan.yaml +++ b/.github/workflows/OCV-PR-4.x-macOS-ARM64-Vulkan.yaml @@ -21,6 +21,7 @@ env: ANT_HOME: '/usr/share/ant' PYTHONPATH: '${{ github.workspace }}/build/python_loader:$PYTHONPATH' OPENCV_TEST_DATA_PATH: '${{ github.workspace }}/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 GTEST_FILTER_STRING: '-GOTURN.memory_usage:DaSiamRPN.memory_usage:videoio_dynamic.basic_write:videoio/videocapture_acceleration.read/64:videoio/videocapture_acceleration.read/65:videoio/videocapture_acceleration.read/66:videoio/videocapture_acceleration.read/67' OPENCV_VULKAN_RUNTIME: '/opt/VulkanSDK/1.3.239.0/MoltenVK/dylib/macOS/libMoltenVK.dylib' @@ -128,4 +129,4 @@ jobs: if: ${{ always() && steps.java-test.outcome == 'success' && steps.build-opencv.outcome == 'success' }} with: name: junit-html-macos-arm64 - path: ${{ github.workspace }}/build/java_test/testResults/junit-noframes.html \ No newline at end of file + path: ${{ github.workspace }}/build/java_test/testResults/junit-noframes.html diff --git a/.github/workflows/OCV-PR-4.x-macOS-ARM64.yaml b/.github/workflows/OCV-PR-4.x-macOS-ARM64.yaml index d86d7fd6..a7617b14 100644 --- a/.github/workflows/OCV-PR-4.x-macOS-ARM64.yaml +++ b/.github/workflows/OCV-PR-4.x-macOS-ARM64.yaml @@ -21,6 +21,7 @@ env: ANT_HOME: '/usr/share/ant' PYTHONPATH: '${{ github.workspace }}/build/python_loader:$PYTHONPATH' OPENCV_TEST_DATA_PATH: '${{ github.workspace }}/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 GTEST_FILTER_STRING: '-GOTURN.memory_usage:DaSiamRPN.memory_usage:videoio_dynamic.basic_write:videoio/videocapture_acceleration.read/64:videoio/videocapture_acceleration.read/65:videoio/videocapture_acceleration.read/66:videoio/videocapture_acceleration.read/67' jobs: diff --git a/.github/workflows/OCV-PR-4.x-macOS-x86_64.yaml b/.github/workflows/OCV-PR-4.x-macOS-x86_64.yaml index d306d8f6..b4dc0acb 100644 --- a/.github/workflows/OCV-PR-4.x-macOS-x86_64.yaml +++ b/.github/workflows/OCV-PR-4.x-macOS-x86_64.yaml @@ -21,6 +21,7 @@ env: ANT_HOME: '/usr/share/ant' PYTHONPATH: '${{ github.workspace }}/build/python_loader:$PYTHONPATH' OPENCV_TEST_DATA_PATH: '${{ github.workspace }}/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 jobs: BuildAndTest: From f40f20c2dd1641e8bda5eb36dfd48e821a71110c Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Mon, 15 Jan 2024 10:07:29 +0300 Subject: [PATCH 2/4] Download models for debug build too as they are used in objdetect and video modules. --- .github/workflows/OCV-PR-4.x-ARM64-Debug.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml b/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml index 1a8b1464..24b24fee 100644 --- a/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml +++ b/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml @@ -89,6 +89,24 @@ jobs: else echo "No merge since ${{ env.PR_AUTHOR }}/opencv_extra does not have branch ${{ env.SOURCE_BRANCH_NAME }}" fi + # download models independently from DNN as some modules are used here and there on other places + - name: Extra DNN models update + timeout-minutes: 60 + run: | + DOWNLOAD_MODELS_FILE='download_models.py' + LATEST_SAVED_HASH=$(cat ${{ env.DNN_MODELS }}/dnn/latest-hash-${{ env.TARGET_BRANCH_NAME }}.txt) + LATEST_HASH=$(sha256sum $HOME/opencv_extra/testdata/dnn/$DOWNLOAD_MODELS_FILE | awk '{print $1}') + if [[ $LATEST_HASH == $LATEST_SAVED_HASH ]]; then + echo "DNN models are up to date" + echo "OPENCV_DNN_TEST_DATA_PATH=${{ env.DNN_MODELS }}" >> $GITHUB_ENV + else + echo "Updating DNN models list" + echo "OPENCV_DNN_TEST_DATA_PATH=/home/ci/new-dnn-models" >> $GITHUB_ENV && OPENCV_DNN_TEST_DATA_PATH='/home/ci/new-dnn-models' + mkdir -p "$OPENCV_DNN_TEST_DATA_PATH" + rsync -a --exclude=$DOWNLOAD_MODELS_FILE ${{ env.DNN_MODELS }}/* $OPENCV_DNN_TEST_DATA_PATH + cp $HOME/opencv_extra/testdata/dnn/download_models.py $OPENCV_DNN_TEST_DATA_PATH/dnn + cd $OPENCV_DNN_TEST_DATA_PATH/dnn && python3 download_models.py + fi - name: Configure OpenCV timeout-minutes: 60 run: | From 7848b833f3b3804ca128d4bd232a9f1d3784454f Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Wed, 7 Feb 2024 09:24:19 +0300 Subject: [PATCH 3/4] Skip hash information if it does not exist. --- .github/workflows/OCV-PR-4.x-ARM64-Debug.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml b/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml index 24b24fee..769d910b 100644 --- a/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml +++ b/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml @@ -94,7 +94,11 @@ jobs: timeout-minutes: 60 run: | DOWNLOAD_MODELS_FILE='download_models.py' - LATEST_SAVED_HASH=$(cat ${{ env.DNN_MODELS }}/dnn/latest-hash-${{ env.TARGET_BRANCH_NAME }}.txt) + if [ -f ${{ env.DNN_MODELS }}/dnn/latest-hash-${{ env.TARGET_BRANCH_NAME }}.txt ]; then + LATEST_SAVED_HASH=$(cat ${{ env.DNN_MODELS }}/dnn/latest-hash-${{ env.TARGET_BRANCH_NAME }}.txt) + else + LATEST_SAVED_HASH="" + fi LATEST_HASH=$(sha256sum $HOME/opencv_extra/testdata/dnn/$DOWNLOAD_MODELS_FILE | awk '{print $1}') if [[ $LATEST_HASH == $LATEST_SAVED_HASH ]]; then echo "DNN models are up to date" From 4030e55d1541d666107fde11c671c2e8e2b7cfdd Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Wed, 7 Feb 2024 14:50:18 +0300 Subject: [PATCH 4/4] Disabled OPENCV_TEST_REQUIRE_DATA option in configurations that are not ready now. --- .github/workflows/OCV-PR-4.x-ARM64-Debug.yaml | 44 +++++++++---------- .../workflows/OCV-PR-4.x-U20-OpenVINO.yaml | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml b/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml index 769d910b..a074fe25 100644 --- a/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml +++ b/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml @@ -22,7 +22,7 @@ env: GIT_CACHE_DOCKER: '/home/ci/git_cache' PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' - OPENCV_TEST_REQUIRE_DATA: 1 + #OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_DOCKER_WORKDIR: '/home/ci/opencv' PARALLEL_JOBS: 16 @@ -90,27 +90,27 @@ jobs: echo "No merge since ${{ env.PR_AUTHOR }}/opencv_extra does not have branch ${{ env.SOURCE_BRANCH_NAME }}" fi # download models independently from DNN as some modules are used here and there on other places - - name: Extra DNN models update - timeout-minutes: 60 - run: | - DOWNLOAD_MODELS_FILE='download_models.py' - if [ -f ${{ env.DNN_MODELS }}/dnn/latest-hash-${{ env.TARGET_BRANCH_NAME }}.txt ]; then - LATEST_SAVED_HASH=$(cat ${{ env.DNN_MODELS }}/dnn/latest-hash-${{ env.TARGET_BRANCH_NAME }}.txt) - else - LATEST_SAVED_HASH="" - fi - LATEST_HASH=$(sha256sum $HOME/opencv_extra/testdata/dnn/$DOWNLOAD_MODELS_FILE | awk '{print $1}') - if [[ $LATEST_HASH == $LATEST_SAVED_HASH ]]; then - echo "DNN models are up to date" - echo "OPENCV_DNN_TEST_DATA_PATH=${{ env.DNN_MODELS }}" >> $GITHUB_ENV - else - echo "Updating DNN models list" - echo "OPENCV_DNN_TEST_DATA_PATH=/home/ci/new-dnn-models" >> $GITHUB_ENV && OPENCV_DNN_TEST_DATA_PATH='/home/ci/new-dnn-models' - mkdir -p "$OPENCV_DNN_TEST_DATA_PATH" - rsync -a --exclude=$DOWNLOAD_MODELS_FILE ${{ env.DNN_MODELS }}/* $OPENCV_DNN_TEST_DATA_PATH - cp $HOME/opencv_extra/testdata/dnn/download_models.py $OPENCV_DNN_TEST_DATA_PATH/dnn - cd $OPENCV_DNN_TEST_DATA_PATH/dnn && python3 download_models.py - fi + #- name: Extra DNN models update + #timeout-minutes: 60 + #run: | + #DOWNLOAD_MODELS_FILE='download_models.py' + #if [ -f ${{ env.DNN_MODELS }}/dnn/latest-hash-${{ env.TARGET_BRANCH_NAME }}.txt ]; then + #LATEST_SAVED_HASH=$(cat ${{ env.DNN_MODELS }}/dnn/latest-hash-${{ env.TARGET_BRANCH_NAME }}.txt) + #else + #LATEST_SAVED_HASH="" + #fi + #LATEST_HASH=$(sha256sum $HOME/opencv_extra/testdata/dnn/$DOWNLOAD_MODELS_FILE | awk '{print $1}') + #if [[ $LATEST_HASH == $LATEST_SAVED_HASH ]]; then + #echo "DNN models are up to date" + #echo "OPENCV_DNN_TEST_DATA_PATH=${{ env.DNN_MODELS }}" >> $GITHUB_ENV + #else + #echo "Updating DNN models list" + #echo "OPENCV_DNN_TEST_DATA_PATH=/home/ci/new-dnn-models" >> $GITHUB_ENV && OPENCV_DNN_TEST_DATA_PATH='/home/ci/new-dnn-models' + #mkdir -p "$OPENCV_DNN_TEST_DATA_PATH" + #rsync -a --exclude=$DOWNLOAD_MODELS_FILE ${{ env.DNN_MODELS }}/* $OPENCV_DNN_TEST_DATA_PATH + #cp $HOME/opencv_extra/testdata/dnn/download_models.py $OPENCV_DNN_TEST_DATA_PATH/dnn + #cd $OPENCV_DNN_TEST_DATA_PATH/dnn && python3 download_models.py + #fi - name: Configure OpenCV timeout-minutes: 60 run: | diff --git a/.github/workflows/OCV-PR-4.x-U20-OpenVINO.yaml b/.github/workflows/OCV-PR-4.x-U20-OpenVINO.yaml index 264bc183..279c9a83 100644 --- a/.github/workflows/OCV-PR-4.x-U20-OpenVINO.yaml +++ b/.github/workflows/OCV-PR-4.x-U20-OpenVINO.yaml @@ -21,7 +21,7 @@ env: GIT_CACHE_DOCKER: '/home/openvino/git_cache' PYTHONPATH: /home/openvino/build/python_loader:$PYTHONPATH OPENCV_TEST_DATA_PATH: '/home/openvino/opencv_extra/testdata' - OPENCV_TEST_REQUIRE_DATA: 1 + #OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_DOCKER_WORKDIR: '/home/openvino/opencv' DNN_MODELS: '/home/openvino/dnn-models' PARALLEL_JOBS: 8