Skip to content

Commit d07d640

Browse files
authored
Force OPENCV_TEST_REQUIRE_DATA in CI environments in 5.x (#146)
* Force OPENCV_TEST_REQUIRE_DATA in CI environments in 5.x * Skip risc-v for now.
1 parent be04237 commit d07d640

11 files changed

+33
-2
lines changed

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

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

.github/workflows/OCV-PR-5.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_DOCKER_WORKDIR: '/home/ci/opencv'
2627
DNN_MODELS: '/home/ci/dnn-models'
2728
PARALLEL_JOBS: 16

.github/workflows/OCV-PR-5.x-RISCV.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
cmake -G Ninja \
112112
-S ${{ env.OPENCV_DOCKER_WORKDIR }} \
113113
-B $HOME/build \
114-
${{ env.EXTRA_CMAKE_OPTIONS }}
114+
${{ env.EXTRA_CMAKE_OPTIONS }}
115115
- name: Build OpenCV
116116
timeout-minutes: 60
117117
id: build-opencv
@@ -222,7 +222,7 @@ jobs:
222222
-S ${{ env.OPENCV_DOCKER_WORKDIR }} \
223223
-B $HOME/build \
224224
-DOPENCV_EXTRA_MODULES_PATH=$HOME/opencv_contrib/modules \
225-
${{ env.EXTRA_CMAKE_OPTIONS }}
225+
${{ env.EXTRA_CMAKE_OPTIONS }}
226226
- name: Build OpenCV Contrib
227227
timeout-minutes: 60
228228
run: |

.github/workflows/OCV-PR-5.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_DOCKER_WORKDIR: '/home/ci/opencv'
2526
DNN_MODELS: '/home/ci/dnn-models'
2627
PARALLEL_JOBS: 8

.github/workflows/OCV-PR-5.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_DOCKER_WORKDIR: '/home/ci/opencv'
2627
DNN_MODELS: '/home/ci/dnn-models'
2728
PARALLEL_JOBS: 8

.github/workflows/OCV-PR-5.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_DOCKER_WORKDIR: '/home/ci/opencv'
2627
DNN_MODELS: '/home/ci/dnn-models'
2728
PARALLEL_JOBS: 8

.github/workflows/OCV-PR-5.x-W10-Vulkan.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ concurrency:
1515
env:
1616
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'
1717
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}\opencv_extra\testdata
18+
OPENCV_TEST_REQUIRE_DATA: 1
1819
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
1920
PR_AUTHOR_FORK: ${{ github.event.pull_request.head.repo.full_name }}
2021
SOURCE_BRANCH_NAME: ${{ github.head_ref }}

.github/workflows/OCV-PR-5.x-W10.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ concurrency:
1515
env:
1616
EXTRA_CMAKE_OPTIONS: '-DCL_Z_OPTION=/Z7 -DOPENCV_DOWNLOAD_PATH=%BINARIES_CACHE% -DBUILD_EXAMPLES=ON -DOPENCV_ENABLE_NONFREE=ON -DCMAKE_BUILD_TYPE=Release'
1717
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}\opencv_extra\testdata
18+
OPENCV_TEST_REQUIRE_DATA: 1
1819
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
1920
PR_AUTHOR_FORK: ${{ github.event.pull_request.head.repo.full_name }}
2021
SOURCE_BRANCH_NAME: ${{ github.head_ref }}

.github/workflows/OCV-PR-5.x-macOS-ARM64-Vulkan.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/videocapture_acceleration.read/64:videoio/videocapture_acceleration.read/65:videoio/videocapture_acceleration.read/66:videoio/videocapture_acceleration.read/67'
2526
OPENCV_VULKAN_RUNTIME: '/opt/VulkanSDK/1.3.239.0/MoltenVK/dylib/macOS/libMoltenVK.dylib'
2627

.github/workflows/OCV-PR-5.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/videocapture_acceleration.read/64:videoio/videocapture_acceleration.read/65:videoio/videocapture_acceleration.read/66:videoio/videocapture_acceleration.read/67'
2526

2627
jobs:

0 commit comments

Comments
 (0)