From eeef983523f510968989b8a93c97bb0819b436a1 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Thu, 9 Oct 2025 08:58:06 +0300 Subject: [PATCH 01/29] Added testing to the new Windows CI --- .github/workflows/OCV-PR-Windows.yaml | 30 ++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/OCV-PR-Windows.yaml b/.github/workflows/OCV-PR-Windows.yaml index 395dae01..7c1835c9 100644 --- a/.github/workflows/OCV-PR-Windows.yaml +++ b/.github/workflows/OCV-PR-Windows.yaml @@ -126,7 +126,7 @@ jobs: source_branch: "${{ github.event.repository.name == 'ci-gha-workflow' && '' || github.head_ref }}" gitcache: '${{ env.GIT_CACHE }}' workdir: '${{ github.workspace }}' - + - name: Update extra dnn models if: ${{ matrix.arch != 'arm64' }} timeout-minutes: 60 @@ -153,3 +153,31 @@ jobs: builddir: 'build-contrib' generator: '${{ matrix.vs }}' options: '-A ${{ matrix.cmake_arch }} -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib/modules ${{ env.CMAKE_OPT }}' + + - name: Run OpenCV tests + uses: ./run-tests + env: + OPENCV_TEST_DATA_PATH: '${{ env.HOME }}/opencv_extra/testdata' + OPENCV_TEST_REQUIRE_DATA: 1 + OPENCV_TEST_CHECK_OPTIONAL_DATA: 1 + PYTHONPATH: '${{ env.HOME }}/${{ env.MAIN_BUILD_DIR }}/python_loader:$PYTHONPATH' + # TODO: enable later + # ASAN_OPTIONS: 'detect_leaks=0' + with: + workdir: '${{ env.HOME }}' + builddir: '${{ env.MAIN_BUILD_DIR }}' + logdir: '${{ env.HOME }}/${{ env.MAIN_BUILD_DIR }}' + plan: "test-plan-${{ matrix.branch }}.json" + # NOTE: Just keeping this construction here for possible future use: + # ${{ (github.event.repository.name == 'opencv_contrib') && format('''linux-contrib-{0}''', matrix.branch) || '' }} + suite: "[ ${{ (github.event.repository.name == 'opencv_contrib') && '''linux-contrib''' || '''linux''' }} ]" + filter: "[ 'ubuntu-common', ${{ matrix.avx2 && '''ubuntu-avx2''' }} ]" + enable_python: "true" + enable_java: "true" + suffix: '${{ matrix.version }}_${{ matrix.branch }}' + + - if: ${{ always() && env.WARNINGS == '1' }} + name: Warnings check + run: | + echo "::error Warnings have been found!" + exit 1 From f953652c8f1e231f215d146c8039f02c016ad009 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Wed, 15 Oct 2025 12:41:49 +0300 Subject: [PATCH 02/29] Disabled fail-fast strategy for matrix build. --- .github/workflows/OCV-PR-Windows.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/OCV-PR-Windows.yaml b/.github/workflows/OCV-PR-Windows.yaml index 7c1835c9..1b02ccb9 100644 --- a/.github/workflows/OCV-PR-Windows.yaml +++ b/.github/workflows/OCV-PR-Windows.yaml @@ -46,8 +46,8 @@ jobs: - branch_eval strategy: # NOTE: Debugging - fail-fast: true - # fail-fast: false + #fail-fast: true + fail-fast: false max-parallel: 3 matrix: arch: [ x86, x64, arm64 ] From eb87658b71ea857f99791e1d43acd18aac85b940 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 30 Oct 2025 10:13:51 +0300 Subject: [PATCH 03/29] test: windows specifics --- run-tests/action.yml | 10 ++++++++-- scripts/runner.py | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/run-tests/action.yml b/run-tests/action.yml index 53c20a49..1f2dd93c 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -39,8 +39,13 @@ runs: - if: ${{ always() }} shell: bash run: | + pyexe=python3 + if [ "$RUNNER_OS" == "Windows" ]; then + exeopt="--exesuffix .exe" + pyexe=python + fi echo "### Test summary:" >> $GITHUB_STEP_SUMMARY - python3 scripts/runner.py \ + ${pyexe} scripts/runner.py \ '--workdir=${{ inputs.workdir }}/${{ inputs.builddir }}' \ '--bindir=bin' \ '--logdir=${{ inputs.logdir }}' \ @@ -49,7 +54,8 @@ runs: --suite=${{ join(fromJSON(inputs.suite), ' --suite=') }} \ --filter=${{ join(fromJSON(inputs.filter), ' --filter=') }} \ '--options=${{ inputs.options }}' \ - "--summary=$GITHUB_STEP_SUMMARY" + "--summary=$GITHUB_STEP_SUMMARY" \ + ${exeopt} # Logs diff --git a/scripts/runner.py b/scripts/runner.py index 6de87375..cad4afb8 100644 --- a/scripts/runner.py +++ b/scripts/runner.py @@ -141,6 +141,7 @@ async def run_one(name, cmd, logname, env, args): parser.add_argument("--bindir", default="bin", type=Path, help="Directory with binaries (relative to workdir)") parser.add_argument("--verbose", action='store_true', help="Output all lines") parser.add_argument("--summary", type=Path, help="Path to summary file to generate") + parser.add_argument("--exesuffix", type=str, help="Suffix for executables (e.g. '.exe' or 'd.exe')") args = parser.parse_args() if not args.logdir.is_absolute(): @@ -199,6 +200,8 @@ async def run_one(name, cmd, logname, env, args): extra_args.append("--gtest_filter=*:-{}".format(":".join(filter))) actual_exe = args.workdir / args.bindir / Path(actual_exe) + if args.exesuffix: + actual_exe = actual_exe.with_suffix(args.exesuffix) if len(wrap) == 0 and (not actual_exe.exists() or not actual_exe.is_file()): print("Executable not found: {}".format(actual_exe)) res = -3 From c197045f8db46f7b2fb93603f44278ce5b0152d5 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 30 Oct 2025 10:42:37 +0300 Subject: [PATCH 04/29] test: use workdir on windows --- .github/workflows/OCV-PR-Windows.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/OCV-PR-Windows.yaml b/.github/workflows/OCV-PR-Windows.yaml index 1b02ccb9..0625c941 100644 --- a/.github/workflows/OCV-PR-Windows.yaml +++ b/.github/workflows/OCV-PR-Windows.yaml @@ -46,9 +46,9 @@ jobs: - branch_eval strategy: # NOTE: Debugging - #fail-fast: true - fail-fast: false - max-parallel: 3 + fail-fast: true + # fail-fast: false + max-parallel: 2 matrix: arch: [ x86, x64, arm64 ] config: [ base ] @@ -157,16 +157,16 @@ jobs: - name: Run OpenCV tests uses: ./run-tests env: - OPENCV_TEST_DATA_PATH: '${{ env.HOME }}/opencv_extra/testdata' + OPENCV_TEST_DATA_PATH: '${{ github.workspace }}/opencv_extra/testdata' OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_TEST_CHECK_OPTIONAL_DATA: 1 - PYTHONPATH: '${{ env.HOME }}/${{ env.MAIN_BUILD_DIR }}/python_loader:$PYTHONPATH' + PYTHONPATH: '${{ github.workspace }}/${{ env.MAIN_BUILD_DIR }}/python_loader:$PYTHONPATH' # TODO: enable later # ASAN_OPTIONS: 'detect_leaks=0' with: - workdir: '${{ env.HOME }}' + workdir: '${{ github.workspace }}' builddir: '${{ env.MAIN_BUILD_DIR }}' - logdir: '${{ env.HOME }}/${{ env.MAIN_BUILD_DIR }}' + logdir: '${{ github.workspace }}/${{ env.MAIN_BUILD_DIR }}' plan: "test-plan-${{ matrix.branch }}.json" # NOTE: Just keeping this construction here for possible future use: # ${{ (github.event.repository.name == 'opencv_contrib') && format('''linux-contrib-{0}''', matrix.branch) || '' }} From 20be3bf622baf949441b0db768a05f786baf061e Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 30 Oct 2025 11:34:36 +0300 Subject: [PATCH 05/29] test: python executable, windows plans --- .github/workflows/OCV-PR-Windows.yaml | 11 +-- configure-and-build/action.yml | 6 +- run-tests/action.yml | 12 ++- scripts/test-plan-4.x.json | 4 +- scripts/test-plan-win-4.x.json | 110 ++++++++++++++++++++++++ scripts/test-plan-win-5.x.json | 119 ++++++++++++++++++++++++++ 6 files changed, 250 insertions(+), 12 deletions(-) create mode 100644 scripts/test-plan-win-4.x.json create mode 100644 scripts/test-plan-win-5.x.json diff --git a/.github/workflows/OCV-PR-Windows.yaml b/.github/workflows/OCV-PR-Windows.yaml index 0625c941..d6f0a7cf 100644 --- a/.github/workflows/OCV-PR-Windows.yaml +++ b/.github/workflows/OCV-PR-Windows.yaml @@ -161,17 +161,14 @@ jobs: OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_TEST_CHECK_OPTIONAL_DATA: 1 PYTHONPATH: '${{ github.workspace }}/${{ env.MAIN_BUILD_DIR }}/python_loader:$PYTHONPATH' - # TODO: enable later - # ASAN_OPTIONS: 'detect_leaks=0' with: workdir: '${{ github.workspace }}' - builddir: '${{ env.MAIN_BUILD_DIR }}' - logdir: '${{ github.workspace }}/${{ env.MAIN_BUILD_DIR }}' - plan: "test-plan-${{ matrix.branch }}.json" + builddir: '${{ env.MAIN_BUILD_DIR }}/Release' + logdir: '${{ github.workspace }}' + plan: "test-plan-win-${{ matrix.branch }}.json" # NOTE: Just keeping this construction here for possible future use: # ${{ (github.event.repository.name == 'opencv_contrib') && format('''linux-contrib-{0}''', matrix.branch) || '' }} - suite: "[ ${{ (github.event.repository.name == 'opencv_contrib') && '''linux-contrib''' || '''linux''' }} ]" - filter: "[ 'ubuntu-common', ${{ matrix.avx2 && '''ubuntu-avx2''' }} ]" + suite: "[ ${{ (github.event.repository.name == 'opencv_contrib') && '''contrib''' || '''main''' }} ]" enable_python: "true" enable_java: "true" suffix: '${{ matrix.version }}_${{ matrix.branch }}' diff --git a/configure-and-build/action.yml b/configure-and-build/action.yml index aadc8a4c..cf8af44a 100644 --- a/configure-and-build/action.yml +++ b/configure-and-build/action.yml @@ -38,8 +38,12 @@ runs: - shell: bash run: | + pyexe=python3 + if [ "$RUNNER_OS" == "Windows" ]; then + pyexe=python + fi set +e - python3 ./scripts/warnings-handling.py \ + ${pyexe} ./scripts/warnings-handling.py \ '${{ inputs.workdir }}/${{ inputs.builddir }}/log.txt' if [ $? -ne 0 ]; then echo "WARNINGS=1" >> $GITHUB_ENV diff --git a/run-tests/action.yml b/run-tests/action.yml index 1f2dd93c..ef1bcb26 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -73,17 +73,25 @@ runs: shell: bash working-directory: ${{ inputs.workdir }}/${{ inputs.builddir }} run: | + pyexe=python3 + if [ "$RUNNER_OS" == "Windows" ]; then + pyexe=python + fi echo "::group::Python test" - python3 ../opencv/modules/python/test/test.py --repo ../opencv -v + ${pyexe} ../opencv/modules/python/test/test.py --repo ../opencv -v echo "::endgroup::" - if: ${{ always() && fromJSON(inputs.enable_python) }} shell: bash working-directory: ${{ inputs.workdir }}/${{ inputs.builddir }} run: | + pyexe=python3 + if [ "$RUNNER_OS" == "Windows" ]; then + pyexe=python + fi echo "::group::Python app test" if [ -f "../opencv/apps/python_app_test.py" ]; then - python3 "../opencv/apps/python_app_test.py" --repo ../opencv -v + ${pyexe} "../opencv/apps/python_app_test.py" --repo ../opencv -v fi echo "::endgroup::" diff --git a/scripts/test-plan-4.x.json b/scripts/test-plan-4.x.json index e85508cf..d1ebf312 100644 --- a/scripts/test-plan-4.x.json +++ b/scripts/test-plan-4.x.json @@ -2,7 +2,7 @@ "suites": { "short": [ "opencv_test_core", "opencv_test_imgproc", "opencv_test_photo" ], - "linux": [ + "main": [ "opencv_test_calib3d", "opencv_test_core", "opencv_test_dnn", @@ -32,7 +32,7 @@ "opencv_perf_videoio" ], - "linux-contrib": [ + "contrib": [ "opencv_test_bgsegm", "opencv_test_bioinspired", "opencv_test_dnn_superres", diff --git a/scripts/test-plan-win-4.x.json b/scripts/test-plan-win-4.x.json new file mode 100644 index 00000000..3ff9924b --- /dev/null +++ b/scripts/test-plan-win-4.x.json @@ -0,0 +1,110 @@ +{ + "suites": { + "short": [ "opencv_test_core", "opencv_test_imgproc", "opencv_test_photo" ], + + "linux": [ + "opencv_test_calib3d", + "opencv_test_core", + "opencv_test_dnn", + "opencv_test_features2d", + "opencv_test_flann", + "opencv_test_gapi", + "opencv_test_highgui", + "opencv_test_imgcodecs", + "opencv_test_imgproc", + "opencv_test_ml", + "opencv_test_objdetect", + "opencv_test_photo", + "opencv_test_stitching", + "opencv_test_video", + "opencv_test_videoio", + "opencv_perf_calib3d", + "opencv_perf_core", + "opencv_perf_dnn", + "opencv_perf_features2d", + "opencv_perf_gapi", + "opencv_perf_imgcodecs", + "opencv_perf_imgproc", + "opencv_perf_objdetect", + "opencv_perf_photo", + "opencv_perf_stitching", + "opencv_perf_video", + "opencv_perf_videoio" + ], + + "linux-contrib": [ + "opencv_test_bgsegm", + "opencv_test_bioinspired", + "opencv_test_dnn_superres", + "opencv_test_face", + "opencv_test_fuzzy", + "opencv_test_hdf", + "opencv_test_img_aug", + "opencv_test_img_hash", + "opencv_test_intensity_transform", + "opencv_test_line_descriptor", + "opencv_test_mcc", + "opencv_test_optflow", + "opencv_test_phase_unwrapping", + "opencv_test_quality", + "opencv_test_rapid", + "opencv_test_reg", + "opencv_test_rgbd", + "opencv_test_saliency", + "opencv_test_sfm", + "opencv_test_shape", + "opencv_test_stereo", + "opencv_test_structured_light", + "opencv_test_superres", + "opencv_test_text", + "opencv_test_tracking", + "opencv_test_videostab", + "opencv_test_wechat_qrcode", + "opencv_test_xfeatures2d", + "opencv_test_ximgproc", + "opencv_test_xphoto", + "opencv_perf_bioinspired", + "opencv_perf_dnn_superres", + "opencv_perf_features2d", + "opencv_perf_line_descriptor", + "opencv_perf_optflow", + "opencv_perf_reg", + "opencv_perf_rgbd", + "opencv_perf_stereo", + "opencv_perf_superres", + "opencv_perf_tracking", + "opencv_perf_xfeatures2d", + "opencv_perf_ximgproc", + "opencv_perf_xphoto" + ] + }, + "filters": { + "ubuntu-common": { + "test_gapi": [ + "AsyncAPICancelation/cancel/*" + ], + "test_videoio": [ + "videoio/videoio_synthetic.write_read_position/*_MPEG_GSTREAMER", + "videoio/videoio_synthetic.write_read_position/*_MJPG_GSTREAMER", + "videoio/videocapture_acceleration.read/yuv420p_mjpeg_mp4_GSTREAMER_*_MAT", + "videoio/videowriter_acceleration.write/mkv_MPEG_GSTREAMER_*_MAT" + ] + }, + "ubuntu-avx2": { + "test_core": [ + "Core_InRangeS/ElemWiseTest.accuracy/0", + "Core_InRange/ElemWiseTest.accuracy/0" + ] + } + }, + "options": { + "default": { + "args": { + "test": "--skip_unstable=1", + "perf": "--perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1" + }, + "exe": {}, + "env": {} + } + } +} diff --git a/scripts/test-plan-win-5.x.json b/scripts/test-plan-win-5.x.json new file mode 100644 index 00000000..0e38acdb --- /dev/null +++ b/scripts/test-plan-win-5.x.json @@ -0,0 +1,119 @@ +{ + "suites": { + "short": [ "opencv_test_core", "opencv_test_imgproc", "opencv_test_photo" ], + + "linux": [ + "opencv_test_3d", + "opencv_test_calib", + "opencv_test_core", + "opencv_test_dnn_classic", + "opencv_test_dnn", + "opencv_test_features", + "opencv_test_flann", + "opencv_test_highgui", + "opencv_test_imgcodecs", + "opencv_test_imgproc", + "opencv_test_objdetect", + "opencv_test_photo", + "opencv_test_stereo", + "opencv_test_stitching", + "opencv_test_video", + "opencv_test_videoio", + "opencv_perf_3d", + "opencv_perf_calib", + "opencv_perf_core", + "opencv_perf_dnn", + "opencv_perf_features", + "opencv_perf_imgcodecs", + "opencv_perf_imgproc", + "opencv_perf_objdetect", + "opencv_perf_photo", + "opencv_perf_stereo", + "opencv_perf_stitching", + "opencv_perf_video", + "opencv_perf_videoio" + ], + + "linux-contrib": [ + "opencv_test_bgsegm", + "opencv_test_bioinspired", + "opencv_test_dnn_superres", + "opencv_test_face", + "opencv_test_fuzzy", + "opencv_test_gapi", + "opencv_test_hdf", + "opencv_test_img_hash", + "opencv_test_intensity_transform", + "opencv_test_line_descriptor", + "opencv_test_ml", + "opencv_test_optflow", + "opencv_test_phase_unwrapping", + "opencv_test_quality", + "opencv_test_rapid", + "opencv_test_reg", + "opencv_test_rgbd", + "opencv_test_saliency", + "opencv_test_sfm", + "opencv_test_shape", + "opencv_test_structured_light", + "opencv_test_superres", + "opencv_test_text", + "opencv_test_tracking", + "opencv_test_videostab", + "opencv_test_wechat_qrcode", + "opencv_test_xfeatures2d", + "opencv_test_ximgproc", + "opencv_test_xobjdetect", + "opencv_test_xphoto", + "opencv_test_xstereo", + "opencv_perf_bioinspired", + "opencv_perf_dnn_superres", + "opencv_perf_gapi", + "opencv_perf_line_descriptor", + "opencv_perf_optflow", + "opencv_perf_reg", + "opencv_perf_superres", + "opencv_perf_tracking", + "opencv_perf_xfeatures2d", + "opencv_perf_ximgproc", + "opencv_perf_xobjdetect", + "opencv_perf_xphoto", + "opencv_perf_xstereo" + ] + }, + "filters": { + "ubuntu-common": { + "test_gapi": [ + "AsyncAPICancelation/cancel/*" + ], + "test_videoio": [ + "videoio/videoio_synthetic.write_read_position/*_MPEG_GSTREAMER", + "videoio/videoio_synthetic.write_read_position/*_MJPG_GSTREAMER", + "videoio/videocapture_acceleration.read/yuv420p_mjpeg_mp4_GSTREAMER_*_MAT", + "videoio/videowriter_acceleration.write/mkv_MPEG_GSTREAMER_*_MAT" + ] + }, + "ubuntu-avx2": { + "test_core": [ + "Core_InRangeS/ElemWiseTest.accuracy/0", + "Core_InRange/ElemWiseTest.accuracy/0" + ] + } + }, + "options": { + "default": { + "args": { + "test": "--skip_unstable=1", + "perf": "--perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1" + }, + "exe": { + "opencv_test_dnn_classic": "opencv_test_dnn" + }, + "env": { + "opencv_test_dnn_classic": { + "OPENCV_FORCE_DNN_ENGINE": "1" + } + } + } + } +} From 99ed16d29f6d71a90517ff80e20d0f3b8b01979f Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 30 Oct 2025 12:12:42 +0300 Subject: [PATCH 06/29] windows: build release --- configure-and-build/action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure-and-build/action.yml b/configure-and-build/action.yml index cf8af44a..afa4901c 100644 --- a/configure-and-build/action.yml +++ b/configure-and-build/action.yml @@ -33,7 +33,10 @@ runs: shell: bash run: | echo "::group::Build" - cmake --build '${{ inputs.builddir }}' 2>&1 | tee '${{ inputs.builddir }}/log.txt' + if [ "$RUNNER_OS" == "Windows" ]; then + cfg="--config Release" + fi + cmake ${cfg} --build '${{ inputs.builddir }}' 2>&1 | tee '${{ inputs.builddir }}/log.txt' echo "::endgroup::" - shell: bash From c251d0d295cc8f6820a8a155b9be5e0ea521fa68 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 30 Oct 2025 12:38:26 +0300 Subject: [PATCH 07/29] fixup! windows: build release --- .github/workflows/OCV-PR-Windows.yaml | 2 +- configure-and-build/action.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/OCV-PR-Windows.yaml b/.github/workflows/OCV-PR-Windows.yaml index d6f0a7cf..745a2144 100644 --- a/.github/workflows/OCV-PR-Windows.yaml +++ b/.github/workflows/OCV-PR-Windows.yaml @@ -152,7 +152,7 @@ jobs: workdir: '${{ github.workspace }}' builddir: 'build-contrib' generator: '${{ matrix.vs }}' - options: '-A ${{ matrix.cmake_arch }} -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib/modules ${{ env.CMAKE_OPT }}' + options: '-A ${{ matrix.cmake_arch }} -DCMAKE_BUILD_TYPE=Release -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib/modules ${{ env.CMAKE_OPT }}' - name: Run OpenCV tests uses: ./run-tests diff --git a/configure-and-build/action.yml b/configure-and-build/action.yml index afa4901c..050bca17 100644 --- a/configure-and-build/action.yml +++ b/configure-and-build/action.yml @@ -32,11 +32,12 @@ runs: - working-directory: ${{ inputs.workdir }} shell: bash run: | + set -x echo "::group::Build" if [ "$RUNNER_OS" == "Windows" ]; then cfg="--config Release" fi - cmake ${cfg} --build '${{ inputs.builddir }}' 2>&1 | tee '${{ inputs.builddir }}/log.txt' + cmake --build '${{ inputs.builddir }}' ${cfg} 2>&1 | tee '${{ inputs.builddir }}/log.txt' echo "::endgroup::" - shell: bash From 2b7e36b7ae7cfe98dc6ea559fdbd6e2c244f356d Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 30 Oct 2025 13:10:13 +0300 Subject: [PATCH 08/29] fixup! windows: build release --- run-tests/action.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/run-tests/action.yml b/run-tests/action.yml index ef1bcb26..868a62e3 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -39,12 +39,12 @@ runs: - if: ${{ always() }} shell: bash run: | + echo "### Test summary:" >> $GITHUB_STEP_SUMMARY pyexe=python3 if [ "$RUNNER_OS" == "Windows" ]; then exeopt="--exesuffix .exe" pyexe=python fi - echo "### Test summary:" >> $GITHUB_STEP_SUMMARY ${pyexe} scripts/runner.py \ '--workdir=${{ inputs.workdir }}/${{ inputs.builddir }}' \ '--bindir=bin' \ @@ -55,7 +55,7 @@ runs: --filter=${{ join(fromJSON(inputs.filter), ' --filter=') }} \ '--options=${{ inputs.options }}' \ "--summary=$GITHUB_STEP_SUMMARY" \ - ${exeopt} + "${exeopt}" # Logs @@ -73,11 +73,11 @@ runs: shell: bash working-directory: ${{ inputs.workdir }}/${{ inputs.builddir }} run: | + echo "::group::Python test" pyexe=python3 if [ "$RUNNER_OS" == "Windows" ]; then pyexe=python fi - echo "::group::Python test" ${pyexe} ../opencv/modules/python/test/test.py --repo ../opencv -v echo "::endgroup::" @@ -85,11 +85,11 @@ runs: shell: bash working-directory: ${{ inputs.workdir }}/${{ inputs.builddir }} run: | + echo "::group::Python app test" pyexe=python3 if [ "$RUNNER_OS" == "Windows" ]; then pyexe=python fi - echo "::group::Python app test" if [ -f "../opencv/apps/python_app_test.py" ]; then ${pyexe} "../opencv/apps/python_app_test.py" --repo ../opencv -v fi @@ -103,7 +103,11 @@ runs: working-directory: ${{ inputs.workdir }}/${{ inputs.builddir }} run: | echo "::group::Java test" - ${{ inputs.wrapper }} python3 ../opencv/modules/ts/misc/run.py . -a -t java + pyexe=python3 + if [ "$RUNNER_OS" == "Windows" ]; then + pyexe=python + fi + ${{ inputs.wrapper }} ${pyexe} ../opencv/modules/ts/misc/run.py . -a -t java echo "::endgroup::" # Logs From 427f37092fb356e33401817dda7b1376b23c5dfd Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 30 Oct 2025 13:51:28 +0300 Subject: [PATCH 09/29] fixup! windows: build release --- run-tests/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/run-tests/action.yml b/run-tests/action.yml index 868a62e3..c9c87c91 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -41,8 +41,8 @@ runs: run: | echo "### Test summary:" >> $GITHUB_STEP_SUMMARY pyexe=python3 - if [ "$RUNNER_OS" == "Windows" ]; then - exeopt="--exesuffix .exe" + if [ $RUNNER_OS == Windows ]; then + exeopt=--exesuffix .exe pyexe=python fi ${pyexe} scripts/runner.py \ @@ -55,7 +55,7 @@ runs: --filter=${{ join(fromJSON(inputs.filter), ' --filter=') }} \ '--options=${{ inputs.options }}' \ "--summary=$GITHUB_STEP_SUMMARY" \ - "${exeopt}" + ${exeopt} # Logs From 1bc5600385ab8b5239e431da04abe9f5ac9ca1ab Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 30 Oct 2025 14:44:05 +0300 Subject: [PATCH 10/29] fixup! windows: build release --- .github/workflows/OCV-PR-Windows.yaml | 16 ++++++++-------- run-tests/action.yml | 5 ++--- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/OCV-PR-Windows.yaml b/.github/workflows/OCV-PR-Windows.yaml index 745a2144..02b64b04 100644 --- a/.github/workflows/OCV-PR-Windows.yaml +++ b/.github/workflows/OCV-PR-Windows.yaml @@ -48,7 +48,7 @@ jobs: # NOTE: Debugging fail-fast: true # fail-fast: false - max-parallel: 2 + max-parallel: 1 matrix: arch: [ x86, x64, arm64 ] config: [ base ] @@ -146,13 +146,13 @@ jobs: generator: '${{ matrix.vs }}' options: '-A ${{ matrix.cmake_arch }} ${{ env.CMAKE_OPT }}' - - name: Configure and build OpenCV with contrib - uses: ./configure-and-build - with: - workdir: '${{ github.workspace }}' - builddir: 'build-contrib' - generator: '${{ matrix.vs }}' - options: '-A ${{ matrix.cmake_arch }} -DCMAKE_BUILD_TYPE=Release -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib/modules ${{ env.CMAKE_OPT }}' + # - name: Configure and build OpenCV with contrib + # uses: ./configure-and-build + # with: + # workdir: '${{ github.workspace }}' + # builddir: 'build-contrib' + # generator: '${{ matrix.vs }}' + # options: '-A ${{ matrix.cmake_arch }} -DCMAKE_BUILD_TYPE=Release -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib/modules ${{ env.CMAKE_OPT }}' - name: Run OpenCV tests uses: ./run-tests diff --git a/run-tests/action.yml b/run-tests/action.yml index c9c87c91..ddcc5b25 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -42,7 +42,6 @@ runs: echo "### Test summary:" >> $GITHUB_STEP_SUMMARY pyexe=python3 if [ $RUNNER_OS == Windows ]; then - exeopt=--exesuffix .exe pyexe=python fi ${pyexe} scripts/runner.py \ @@ -53,9 +52,9 @@ runs: '--timeout=${{ inputs.timeout }}' \ --suite=${{ join(fromJSON(inputs.suite), ' --suite=') }} \ --filter=${{ join(fromJSON(inputs.filter), ' --filter=') }} \ + '--exesuffix=.exe' \ '--options=${{ inputs.options }}' \ - "--summary=$GITHUB_STEP_SUMMARY" \ - ${exeopt} + "--summary=$GITHUB_STEP_SUMMARY" # Logs From 6f5a74fcc4754d9f14319ca4d7ad3846f33b49a3 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 30 Oct 2025 15:15:13 +0300 Subject: [PATCH 11/29] fixup! windows: build release --- run-tests/action.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/run-tests/action.yml b/run-tests/action.yml index ddcc5b25..4580a6ea 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -40,11 +40,7 @@ runs: shell: bash run: | echo "### Test summary:" >> $GITHUB_STEP_SUMMARY - pyexe=python3 - if [ $RUNNER_OS == Windows ]; then - pyexe=python - fi - ${pyexe} scripts/runner.py \ + python scripts/runner.py \ '--workdir=${{ inputs.workdir }}/${{ inputs.builddir }}' \ '--bindir=bin' \ '--logdir=${{ inputs.logdir }}' \ From 611d0237cb11d2e959d32e9daf51549e5dd5ce7b Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 30 Oct 2025 20:08:06 +0300 Subject: [PATCH 12/29] fixup! windows: build release --- run-tests/action.yml | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/run-tests/action.yml b/run-tests/action.yml index 4580a6ea..fb604978 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -40,15 +40,14 @@ runs: shell: bash run: | echo "### Test summary:" >> $GITHUB_STEP_SUMMARY - python scripts/runner.py \ - '--workdir=${{ inputs.workdir }}/${{ inputs.builddir }}' \ + python3 scripts/runner.py \ + '--workdir=$(wslpath ${{ inputs.workdir }}/${{ inputs.builddir }})' \ '--bindir=bin' \ - '--logdir=${{ inputs.logdir }}' \ + '--logdir=$(wslpath ${{ inputs.logdir }})' \ '--plan=scripts/${{ inputs.plan }}' \ '--timeout=${{ inputs.timeout }}' \ --suite=${{ join(fromJSON(inputs.suite), ' --suite=') }} \ --filter=${{ join(fromJSON(inputs.filter), ' --filter=') }} \ - '--exesuffix=.exe' \ '--options=${{ inputs.options }}' \ "--summary=$GITHUB_STEP_SUMMARY" @@ -69,11 +68,7 @@ runs: working-directory: ${{ inputs.workdir }}/${{ inputs.builddir }} run: | echo "::group::Python test" - pyexe=python3 - if [ "$RUNNER_OS" == "Windows" ]; then - pyexe=python - fi - ${pyexe} ../opencv/modules/python/test/test.py --repo ../opencv -v + python3 ../opencv/modules/python/test/test.py --repo ../opencv -v echo "::endgroup::" - if: ${{ always() && fromJSON(inputs.enable_python) }} @@ -81,12 +76,8 @@ runs: working-directory: ${{ inputs.workdir }}/${{ inputs.builddir }} run: | echo "::group::Python app test" - pyexe=python3 - if [ "$RUNNER_OS" == "Windows" ]; then - pyexe=python - fi if [ -f "../opencv/apps/python_app_test.py" ]; then - ${pyexe} "../opencv/apps/python_app_test.py" --repo ../opencv -v + python3 "../opencv/apps/python_app_test.py" --repo ../opencv -v fi echo "::endgroup::" @@ -98,11 +89,7 @@ runs: working-directory: ${{ inputs.workdir }}/${{ inputs.builddir }} run: | echo "::group::Java test" - pyexe=python3 - if [ "$RUNNER_OS" == "Windows" ]; then - pyexe=python - fi - ${{ inputs.wrapper }} ${pyexe} ../opencv/modules/ts/misc/run.py . -a -t java + ${{ inputs.wrapper }} python3 ../opencv/modules/ts/misc/run.py . -a -t java echo "::endgroup::" # Logs From 6239ddad50bdc6c55e76dc2fe4eeb577dc80bbab Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 30 Oct 2025 20:29:26 +0300 Subject: [PATCH 13/29] fixup! windows: build release --- .github/workflows/OCV-PR-Windows.yaml | 6 ++---- run-tests/action.yml | 25 +++++++++++++++++++------ 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/OCV-PR-Windows.yaml b/.github/workflows/OCV-PR-Windows.yaml index 02b64b04..41be4e87 100644 --- a/.github/workflows/OCV-PR-Windows.yaml +++ b/.github/workflows/OCV-PR-Windows.yaml @@ -162,12 +162,10 @@ jobs: OPENCV_TEST_CHECK_OPTIONAL_DATA: 1 PYTHONPATH: '${{ github.workspace }}/${{ env.MAIN_BUILD_DIR }}/python_loader:$PYTHONPATH' with: - workdir: '${{ github.workspace }}' + workdir: '${{ env.GITHUB_WORKSPACE }}' builddir: '${{ env.MAIN_BUILD_DIR }}/Release' - logdir: '${{ github.workspace }}' + logdir: '${{ env.GITHUB_WORKSPACE }}' plan: "test-plan-win-${{ matrix.branch }}.json" - # NOTE: Just keeping this construction here for possible future use: - # ${{ (github.event.repository.name == 'opencv_contrib') && format('''linux-contrib-{0}''', matrix.branch) || '' }} suite: "[ ${{ (github.event.repository.name == 'opencv_contrib') && '''contrib''' || '''main''' }} ]" enable_python: "true" enable_java: "true" diff --git a/run-tests/action.yml b/run-tests/action.yml index fb604978..4580a6ea 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -40,14 +40,15 @@ runs: shell: bash run: | echo "### Test summary:" >> $GITHUB_STEP_SUMMARY - python3 scripts/runner.py \ - '--workdir=$(wslpath ${{ inputs.workdir }}/${{ inputs.builddir }})' \ + python scripts/runner.py \ + '--workdir=${{ inputs.workdir }}/${{ inputs.builddir }}' \ '--bindir=bin' \ - '--logdir=$(wslpath ${{ inputs.logdir }})' \ + '--logdir=${{ inputs.logdir }}' \ '--plan=scripts/${{ inputs.plan }}' \ '--timeout=${{ inputs.timeout }}' \ --suite=${{ join(fromJSON(inputs.suite), ' --suite=') }} \ --filter=${{ join(fromJSON(inputs.filter), ' --filter=') }} \ + '--exesuffix=.exe' \ '--options=${{ inputs.options }}' \ "--summary=$GITHUB_STEP_SUMMARY" @@ -68,7 +69,11 @@ runs: working-directory: ${{ inputs.workdir }}/${{ inputs.builddir }} run: | echo "::group::Python test" - python3 ../opencv/modules/python/test/test.py --repo ../opencv -v + pyexe=python3 + if [ "$RUNNER_OS" == "Windows" ]; then + pyexe=python + fi + ${pyexe} ../opencv/modules/python/test/test.py --repo ../opencv -v echo "::endgroup::" - if: ${{ always() && fromJSON(inputs.enable_python) }} @@ -76,8 +81,12 @@ runs: working-directory: ${{ inputs.workdir }}/${{ inputs.builddir }} run: | echo "::group::Python app test" + pyexe=python3 + if [ "$RUNNER_OS" == "Windows" ]; then + pyexe=python + fi if [ -f "../opencv/apps/python_app_test.py" ]; then - python3 "../opencv/apps/python_app_test.py" --repo ../opencv -v + ${pyexe} "../opencv/apps/python_app_test.py" --repo ../opencv -v fi echo "::endgroup::" @@ -89,7 +98,11 @@ runs: working-directory: ${{ inputs.workdir }}/${{ inputs.builddir }} run: | echo "::group::Java test" - ${{ inputs.wrapper }} python3 ../opencv/modules/ts/misc/run.py . -a -t java + pyexe=python3 + if [ "$RUNNER_OS" == "Windows" ]; then + pyexe=python + fi + ${{ inputs.wrapper }} ${pyexe} ../opencv/modules/ts/misc/run.py . -a -t java echo "::endgroup::" # Logs From c3c515e851cff506ebabe44e12ada9cdd82f3f64 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 30 Oct 2025 20:46:59 +0300 Subject: [PATCH 14/29] fixup! windows: build release --- run-tests/action.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/run-tests/action.yml b/run-tests/action.yml index 4580a6ea..232e2cb9 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -40,17 +40,17 @@ runs: shell: bash run: | echo "### Test summary:" >> $GITHUB_STEP_SUMMARY - python scripts/runner.py \ - '--workdir=${{ inputs.workdir }}/${{ inputs.builddir }}' \ - '--bindir=bin' \ - '--logdir=${{ inputs.logdir }}' \ - '--plan=scripts/${{ inputs.plan }}' \ - '--timeout=${{ inputs.timeout }}' \ - --suite=${{ join(fromJSON(inputs.suite), ' --suite=') }} \ - --filter=${{ join(fromJSON(inputs.filter), ' --filter=') }} \ - '--exesuffix=.exe' \ - '--options=${{ inputs.options }}' \ - "--summary=$GITHUB_STEP_SUMMARY" + +# python scripts/runner.py \ +# '--workdir=${{ inputs.workdir }}/${{ inputs.builddir }}' \ +# '--bindir=bin' \ +# '--logdir=${{ inputs.logdir }}' \ +# '--plan=scripts/${{ inputs.plan }}' \ +# '--timeout=${{ inputs.timeout }}' \ +# --suite=${{ join(fromJSON(inputs.suite), ' --suite=') }} \ +# --filter=${{ join(fromJSON(inputs.filter), ' --filter=') }} \ +# '--options=${{ inputs.options }}' \ +# "--summary=$GITHUB_STEP_SUMMARY" # Logs From 840b9bde70e08d53ac0f1856b571a3bd483e54b9 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 30 Oct 2025 22:49:59 +0300 Subject: [PATCH 15/29] fixup! windows: build release --- run-tests/action.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/run-tests/action.yml b/run-tests/action.yml index 232e2cb9..b9579cde 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -40,17 +40,16 @@ runs: shell: bash run: | echo "### Test summary:" >> $GITHUB_STEP_SUMMARY - -# python scripts/runner.py \ + python scripts/runner.py \ + '--bindir=bin' \ + "--summary=$GITHUB_STEP_SUMMARY" # '--workdir=${{ inputs.workdir }}/${{ inputs.builddir }}' \ -# '--bindir=bin' \ # '--logdir=${{ inputs.logdir }}' \ # '--plan=scripts/${{ inputs.plan }}' \ # '--timeout=${{ inputs.timeout }}' \ # --suite=${{ join(fromJSON(inputs.suite), ' --suite=') }} \ # --filter=${{ join(fromJSON(inputs.filter), ' --filter=') }} \ # '--options=${{ inputs.options }}' \ -# "--summary=$GITHUB_STEP_SUMMARY" # Logs From 77f3d37e14f01c4ba2ec2b775a3aa0c425a68680 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 30 Oct 2025 23:28:56 +0300 Subject: [PATCH 16/29] fixup! windows: build release --- .github/workflows/OCV-PR-Windows.yaml | 4 ++-- run-tests/action.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/OCV-PR-Windows.yaml b/.github/workflows/OCV-PR-Windows.yaml index 41be4e87..b5304da2 100644 --- a/.github/workflows/OCV-PR-Windows.yaml +++ b/.github/workflows/OCV-PR-Windows.yaml @@ -162,9 +162,9 @@ jobs: OPENCV_TEST_CHECK_OPTIONAL_DATA: 1 PYTHONPATH: '${{ github.workspace }}/${{ env.MAIN_BUILD_DIR }}/python_loader:$PYTHONPATH' with: - workdir: '${{ env.GITHUB_WORKSPACE }}' + workdir: '${{ github.workspace }}' builddir: '${{ env.MAIN_BUILD_DIR }}/Release' - logdir: '${{ env.GITHUB_WORKSPACE }}' + logdir: '${{ env.github.workspace }}' plan: "test-plan-win-${{ matrix.branch }}.json" suite: "[ ${{ (github.event.repository.name == 'opencv_contrib') && '''contrib''' || '''main''' }} ]" enable_python: "true" diff --git a/run-tests/action.yml b/run-tests/action.yml index b9579cde..cfaa2121 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -42,8 +42,8 @@ runs: echo "### Test summary:" >> $GITHUB_STEP_SUMMARY python scripts/runner.py \ '--bindir=bin' \ + '--workdir=${{ inputs.workdir }}/${{ inputs.builddir }}' \ "--summary=$GITHUB_STEP_SUMMARY" -# '--workdir=${{ inputs.workdir }}/${{ inputs.builddir }}' \ # '--logdir=${{ inputs.logdir }}' \ # '--plan=scripts/${{ inputs.plan }}' \ # '--timeout=${{ inputs.timeout }}' \ From 0c74e5f42ad340654fcd963d9dc7c4608290ec6f Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Fri, 31 Oct 2025 10:04:15 +0300 Subject: [PATCH 17/29] fixup! windows: build release --- run-tests/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/run-tests/action.yml b/run-tests/action.yml index cfaa2121..a1eaae1f 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -43,10 +43,10 @@ runs: python scripts/runner.py \ '--bindir=bin' \ '--workdir=${{ inputs.workdir }}/${{ inputs.builddir }}' \ + '--logdir=${{ inputs.logdir }}' \ + '--plan=scripts/${{ inputs.plan }}' \ + '--timeout=${{ inputs.timeout }}' \ "--summary=$GITHUB_STEP_SUMMARY" -# '--logdir=${{ inputs.logdir }}' \ -# '--plan=scripts/${{ inputs.plan }}' \ -# '--timeout=${{ inputs.timeout }}' \ # --suite=${{ join(fromJSON(inputs.suite), ' --suite=') }} \ # --filter=${{ join(fromJSON(inputs.filter), ' --filter=') }} \ # '--options=${{ inputs.options }}' \ From 41cda2245ba30ffd29f0ac0a04fb168d582e0b7b Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Fri, 31 Oct 2025 10:24:36 +0300 Subject: [PATCH 18/29] fixup! windows: build release --- run-tests/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/run-tests/action.yml b/run-tests/action.yml index a1eaae1f..94ba3fbd 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -46,10 +46,10 @@ runs: '--logdir=${{ inputs.logdir }}' \ '--plan=scripts/${{ inputs.plan }}' \ '--timeout=${{ inputs.timeout }}' \ + --suite=${{ join(fromJSON(inputs.suite), ' --suite=') }} \ + --filter=${{ join(fromJSON(inputs.filter), ' --filter=') }} \ + '--options=${{ inputs.options }}' \ "--summary=$GITHUB_STEP_SUMMARY" -# --suite=${{ join(fromJSON(inputs.suite), ' --suite=') }} \ -# --filter=${{ join(fromJSON(inputs.filter), ' --filter=') }} \ -# '--options=${{ inputs.options }}' \ # Logs From cc2b1426f2c56609ecb7a0d48df3e06d630e339c Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Fri, 31 Oct 2025 17:06:32 +0300 Subject: [PATCH 19/29] fixup! windows: build release --- run-tests/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-tests/action.yml b/run-tests/action.yml index 94ba3fbd..fba5291b 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -48,8 +48,8 @@ runs: '--timeout=${{ inputs.timeout }}' \ --suite=${{ join(fromJSON(inputs.suite), ' --suite=') }} \ --filter=${{ join(fromJSON(inputs.filter), ' --filter=') }} \ - '--options=${{ inputs.options }}' \ "--summary=$GITHUB_STEP_SUMMARY" +# '--options=${{ inputs.options }}' \ # Logs From ca0b374c7f3998e514c1888e6bc19ed42d6c5550 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Fri, 31 Oct 2025 22:41:41 +0300 Subject: [PATCH 20/29] fixup! windows: build release --- run-tests/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-tests/action.yml b/run-tests/action.yml index fba5291b..e10567fa 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -46,10 +46,10 @@ runs: '--logdir=${{ inputs.logdir }}' \ '--plan=scripts/${{ inputs.plan }}' \ '--timeout=${{ inputs.timeout }}' \ - --suite=${{ join(fromJSON(inputs.suite), ' --suite=') }} \ --filter=${{ join(fromJSON(inputs.filter), ' --filter=') }} \ "--summary=$GITHUB_STEP_SUMMARY" # '--options=${{ inputs.options }}' \ +# --suite=${{ join(fromJSON(inputs.suite), ' --suite=') }} \ # Logs From b3a35723dfb93e3467e7b4b007b3efecff0a15bd Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Sat, 1 Nov 2025 17:53:33 +0300 Subject: [PATCH 21/29] fixup! windows: build release --- .github/workflows/OCV-PR-Windows.yaml | 1 + run-tests/action.yml | 14 +++++++++++--- scripts/test-plan-win-4.x.json | 14 +------------- scripts/test-plan-win-5.x.json | 14 +------------- 4 files changed, 14 insertions(+), 29 deletions(-) diff --git a/.github/workflows/OCV-PR-Windows.yaml b/.github/workflows/OCV-PR-Windows.yaml index b5304da2..f09a00bd 100644 --- a/.github/workflows/OCV-PR-Windows.yaml +++ b/.github/workflows/OCV-PR-Windows.yaml @@ -169,6 +169,7 @@ jobs: suite: "[ ${{ (github.event.repository.name == 'opencv_contrib') && '''contrib''' || '''main''' }} ]" enable_python: "true" enable_java: "true" + filter: "[ 'windows-common' ]" suffix: '${{ matrix.version }}_${{ matrix.branch }}' - if: ${{ always() && env.WARNINGS == '1' }} diff --git a/run-tests/action.yml b/run-tests/action.yml index e10567fa..9f68cf42 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -13,8 +13,10 @@ inputs: description: "Test plan (relative to scripts subfolder)" suite: description: "Suite in test plan (gtest) (JSON list)" + default: "default" filter: description: "Filter(s) in test plan (gtest) (JSON list)" + default: "default" timeout: description: "One test timeout (min)" default: "10" @@ -40,16 +42,22 @@ runs: shell: bash run: | echo "### Test summary:" >> $GITHUB_STEP_SUMMARY - python scripts/runner.py \ + pyexe=python3 + if [ "$RUNNER_OS" == "Windows" ]; then + pyexe=python + opt=--exesuffix=.exe + fi + ${pyexe} scripts/runner.py \ '--bindir=bin' \ '--workdir=${{ inputs.workdir }}/${{ inputs.builddir }}' \ '--logdir=${{ inputs.logdir }}' \ '--plan=scripts/${{ inputs.plan }}' \ '--timeout=${{ inputs.timeout }}' \ + '--options=${{ inputs.options }}' \ --filter=${{ join(fromJSON(inputs.filter), ' --filter=') }} \ + --suite=${{ join(fromJSON(inputs.suite), ' --suite=') }} \ + ${opt} \ "--summary=$GITHUB_STEP_SUMMARY" -# '--options=${{ inputs.options }}' \ -# --suite=${{ join(fromJSON(inputs.suite), ' --suite=') }} \ # Logs diff --git a/scripts/test-plan-win-4.x.json b/scripts/test-plan-win-4.x.json index 3ff9924b..89094ca3 100644 --- a/scripts/test-plan-win-4.x.json +++ b/scripts/test-plan-win-4.x.json @@ -79,21 +79,9 @@ ] }, "filters": { - "ubuntu-common": { + "windows-common": { "test_gapi": [ "AsyncAPICancelation/cancel/*" - ], - "test_videoio": [ - "videoio/videoio_synthetic.write_read_position/*_MPEG_GSTREAMER", - "videoio/videoio_synthetic.write_read_position/*_MJPG_GSTREAMER", - "videoio/videocapture_acceleration.read/yuv420p_mjpeg_mp4_GSTREAMER_*_MAT", - "videoio/videowriter_acceleration.write/mkv_MPEG_GSTREAMER_*_MAT" - ] - }, - "ubuntu-avx2": { - "test_core": [ - "Core_InRangeS/ElemWiseTest.accuracy/0", - "Core_InRange/ElemWiseTest.accuracy/0" ] } }, diff --git a/scripts/test-plan-win-5.x.json b/scripts/test-plan-win-5.x.json index 0e38acdb..c89be1f3 100644 --- a/scripts/test-plan-win-5.x.json +++ b/scripts/test-plan-win-5.x.json @@ -82,21 +82,9 @@ ] }, "filters": { - "ubuntu-common": { + "windows-common": { "test_gapi": [ "AsyncAPICancelation/cancel/*" - ], - "test_videoio": [ - "videoio/videoio_synthetic.write_read_position/*_MPEG_GSTREAMER", - "videoio/videoio_synthetic.write_read_position/*_MJPG_GSTREAMER", - "videoio/videocapture_acceleration.read/yuv420p_mjpeg_mp4_GSTREAMER_*_MAT", - "videoio/videowriter_acceleration.write/mkv_MPEG_GSTREAMER_*_MAT" - ] - }, - "ubuntu-avx2": { - "test_core": [ - "Core_InRangeS/ElemWiseTest.accuracy/0", - "Core_InRange/ElemWiseTest.accuracy/0" ] } }, From 59886ce6a9b22393b1ef67781261d443dced3aff Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Sat, 1 Nov 2025 18:09:09 +0300 Subject: [PATCH 22/29] fixup! windows: build release --- scripts/test-plan-win-4.x.json | 4 ++-- scripts/test-plan-win-5.x.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/test-plan-win-4.x.json b/scripts/test-plan-win-4.x.json index 89094ca3..81aefc17 100644 --- a/scripts/test-plan-win-4.x.json +++ b/scripts/test-plan-win-4.x.json @@ -2,7 +2,7 @@ "suites": { "short": [ "opencv_test_core", "opencv_test_imgproc", "opencv_test_photo" ], - "linux": [ + "main": [ "opencv_test_calib3d", "opencv_test_core", "opencv_test_dnn", @@ -32,7 +32,7 @@ "opencv_perf_videoio" ], - "linux-contrib": [ + "contrib": [ "opencv_test_bgsegm", "opencv_test_bioinspired", "opencv_test_dnn_superres", diff --git a/scripts/test-plan-win-5.x.json b/scripts/test-plan-win-5.x.json index c89be1f3..5fcb032e 100644 --- a/scripts/test-plan-win-5.x.json +++ b/scripts/test-plan-win-5.x.json @@ -2,7 +2,7 @@ "suites": { "short": [ "opencv_test_core", "opencv_test_imgproc", "opencv_test_photo" ], - "linux": [ + "main": [ "opencv_test_3d", "opencv_test_calib", "opencv_test_core", @@ -34,7 +34,7 @@ "opencv_perf_videoio" ], - "linux-contrib": [ + "contrib": [ "opencv_test_bgsegm", "opencv_test_bioinspired", "opencv_test_dnn_superres", From 4a4c14b4844fdca14b6612afc09ecf743385f971 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Sat, 1 Nov 2025 18:27:27 +0300 Subject: [PATCH 23/29] fixup! windows: build release --- .github/workflows/OCV-PR-Windows.yaml | 2 +- run-tests/action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/OCV-PR-Windows.yaml b/.github/workflows/OCV-PR-Windows.yaml index f09a00bd..e3dd715d 100644 --- a/.github/workflows/OCV-PR-Windows.yaml +++ b/.github/workflows/OCV-PR-Windows.yaml @@ -163,7 +163,7 @@ jobs: PYTHONPATH: '${{ github.workspace }}/${{ env.MAIN_BUILD_DIR }}/python_loader:$PYTHONPATH' with: workdir: '${{ github.workspace }}' - builddir: '${{ env.MAIN_BUILD_DIR }}/Release' + builddir: '${{ env.MAIN_BUILD_DIR }}' logdir: '${{ env.github.workspace }}' plan: "test-plan-win-${{ matrix.branch }}.json" suite: "[ ${{ (github.event.repository.name == 'opencv_contrib') && '''contrib''' || '''main''' }} ]" diff --git a/run-tests/action.yml b/run-tests/action.yml index 9f68cf42..218c450f 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -45,7 +45,7 @@ runs: pyexe=python3 if [ "$RUNNER_OS" == "Windows" ]; then pyexe=python - opt=--exesuffix=.exe + opt="--exesuffix=.exe --bindir=bin/Release" fi ${pyexe} scripts/runner.py \ '--bindir=bin' \ From 92dabfcc80018dd833a57c6bc1f1fcd31bcbed2e Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Sat, 1 Nov 2025 20:21:05 +0300 Subject: [PATCH 24/29] fixup! windows: build release --- .github/workflows/OCV-PR-Windows.yaml | 1 + scripts/test-plan-win-4.x.json | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/OCV-PR-Windows.yaml b/.github/workflows/OCV-PR-Windows.yaml index e3dd715d..c4480651 100644 --- a/.github/workflows/OCV-PR-Windows.yaml +++ b/.github/workflows/OCV-PR-Windows.yaml @@ -171,6 +171,7 @@ jobs: enable_java: "true" filter: "[ 'windows-common' ]" suffix: '${{ matrix.version }}_${{ matrix.branch }}' + timeout: 15 - if: ${{ always() && env.WARNINGS == '1' }} name: Warnings check diff --git a/scripts/test-plan-win-4.x.json b/scripts/test-plan-win-4.x.json index 81aefc17..3c6a5dc3 100644 --- a/scripts/test-plan-win-4.x.json +++ b/scripts/test-plan-win-4.x.json @@ -80,8 +80,14 @@ }, "filters": { "windows-common": { - "test_gapi": [ - "AsyncAPICancelation/cancel/*" + "test_core": [ + "Samples.findFile" + ], + "test_videoio": [ + "videoio/videocapture_acceleration.read/yuv420p_libvpxxvp9_mp4_MSMF_NONE_MAT" + ], + "perf_dnn": [ + "Utils_blobFromImages.HWC_TO_NCHW/6" ] } }, From 7e5cfcb3d77ed8cbbcb20aa020604b96bd18b1cc Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Sat, 1 Nov 2025 20:22:37 +0300 Subject: [PATCH 25/29] fixup! windows: build release --- .github/workflows/OCV-PR-Windows.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/OCV-PR-Windows.yaml b/.github/workflows/OCV-PR-Windows.yaml index c4480651..d2b58e29 100644 --- a/.github/workflows/OCV-PR-Windows.yaml +++ b/.github/workflows/OCV-PR-Windows.yaml @@ -164,7 +164,7 @@ jobs: with: workdir: '${{ github.workspace }}' builddir: '${{ env.MAIN_BUILD_DIR }}' - logdir: '${{ env.github.workspace }}' + logdir: '${{ github.workspace }}' plan: "test-plan-win-${{ matrix.branch }}.json" suite: "[ ${{ (github.event.repository.name == 'opencv_contrib') && '''contrib''' || '''main''' }} ]" enable_python: "true" From 460c71a29c490667ccfcc6c263af1eaab1d8c8d9 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Sat, 1 Nov 2025 21:51:55 +0300 Subject: [PATCH 26/29] fixup! windows: build release --- .github/workflows/OCV-PR-Windows.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/OCV-PR-Windows.yaml b/.github/workflows/OCV-PR-Windows.yaml index d2b58e29..c5bb82ef 100644 --- a/.github/workflows/OCV-PR-Windows.yaml +++ b/.github/workflows/OCV-PR-Windows.yaml @@ -167,8 +167,8 @@ jobs: logdir: '${{ github.workspace }}' plan: "test-plan-win-${{ matrix.branch }}.json" suite: "[ ${{ (github.event.repository.name == 'opencv_contrib') && '''contrib''' || '''main''' }} ]" - enable_python: "true" - enable_java: "true" + enable_python: "false" + enable_java: "false" filter: "[ 'windows-common' ]" suffix: '${{ matrix.version }}_${{ matrix.branch }}' timeout: 15 From 4af42acd9ae97c781df4a99da3f40659beaf5df3 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Sat, 1 Nov 2025 22:57:06 +0300 Subject: [PATCH 27/29] fixup! windows: build release --- .github/workflows/OCV-PR-Windows.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/OCV-PR-Windows.yaml b/.github/workflows/OCV-PR-Windows.yaml index c5bb82ef..f51bc5b5 100644 --- a/.github/workflows/OCV-PR-Windows.yaml +++ b/.github/workflows/OCV-PR-Windows.yaml @@ -46,9 +46,9 @@ jobs: - branch_eval strategy: # NOTE: Debugging - fail-fast: true - # fail-fast: false - max-parallel: 1 + # fail-fast: true + fail-fast: false + max-parallel: 2 matrix: arch: [ x86, x64, arm64 ] config: [ base ] @@ -146,13 +146,13 @@ jobs: generator: '${{ matrix.vs }}' options: '-A ${{ matrix.cmake_arch }} ${{ env.CMAKE_OPT }}' - # - name: Configure and build OpenCV with contrib - # uses: ./configure-and-build - # with: - # workdir: '${{ github.workspace }}' - # builddir: 'build-contrib' - # generator: '${{ matrix.vs }}' - # options: '-A ${{ matrix.cmake_arch }} -DCMAKE_BUILD_TYPE=Release -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib/modules ${{ env.CMAKE_OPT }}' + - name: Configure and build OpenCV with contrib + uses: ./configure-and-build + with: + workdir: '${{ github.workspace }}' + builddir: 'build-contrib' + generator: '${{ matrix.vs }}' + options: '-A ${{ matrix.cmake_arch }} -DCMAKE_BUILD_TYPE=Release -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib/modules ${{ env.CMAKE_OPT }}' - name: Run OpenCV tests uses: ./run-tests From d40c80d10eaa952caaa85e93272fa5b844b316e1 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Sun, 2 Nov 2025 12:12:23 +0300 Subject: [PATCH 28/29] fixup! windows: build release --- .github/workflows/OCV-PR-Windows.yaml | 2 +- scripts/test-plan-win-5.x.json | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/OCV-PR-Windows.yaml b/.github/workflows/OCV-PR-Windows.yaml index f51bc5b5..b5c7d3c2 100644 --- a/.github/workflows/OCV-PR-Windows.yaml +++ b/.github/workflows/OCV-PR-Windows.yaml @@ -170,7 +170,7 @@ jobs: enable_python: "false" enable_java: "false" filter: "[ 'windows-common' ]" - suffix: '${{ matrix.version }}_${{ matrix.branch }}' + suffix: '${{ matrix.arch }}_${{ matrix.branch }}' timeout: 15 - if: ${{ always() && env.WARNINGS == '1' }} diff --git a/scripts/test-plan-win-5.x.json b/scripts/test-plan-win-5.x.json index 5fcb032e..4d2e2a0d 100644 --- a/scripts/test-plan-win-5.x.json +++ b/scripts/test-plan-win-5.x.json @@ -83,8 +83,11 @@ }, "filters": { "windows-common": { - "test_gapi": [ - "AsyncAPICancelation/cancel/*" + "test_core": [ + "Samples.findFile" + ], + "test_imgproc": [ + "Drawing.ttf_text" ] } }, From 8569b51163c907d9913cab50765034ddc70fe50f Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Fri, 7 Nov 2025 12:01:12 +0300 Subject: [PATCH 29/29] Disable ARM builds and tests on Windows for now. --- .github/workflows/OCV-PR-Windows.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/OCV-PR-Windows.yaml b/.github/workflows/OCV-PR-Windows.yaml index b5c7d3c2..7330a27e 100644 --- a/.github/workflows/OCV-PR-Windows.yaml +++ b/.github/workflows/OCV-PR-Windows.yaml @@ -50,7 +50,7 @@ jobs: fail-fast: false max-parallel: 2 matrix: - arch: [ x86, x64, arm64 ] + arch: [ x86, x64 ] # , arm64 config: [ base ] include: - arch: x86