From 176d81cc7f7a8d2a5557aca8a4ef36af6a1e8cc3 Mon Sep 17 00:00:00 2001 From: Andrey Senyaev Date: Fri, 20 May 2022 19:48:00 +0300 Subject: [PATCH] Move workflows to a dedicated repository for 4.x branch --- .github/workflows/PR-4.x-U20.yaml | 240 ------------------------------ .github/workflows/PR-4.x.yaml | 16 ++ 2 files changed, 16 insertions(+), 240 deletions(-) delete mode 100644 .github/workflows/PR-4.x-U20.yaml create mode 100644 .github/workflows/PR-4.x.yaml diff --git a/.github/workflows/PR-4.x-U20.yaml b/.github/workflows/PR-4.x-U20.yaml deleted file mode 100644 index 2c4348ef4..000000000 --- a/.github/workflows/PR-4.x-U20.yaml +++ /dev/null @@ -1,240 +0,0 @@ -name: PR:4.x U20 - -on: - pull_request: - branches: - - 4.x - -env: - EXTRA_CMAKE_OPTIONS: '-DBUILD_DOCS=ON -DPYTHON_DEFAULT_EXECUTABLE=/usr/bin/python3 -DBUILD_EXAMPLES=ON -DOPENCV_ENABLE_NONFREE=ON -DENABLE_CCACHE=OFF' - OPENCV_TEST_DATA_PATH: '/opencv_extra/testdata' - OPENCV_CONTRIB_DOCKER_WORKDIR: '/__w/opencv_contrib/opencv_contrib' - 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' - PYTHONPATH: /opencv-contrib-build/python_loader:$PYTHONPATH - GTEST_FILTER_STRING: '-tracking_GOTURN.GOTURN/*' - -jobs: - BuildAndTest: - runs-on: ubuntu-20.04 - defaults: - run: - shell: bash - container: - image: quay.io/asenyaev/opencv-ubuntu:20.04 - 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: find . -mindepth 1 -delete - - name: Fetch opencv_contrib - uses: actions/checkout@v3 - with: - repository: opencv/opencv_contrib - ref: ${{ env.TARGET_BRANCH_NAME }} - fetch-depth: 0 - - name: Merge opencv_contrib with ${{ env.SOURCE_BRANCH_NAME }} branch - run: | - cd ${{ env.OPENCV_CONTRIB_DOCKER_WORKDIR }} - git config --global --add safe.directory ${{ env.OPENCV_CONTRIB_DOCKER_WORKDIR }} - 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: Clone opencv - run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} https://github.com/opencv/opencv.git /opencv - - name: Merge opencv with ${{ env.SOURCE_BRANCH_NAME }} branch - run: | - OPENCV_FORK=$(git ls-remote --heads "https://github.com/${{ env.PR_AUTHOR }}/opencv" "${{ env.SOURCE_BRANCH_NAME }}") || true - if [[ ! -z "$OPENCV_FORK" ]]; then - echo "Merge opencv with ${{ env.SOURCE_BRANCH_NAME }} branch" - cd /opencv - 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 }}" - else - echo "No merge since ${{ env.PR_AUTHOR }}/opencv does not have branch ${{ env.SOURCE_BRANCH_NAME }}" - fi - - name: Clone 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: | - 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" - 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-contrib-build - cmake -G Ninja ${{ env.EXTRA_CMAKE_OPTIONS }} -DOPENCV_EXTRA_MODULES_PATH=${{ env.OPENCV_CONTRIB_DOCKER_WORKDIR }}/modules /opencv - - name: Build OpenCV - run: | - cd /opencv-contrib-build - ninja - - name: Accuracy:aruco - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_aruco --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:barcode - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_barcode --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:bgsegm - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_bgsegm --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:bioinspired - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_bioinspired --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:calib3d - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_calib3d --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:core - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_core --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:dnn - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_dnn --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:dnn_superres - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_dnn_superres --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:face - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_face --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:features2d - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_features2d --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:flann - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_flann --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:fuzzy - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_fuzzy --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:gapi - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_gapi --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:hdf - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_hdf --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:highgui - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_highgui --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:img_hash - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_img_hash --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:imgcodecs - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_imgcodecs --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:imgproc - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_imgproc --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:intensity_transform - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_intensity_transform --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:line_descriptor - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_line_descriptor --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:mcc - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_mcc --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:ml - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_ml --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:objdetect - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_objdetect --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:optflow - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_optflow --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:phase_unwrapping - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_phase_unwrapping --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:photo - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_photo --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:quality - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_quality --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:rapid - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_rapid --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:reg - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_reg --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:rgbd - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_rgbd --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:saliency - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_saliency --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:sfm - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_sfm --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:shape - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_shape --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:stereo - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_stereo --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:stitching - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_stitching --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:structured_light - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_structured_light --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:superres - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_superres --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:text - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_text --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:tracking - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_tracking --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:video - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_video --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:videoio - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_videoio --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:videostab - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_videostab --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:wechat_qrcode - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_wechat_qrcode --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:xfeatures2d - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_xfeatures2d --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:ximgproc - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_ximgproc --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Accuracy:xphoto - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_test_xphoto --gtest_filter=${{ env.GTEST_FILTER_STRING }} - - name: Performance:aruco - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_perf_aruco --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:bioinspired - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_perf_bioinspired --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:calib3d - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_perf_calib3d --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 /opencv-contrib-build && xvfb-run -a bin/opencv_perf_core --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 /opencv-contrib-build && xvfb-run -a bin/opencv_perf_dnn --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_superres - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_perf_dnn_superres --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 /opencv-contrib-build && xvfb-run -a bin/opencv_perf_features2d --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:gapi - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_perf_gapi --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 /opencv-contrib-build && xvfb-run -a bin/opencv_perf_imgcodecs --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 /opencv-contrib-build && xvfb-run -a bin/opencv_perf_imgproc --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:line_descriptor - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_perf_line_descriptor --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 /opencv-contrib-build && xvfb-run -a bin/opencv_perf_objdetect --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:optflow - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_perf_optflow --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 /opencv-contrib-build && xvfb-run -a bin/opencv_perf_photo --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:reg - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_perf_reg --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:rgbd - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_perf_rgbd --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:stereo - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_perf_stereo --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 /opencv-contrib-build && xvfb-run -a bin/opencv_perf_stitching --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 /opencv-contrib-build && xvfb-run -a bin/opencv_perf_superres --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:tracking - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_perf_tracking --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 /opencv-contrib-build && xvfb-run -a bin/opencv_perf_video --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 /opencv-contrib-build && xvfb-run -a bin/opencv_perf_videoio --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:xfeatures2d - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_perf_xfeatures2d --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:ximgproc - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_perf_ximgproc --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:xphoto - run: cd /opencv-contrib-build && xvfb-run -a bin/opencv_perf_xphoto --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 /opencv/modules/python/test - python3 ./test.py --repo ../../../ -v - - name: Java - run: cd /opencv-contrib-build && xvfb-run -a python3 /opencv/modules/ts/misc/run.py . -a -t java - - name: Save Unit Test Results - uses: actions/upload-artifact@v3 - if: always() - with: - name: junit-html - path: /opencv-contrib-build/java_test/testResults/junit-noframes.html - - name: Pylint - run: cd /opencv-contrib-build && cmake --build . --config release --target check_pylint -- -j4 diff --git a/.github/workflows/PR-4.x.yaml b/.github/workflows/PR-4.x.yaml new file mode 100644 index 000000000..a1441e004 --- /dev/null +++ b/.github/workflows/PR-4.x.yaml @@ -0,0 +1,16 @@ +name: PR:4.x + +on: + pull_request: + branches: + - 4.x + +jobs: + ARM64: + uses: opencv/ci-gha-workflow/.github/workflows/OCV-Contrib-PR-4.x-ARM64.yaml@main + + U20: + uses: opencv/ci-gha-workflow/.github/workflows/OCV-Contrib-PR-4.x-U20.yaml@main + + W10: + uses: opencv/ci-gha-workflow/.github/workflows/OCV-Contrib-PR-4.x-W10.yaml@main \ No newline at end of file