Skip to content

Commit bddd1f4

Browse files
authored
Force OPENCV_TEST_REQUIRE_DATA in CI environments in 4.x (#133)
* Force OPENCV_TEST_REQUIRE_DATA in CI environments in 4.x * Download models for debug build too as they are used in objdetect and video modules. * Skip hash information if it does not exist. * Disabled OPENCV_TEST_REQUIRE_DATA option in configurations that are not ready now.
1 parent 0d0d078 commit bddd1f4

21 files changed

+46
-4
lines changed

.github/workflows/OCV-Contrib-PR-4.x-ARM64.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ env:
2222
GIT_CACHE_DOCKER: '/home/ci/git_cache'
2323
PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH
2424
OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata'
25+
OPENCV_TEST_REQUIRE_DATA: 1
2526
OPENCV_CONTRIB_DOCKER_WORKDIR: '/home/ci/opencv_contrib'
2627
DNN_MODELS: '/home/ci/dnn-models'
2728
GTEST_FILTER_STRING: '-tracking_GOTURN.GOTURN/*'

.github/workflows/OCV-Contrib-PR-4.x-O22-CANN.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ env:
2020
TARGET_BRANCH_NAME: ${{ github.base_ref }}
2121
GIT_CACHE_DOCKER: '/home/ci/git_cache'
2222
OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata'
23+
OPENCV_TEST_REQUIRE_DATA: 1
2324
OPENCV_CONTRIB_DOCKER_WORKDIR: '/home/ci/opencv_contrib'
2425
PARALLEL_JOBS: 8
2526

.github/workflows/OCV-Contrib-PR-4.x-RISCV.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ env:
2222
GIT_CACHE_DOCKER: '/home/ci/git_cache'
2323
OPENCV_DOWNLOAD_PATH: '/home/ci/binaries_cache'
2424
OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata'
25+
OPENCV_TEST_REQUIRE_DATA: 1
2526
OPENCV_CONTRIB_DOCKER_WORKDIR: '/home/ci/opencv_contrib'
2627
OPENCV_DOCKER_WORKDIR: '/home/ci/opencv'
2728
PYTHONPATH: '/home/ci/build/python_loader:$PYTHONPATH'

.github/workflows/OCV-Contrib-PR-4.x-U20-Cuda.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ env:
2121
ANT_HOME: '/usr/share/ant'
2222
GIT_CACHE_DOCKER: '/home/ci/git_cache'
2323
OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata'
24+
OPENCV_TEST_REQUIRE_DATA: 1
2425
OPENCV_CONTRIB_DOCKER_WORKDIR: '/home/ci/opencv_contrib'
2526
PARALLEL_JOBS: 8
2627

.github/workflows/OCV-Contrib-PR-4.x-U20.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ env:
2222
GIT_CACHE_DOCKER: '/home/ci/git_cache'
2323
PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH
2424
OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata'
25+
OPENCV_TEST_REQUIRE_DATA: 1
2526
OPENCV_CONTRIB_DOCKER_WORKDIR: '/home/ci/opencv_contrib'
2627
DNN_MODELS: '/home/ci/dnn-models'
2728
GTEST_FILTER_STRING: '-tracking_GOTURN.GOTURN/*'

.github/workflows/OCV-Contrib-PR-4.x-U22.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ env:
2222
GIT_CACHE_DOCKER: '/home/ci/git_cache'
2323
PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH
2424
OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata'
25+
OPENCV_TEST_REQUIRE_DATA: 1
2526
OPENCV_CONTRIB_DOCKER_WORKDIR: '/home/ci/opencv_contrib'
2627
DNN_MODELS: '/home/ci/dnn-models'
2728
# GStreamer 1.20 distributed with Ubuntu 22.04 as bug in JPEG integration

.github/workflows/OCV-Contrib-PR-4.x-W10.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ env:
1919
SOURCE_BRANCH_NAME: ${{ github.head_ref }}
2020
TARGET_BRANCH_NAME: ${{ github.base_ref }}
2121
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}\opencv_extra\testdata
22+
OPENCV_TEST_REQUIRE_DATA: 1
2223
GTEST_FILTER_STRING: '-Samples.findFile:videoio/videocapture_acceleration.read/122:videoio/videocapture_acceleration.read/126'
2324
DOWNLOAD_DNN_MODELS_FILE: 'download_models.py'
2425

.github/workflows/OCV-Contrib-PR-4.x-macOS-ARM64.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ env:
2121
ANT_HOME: '/usr/share/ant'
2222
PYTHONPATH: '${{ github.workspace }}/build/python_loader:$PYTHONPATH'
2323
OPENCV_TEST_DATA_PATH: '${{ github.workspace }}/opencv_extra/testdata'
24+
OPENCV_TEST_REQUIRE_DATA: 1
2425
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'
2526

2627
jobs:

.github/workflows/OCV-Contrib-PR-4.x-macOS-x86_64.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ env:
2121
ANT_HOME: '/usr/share/ant'
2222
PYTHONPATH: '${{ github.workspace }}/build/python_loader:$PYTHONPATH'
2323
OPENCV_TEST_DATA_PATH: '${{ github.workspace }}/opencv_extra/testdata'
24+
OPENCV_TEST_REQUIRE_DATA: 1
2425
GTEST_FILTER_STRING: '-tracking_GOTURN.GOTURN/*:Tracking/DistanceAndOverlap.TLD/2:Tracking/DistanceAndOverlap.Scaled_Data_TLD/2'
2526

2627
jobs:

.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ env:
2222
GIT_CACHE_DOCKER: '/home/ci/git_cache'
2323
PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH
2424
OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata'
25+
#OPENCV_TEST_REQUIRE_DATA: 1
2526
OPENCV_DOCKER_WORKDIR: '/home/ci/opencv'
2627
PARALLEL_JOBS: 16
2728

@@ -88,6 +89,28 @@ jobs:
8889
else
8990
echo "No merge since ${{ env.PR_AUTHOR }}/opencv_extra does not have branch ${{ env.SOURCE_BRANCH_NAME }}"
9091
fi
92+
# download models independently from DNN as some modules are used here and there on other places
93+
#- name: Extra DNN models update
94+
#timeout-minutes: 60
95+
#run: |
96+
#DOWNLOAD_MODELS_FILE='download_models.py'
97+
#if [ -f ${{ env.DNN_MODELS }}/dnn/latest-hash-${{ env.TARGET_BRANCH_NAME }}.txt ]; then
98+
#LATEST_SAVED_HASH=$(cat ${{ env.DNN_MODELS }}/dnn/latest-hash-${{ env.TARGET_BRANCH_NAME }}.txt)
99+
#else
100+
#LATEST_SAVED_HASH=""
101+
#fi
102+
#LATEST_HASH=$(sha256sum $HOME/opencv_extra/testdata/dnn/$DOWNLOAD_MODELS_FILE | awk '{print $1}')
103+
#if [[ $LATEST_HASH == $LATEST_SAVED_HASH ]]; then
104+
#echo "DNN models are up to date"
105+
#echo "OPENCV_DNN_TEST_DATA_PATH=${{ env.DNN_MODELS }}" >> $GITHUB_ENV
106+
#else
107+
#echo "Updating DNN models list"
108+
#echo "OPENCV_DNN_TEST_DATA_PATH=/home/ci/new-dnn-models" >> $GITHUB_ENV && OPENCV_DNN_TEST_DATA_PATH='/home/ci/new-dnn-models'
109+
#mkdir -p "$OPENCV_DNN_TEST_DATA_PATH"
110+
#rsync -a --exclude=$DOWNLOAD_MODELS_FILE ${{ env.DNN_MODELS }}/* $OPENCV_DNN_TEST_DATA_PATH
111+
#cp $HOME/opencv_extra/testdata/dnn/download_models.py $OPENCV_DNN_TEST_DATA_PATH/dnn
112+
#cd $OPENCV_DNN_TEST_DATA_PATH/dnn && python3 download_models.py
113+
#fi
91114
- name: Configure OpenCV
92115
timeout-minutes: 60
93116
run: |

0 commit comments

Comments
 (0)