From 87e98e87888bd2089f25ca12dba0ac7a738eeea0 Mon Sep 17 00:00:00 2001 From: Andrey Senyaev Date: Sun, 24 Apr 2022 01:44:15 +0300 Subject: [PATCH 1/5] Fixed url for a fork --- .github/workflows/PR-3.4-U20.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/PR-3.4-U20.yaml b/.github/workflows/PR-3.4-U20.yaml index 8c4f0e90e2..1c4cb91b36 100644 --- a/.github/workflows/PR-3.4-U20.yaml +++ b/.github/workflows/PR-3.4-U20.yaml @@ -10,6 +10,7 @@ env: OPENCV_TEST_DATA_PATH: '/opencv_extra/testdata' OPENCV_DOCKER_WORKDIR: '/__w/opencv/opencv' 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' @@ -43,7 +44,7 @@ jobs: git config --global --add safe.directory ${{ env.OPENCV_DOCKER_WORKDIR }} git config user.email "opencv.ci" git config user.name "opencv.ci" - git pull -v "https://github.com/${{ env.PR_AUTHOR }}/opencv" "${{ env.SOURCE_BRANCH_NAME }}" + git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}" - name: Clone opencv_extra run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} --depth 1 https://github.com/opencv/opencv_extra.git /opencv_extra - name: Configure OpenCV @@ -154,7 +155,7 @@ jobs: git config --global --add safe.directory ${{ env.OPENCV_DOCKER_WORKDIR }} git config user.email "opencv.ci" git config user.name "opencv.ci" - git pull -v "https://github.com/${{ env.PR_AUTHOR }}/opencv" "${{ env.SOURCE_BRANCH_NAME }}" + git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}" - name: Clone opencv_contrib run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} --depth 1 https://github.com/opencv/opencv_contrib.git /opencv_contrib - name: Configure OpenCV Contrib From 8c42dbf71c424fbd500fa8ada772e4371d52abaf Mon Sep 17 00:00:00 2001 From: Andrey Senyaev Date: Tue, 26 Apr 2022 14:05:21 +0300 Subject: [PATCH 2/5] opencv_extra fork usage in Github Actions --- .github/workflows/PR-3.4-U20.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/PR-3.4-U20.yaml b/.github/workflows/PR-3.4-U20.yaml index 1c4cb91b36..e87deddd9d 100644 --- a/.github/workflows/PR-3.4-U20.yaml +++ b/.github/workflows/PR-3.4-U20.yaml @@ -46,7 +46,19 @@ jobs: git config user.name "opencv.ci" git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}" - name: Clone opencv_extra - run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} --depth 1 https://github.com/opencv/opencv_extra.git /opencv_extra + run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} https://github.com/opencv/opencv_extra.git /opencv_extra + - name: Merge opencv_extra with ${{ env.SOURCE_BRANCH_NAME }} branch + run: | + RET=$(git ls-remote --heads "https://github.com/${{ env.PR_AUTHOR }}/opencv_extra" "${{ env.SOURCE_BRANCH_NAME }}") || true + if [[ ! -z "$RET" ]]; then + echo "Merge opencv_extra with ${{ env.SOURCE_BRANCH_NAME }} branch" + cd /opencv_extra + git config user.email "opencv.ci" + git config user.name "opencv.ci" + git pull -v "https://github.com/${{ env.PR_AUTHOR }}/opencv_extra" "${{ env.SOURCE_BRANCH_NAME }}" + else + echo "No merge since ${{ env.PR_AUTHOR }}/opencv_extra does not have branch ${{ env.SOURCE_BRANCH_NAME }}" + fi - name: Configure OpenCV run: | cd /opencv-build From a848eccfc6913bbca1d896a45d8121c8ab6cdd1b Mon Sep 17 00:00:00 2001 From: Andrey Senyaev Date: Thu, 28 Apr 2022 16:19:00 +0300 Subject: [PATCH 3/5] opencv_contrib fork usage in Github Actions (3.4 branch) --- .github/workflows/PR-3.4-U20.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/PR-3.4-U20.yaml b/.github/workflows/PR-3.4-U20.yaml index e87deddd9d..2446a07478 100644 --- a/.github/workflows/PR-3.4-U20.yaml +++ b/.github/workflows/PR-3.4-U20.yaml @@ -49,8 +49,8 @@ jobs: run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} https://github.com/opencv/opencv_extra.git /opencv_extra - name: Merge opencv_extra with ${{ env.SOURCE_BRANCH_NAME }} branch run: | - RET=$(git ls-remote --heads "https://github.com/${{ env.PR_AUTHOR }}/opencv_extra" "${{ env.SOURCE_BRANCH_NAME }}") || true - if [[ ! -z "$RET" ]]; then + OPENCV_EXTRA_FORK=$(git ls-remote --heads "https://github.com/${{ env.PR_AUTHOR }}/opencv_extra" "${{ env.SOURCE_BRANCH_NAME }}") || true + if [[ ! -z "$OPENCV_EXTRA_FORK" ]]; then echo "Merge opencv_extra with ${{ env.SOURCE_BRANCH_NAME }} branch" cd /opencv_extra git config user.email "opencv.ci" @@ -169,7 +169,19 @@ jobs: git config user.name "opencv.ci" git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}" - name: Clone opencv_contrib - run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} --depth 1 https://github.com/opencv/opencv_contrib.git /opencv_contrib + run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} https://github.com/opencv/opencv_contrib.git /opencv_contrib + - name: Merge opencv_contrib with ${{ env.SOURCE_BRANCH_NAME }} branch + run: | + OPENCV_CONTRIB_FORK=$(git ls-remote --heads "https://github.com/${{ env.PR_AUTHOR }}/opencv_contrib" "${{ env.SOURCE_BRANCH_NAME }}") || true + if [[ ! -z "$OPENCV_CONTRIB_FORK" ]]; then + echo "Merge opencv_contrib with ${{ env.SOURCE_BRANCH_NAME }} branch" + cd /opencv_contrib + git config user.email "opencv.ci" + git config user.name "opencv.ci" + git pull -v "https://github.com/${{ env.PR_AUTHOR }}/opencv_contrib" "${{ env.SOURCE_BRANCH_NAME }}" + else + echo "No merge since ${{ env.PR_AUTHOR }}/opencv_contrib does not have branch ${{ env.SOURCE_BRANCH_NAME }}" + fi - name: Configure OpenCV Contrib run: | cd /opencv-contrib-build From 18ada77d8a24cd1e12ceb220c8530c247cf24bd4 Mon Sep 17 00:00:00 2001 From: Andrey Senyaev <76472231+asenyaev@users.noreply.github.com> Date: Thu, 28 Apr 2022 22:07:07 +0300 Subject: [PATCH 4/5] Merge pull request #21888 from asenyaev:asen/workflow_only_windows_3.4 Added workflow for Github Actions to build and test OpenCV on Windows for 3.4 branch * Added workflow for Github Actions to build and test OpenCV on Windows * Updated Github Actions for 3.4 branch on Windows using self-hosted runner * Fixed url for a fork in Windows workflow (3.4 branch) * opencv_extra fork usage in Github Actions --- .github/workflows/PR-3.4-W10.yaml | 166 ++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 .github/workflows/PR-3.4-W10.yaml diff --git a/.github/workflows/PR-3.4-W10.yaml b/.github/workflows/PR-3.4-W10.yaml new file mode 100644 index 0000000000..a7e8be71a2 --- /dev/null +++ b/.github/workflows/PR-3.4-W10.yaml @@ -0,0 +1,166 @@ +name: PR:3.4 W10 + +on: + pull_request: + branches: + - 3.4 + +env: + EXTRA_CMAKE_OPTIONS: '-DCL_Z_OPTION=/Z7 -DOPENCV_DOWNLOAD_PATH=c:\Slave\workspace\binaries_cache -DBUILD_EXAMPLES=ON -DOPENCV_ENABLE_NONFREE=ON -DCMAKE_BUILD_TYPE=Release' + OPENCV_TEST_DATA_PATH: ${{ github.workspace }}\opencv_extra\testdata + 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 }} + GTEST_FILTER_STRING: '-Samples.findFile:ExposureCompensate.SimilarityThreshold:DNNTestNetwork.MobileNet_SSD_v2_TensorFlow*:DNNTestNetwork.Inception_v2_SSD_TensorFlow*:Test_TensorFlow_nets.Inception_v2_SSD*:Test_Darknet_nets.YOLOv4_tiny*:videoio/videocapture_acceleration.read/61:Drawing.ttf_text' + GIT_CACHE: c:\Slave\git_cache + +jobs: + BuildAndTest: + runs-on: opencv-cn-win + defaults: + run: + shell: cmd + steps: + - name: PR info + run: | + echo "PR Author: ${{ env.PR_AUTHOR }}" + echo "Source branch name: ${{ env.SOURCE_BRANCH_NAME }}" + echo "Target branch name: ${{ env.TARGET_BRANCH_NAME }}" + - name: Clean + run: cd ${{ github.workspace }} && rm -rf * + - name: Fetch opencv + run: cd ${{ github.workspace }} && git clone --branch ${{ env.TARGET_BRANCH_NAME }} --reference ${{ env.GIT_CACHE }}\opencv.git https://github.com/opencv/opencv.git + - name: Merge opencv with ${{ env.SOURCE_BRANCH_NAME }} branch + run: | + cd ${{ github.workspace }}\opencv + git config user.email "opencv.ci" + git config user.name "opencv.ci" + git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}" + - name: Fetch opencv_extra + run: cd ${{ github.workspace }} && git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} --reference ${{ env.GIT_CACHE }}\opencv_extra.git https://github.com/opencv/opencv_extra.git + - name: Merge opencv_extra with ${{ env.SOURCE_BRANCH_NAME }} branch + shell: bash + run: | + RET=$(git ls-remote --heads "https://github.com/${{ env.PR_AUTHOR }}/opencv_extra" "${{ env.SOURCE_BRANCH_NAME }}") || true + if [[ ! -z "$RET" ]]; then + echo "Merge opencv_extra with ${{ env.SOURCE_BRANCH_NAME }} branch" + cd opencv_extra + git config user.email "opencv.ci" + git config user.name "opencv.ci" + git pull -v "https://github.com/${{ env.PR_AUTHOR }}/opencv_extra" "${{ env.SOURCE_BRANCH_NAME }}" + else + echo "No merge since ${{ env.PR_AUTHOR }}/opencv_extra does not have branch ${{ env.SOURCE_BRANCH_NAME }}" + fi + - name: Configure OpenCV + run: | + mkdir ${{ github.workspace }}\opencv-build && cd ${{ github.workspace }}\opencv-build + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" + cmake -G Ninja ${{ env.EXTRA_CMAKE_OPTIONS }} ${{ github.workspace }}\opencv + - name: Build OpenCV + run: | + cd ${{ github.workspace }}\opencv-build + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" + ninja + - name: Accuracy:calib3d + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_calib3d.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Accuracy:core + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_core.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Accuracy:dnn + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_dnn.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Accuracy:features2d + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_features2d.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Accuracy:flann + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_flann.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Accuracy:highgui + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_highgui.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Accuracy:imgcodecs + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_imgcodecs.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Accuracy:imgproc + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_imgproc.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Accuracy:ml + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_ml.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Accuracy:objdetect + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_objdetect.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Accuracy:photo + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_photo.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Accuracy:shape + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_shape.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Accuracy:stitching + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_stitching.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Accuracy:superres + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_superres.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Accuracy:video + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_video.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Accuracy:videoio + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_videoio.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Accuracy:videostab + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_test_videostab.exe --skip_unstable --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Performance:calib3d + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_perf_calib3d.exe --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Performance:core + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_perf_core.exe --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Performance:dnn + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_perf_dnn.exe --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Performance:features2d + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_perf_features2d.exe --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Performance:imgcodecs + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_perf_imgcodecs.exe --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Performance:imgproc + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_perf_imgproc.exe --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Performance:objdetect + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_perf_objdetect.exe --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Performance:photo + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_perf_photo.exe --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Performance:stitching + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_perf_stitching.exe --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Performance:superres + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_perf_superres.exe --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Performance:video + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_perf_video.exe --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Performance:videoio + run: cd ${{ github.workspace }}\opencv-build && bin\opencv_perf_videoio.exe --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --gtest_filter=${{ env.GTEST_FILTER_STRING }} + - name: Python3 + run: | + cd ${{ github.workspace }}\opencv\modules\python\test + set PYTHONPATH=%PYTHONPATH%;${{ github.workspace }}\opencv-build\python_loader;${{ github.workspace }}\opencv-build\lib\python3 + set PATH=%PATH%;${{ github.workspace }}\opencv-build\bin;${{ github.workspace }}\opencv-build\lib\python3 + python test.py --repo ..\..\..\ -v + - name: Java + run: | + cd ${{ github.workspace }}\opencv-build + set PATH=%PATH%;${{ github.workspace }}\opencv-build\bin + ${{ github.workspace }}\opencv\modules\ts\misc\run.py . -a -t java + BuildContrib: + runs-on: opencv-cn-win + defaults: + run: + shell: cmd + steps: + - name: PR info + run: | + echo "PR Author: ${{ env.PR_AUTHOR }}" + echo "Source branch name: ${{ env.SOURCE_BRANCH_NAME }}" + echo "Target branch name: ${{ env.TARGET_BRANCH_NAME }}" + - name: Clean + run: cd ${{ github.workspace }} && rm -rf * + - name: Fetch opencv + run: cd ${{ github.workspace }} && git clone --branch ${{ env.TARGET_BRANCH_NAME }} --reference ${{ env.GIT_CACHE }}\opencv.git https://github.com/opencv/opencv.git + - name: Merge opencv with ${{ env.SOURCE_BRANCH_NAME }} branch + run: | + cd ${{ github.workspace }}\opencv + git config user.email "opencv.ci" + git config user.name "opencv.ci" + git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}" + - name: Fetch opencv_contrib + run: cd ${{ github.workspace }} && git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} --reference ${{ env.GIT_CACHE }}\opencv_contrib.git --depth 1 https://github.com/opencv/opencv_contrib.git + - name: Configure OpenCV Contrib + run: | + mkdir ${{ github.workspace }}\opencv-contrib-build && cd ${{ github.workspace }}\opencv-contrib-build + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" + cmake -G Ninja ${{ env.EXTRA_CMAKE_OPTIONS }} -DOPENCV_EXTRA_MODULES_PATH=${{ github.workspace }}\opencv_contrib\modules ${{ github.workspace }}\opencv + - name: Build OpenCV Contrib + run: | + cd ${{ github.workspace }}\opencv-contrib-build + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" + ninja From ca2ab3387f2ba248b2851c4e33195b422b0b4b94 Mon Sep 17 00:00:00 2001 From: LaurentBerger Date: Tue, 12 Apr 2022 13:48:33 +0200 Subject: [PATCH 5/5] Try to solve I21853 mouse wheel problem with GTK3 --- modules/highgui/src/window_gtk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/highgui/src/window_gtk.cpp b/modules/highgui/src/window_gtk.cpp index d8125a67ae..5583ab358b 100644 --- a/modules/highgui/src/window_gtk.cpp +++ b/modules/highgui/src/window_gtk.cpp @@ -1831,7 +1831,7 @@ static gboolean icvOnMouse( GtkWidget *widget, GdkEvent *event, gpointer user_da #if defined(GTK_VERSION3_4) // NOTE: in current implementation doesn't possible to put into callback function delta_x and delta_y separately double delta = (event->scroll.delta_x + event->scroll.delta_y); - cv_event = (event->scroll.delta_y!=0) ? CV_EVENT_MOUSEHWHEEL : CV_EVENT_MOUSEWHEEL; + cv_event = (event->scroll.delta_x==0) ? CV_EVENT_MOUSEWHEEL : CV_EVENT_MOUSEHWHEEL; #else cv_event = CV_EVENT_MOUSEWHEEL; #endif //GTK_VERSION3_4