From 514cdf0023958961e9c05e64ac6da8388b55782a Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Tue, 21 Jan 2025 15:44:20 +0300 Subject: [PATCH] Build extra Windows configurations as jobs, but not pipelines. --- .github/workflows/OCV-PR-4.x-W10-ARM64.yaml | 74 ------------- .github/workflows/OCV-PR-4.x-W10-UWP.yaml | 80 -------------- .github/workflows/OCV-PR-4.x-W10.yaml | 109 ++++++++++++++++++++ 3 files changed, 109 insertions(+), 154 deletions(-) delete mode 100644 .github/workflows/OCV-PR-4.x-W10-ARM64.yaml delete mode 100644 .github/workflows/OCV-PR-4.x-W10-UWP.yaml diff --git a/.github/workflows/OCV-PR-4.x-W10-ARM64.yaml b/.github/workflows/OCV-PR-4.x-W10-ARM64.yaml deleted file mode 100644 index 8a302754..00000000 --- a/.github/workflows/OCV-PR-4.x-W10-ARM64.yaml +++ /dev/null @@ -1,74 +0,0 @@ -name: OCV PR:4.x W10-ARM64 - -on: - pull_request: - branches: - - main - paths: - - '.github/workflows/OCV-PR-4.x-W10-ARM64.yaml' - workflow_call: - -concurrency: - group: OCV-PR-4.x-W10-ARM64-${{ github.ref }} - cancel-in-progress: true - -env: - EXTRA_CMAKE_OPTIONS: '-DWITH_OPENCL=OFF -DHAVE_OPENCL=OFF -DOPENCL_INCLUDE_DIRS="" -DOPENCL_LIBRARIES="" -DCL_Z_OPTION=/Z7 -DOPENCV_DOWNLOAD_PATH=%BINARIES_CACHE% -DBUILD_EXAMPLES=OFF -DOPENCV_ENABLE_NONFREE=ON -DCMAKE_BUILD_TYPE=Release' - 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 }} - -jobs: - CrossBuild: - runs-on: opencv-cn-win - defaults: - run: - shell: cmd - steps: - - name: Brief system information - timeout-minutes: 60 - run: bash %GIT_CACHE%\print_system_information.sh - - name: Setup infra environment - timeout-minutes: 60 - if: ${{ github.event.repository.name == 'ci-gha-workflow' }} - shell: bash - run: echo "TARGET_BRANCH_NAME=4.x" >> $GITHUB_ENV - - name: PR info - timeout-minutes: 60 - run: | - echo "PR Author: ${{ env.PR_AUTHOR }}" - echo "PR Author fork: ${{ env.PR_AUTHOR_FORK }}" - echo "Source branch name: ${{ env.SOURCE_BRANCH_NAME }}" - echo "Target branch name: ${{ env.TARGET_BRANCH_NAME }}" - - name: Clean - timeout-minutes: 60 - run: cd ${{ github.workspace }} && rm -rf * - - name: Fetch opencv - timeout-minutes: 60 - run: cd ${{ github.workspace }} && git clone --branch ${{ env.TARGET_BRANCH_NAME }} --reference %GIT_CACHE%\opencv.git git@github.com:opencv/opencv.git - - name: Merge opencv with ${{ env.SOURCE_BRANCH_NAME }} branch - timeout-minutes: 60 - if: ${{ github.event.repository.name != 'ci-gha-workflow' }} - run: | - cd ${{ github.workspace }}\opencv - git pull -v "git@github.com:${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}" - - name: Fetch opencv_extra - timeout-minutes: 60 - run: cd ${{ github.workspace }} && git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} --reference %GIT_CACHE%\opencv_extra.git git@github.com:opencv/opencv_extra.git - - name: Configure OpenCV - timeout-minutes: 60 - run: | - mkdir ${{ github.workspace }}\build && cd ${{ github.workspace }}\build - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" - cmake -G"Visual Studio 16 2019" -A ARM64 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=ARM64 ${{ env.EXTRA_CMAKE_OPTIONS }} ${{ github.workspace }}\opencv - - name: Build OpenCV - timeout-minutes: 60 - id: build-opencv - run: | - cd ${{ github.workspace }}\build - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" - msbuild.exe OpenCV.sln | tee ${{ github.workspace }}\build\build-log.txt - - name: Warnings check - timeout-minutes: 60 - run: cd ${{ github.workspace }}\build && python %CI_SCRIPTS%\warnings-handling.py diff --git a/.github/workflows/OCV-PR-4.x-W10-UWP.yaml b/.github/workflows/OCV-PR-4.x-W10-UWP.yaml deleted file mode 100644 index 71c485ed..00000000 --- a/.github/workflows/OCV-PR-4.x-W10-UWP.yaml +++ /dev/null @@ -1,80 +0,0 @@ -name: OCV PR:4.x W10 UWP - -on: - pull_request: - branches: - - main - paths: - - '.github/workflows/OCV-PR-4.x-W10-UWP.yaml' - workflow_call: - -concurrency: - group: OCV-PR-4.x-W10-UWP-${{ github.ref }} - cancel-in-progress: true - -env: - EXTRA_CMAKE_OPTIONS: '\ - -DOPENCV_DOWNLOAD_PATH=%BINARIES_CACHE% \ - -DBUILD_opencv_gapi=OFF \ - -DWITH_MSMF=OFF \ - -DBUILD_TESTS=OFF \ - -DBUILD_PERF_TESTS=OFF \ - -DBUILD_EXAMPLES=OFF \ - -DBUILD_opencv_apps=OFF \ - -DCMAKE_BUILD_TYPE=Release \ - ' - 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 }} - -jobs: - BuildAndTest: - runs-on: opencv-cn-win - defaults: - run: - shell: cmd - steps: - - name: Brief system information - timeout-minutes: 60 - run: bash %GIT_CACHE%\print_system_information.sh - - name: Setup infra environment - timeout-minutes: 60 - if: ${{ github.event.repository.name == 'ci-gha-workflow' }} - shell: bash - run: echo "TARGET_BRANCH_NAME=4.x" >> $GITHUB_ENV - - name: PR info - timeout-minutes: 60 - run: | - echo "PR Author: ${{ env.PR_AUTHOR }}" - echo "PR Author fork: ${{ env.PR_AUTHOR_FORK }}" - echo "Source branch name: ${{ env.SOURCE_BRANCH_NAME }}" - echo "Target branch name: ${{ env.TARGET_BRANCH_NAME }}" - - name: Clean - timeout-minutes: 60 - run: cd ${{ github.workspace }} && rm -rf * - - name: Fetch opencv - timeout-minutes: 60 - run: cd ${{ github.workspace }} && git clone --branch ${{ env.TARGET_BRANCH_NAME }} --reference %GIT_CACHE%\opencv.git git@github.com:opencv/opencv.git - - name: Merge opencv with ${{ env.SOURCE_BRANCH_NAME }} branch - timeout-minutes: 60 - if: ${{ github.event.repository.name != 'ci-gha-workflow' }} - run: | - cd ${{ github.workspace }}\opencv - git pull -v "git@github.com:${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}" - - name: Configure OpenCV - timeout-minutes: 60 - run: | - mkdir ${{ github.workspace }}\build && cd ${{ github.workspace }}\build - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" - cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ${{ env.EXTRA_CMAKE_OPTIONS }} ${{ github.workspace }}\opencv - - name: Build OpenCV - timeout-minutes: 60 - id: build-opencv - run: | - cd ${{ github.workspace }}\build - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" - cmake --build . | tee ${{ github.workspace }}\build\build-log.txt - - name: Warnings check - timeout-minutes: 60 - run: cd ${{ github.workspace }}\build && python %CI_SCRIPTS%\warnings-handling.py diff --git a/.github/workflows/OCV-PR-4.x-W10.yaml b/.github/workflows/OCV-PR-4.x-W10.yaml index a94b9c67..75c6a274 100644 --- a/.github/workflows/OCV-PR-4.x-W10.yaml +++ b/.github/workflows/OCV-PR-4.x-W10.yaml @@ -14,6 +14,9 @@ concurrency: env: EXTRA_CMAKE_OPTIONS: '-DCL_Z_OPTION=/Z7 -DOPENCV_DOWNLOAD_PATH=%BINARIES_CACHE% -DBUILD_EXAMPLES=ON -DOPENCV_ENABLE_NONFREE=ON -DCMAKE_BUILD_TYPE=Release' + EXTRA_CMAKE_CORSS_OPTIONS: '-DWITH_OPENCL=OFF -DHAVE_OPENCL=OFF -DOPENCL_INCLUDE_DIRS="" -DOPENCL_LIBRARIES=""' + EXTRA_CMAKE_UWP_OPTIONS: '-DBUILD_opencv_gapi=OFF -DWITH_MSMF=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_opencv_apps=OFF' + OPENCV_TEST_DATA_PATH: ${{ github.workspace }}\opencv_extra\testdata OPENCV_TEST_REQUIRE_DATA: 1 OPENCV_TEST_CHECK_OPTIONAL_DATA: 1 @@ -247,6 +250,7 @@ jobs: name: junit-html-windows10 path: ${{ github.workspace }}\build\java_test\testResults\junit-noframes.html + BuildContrib: runs-on: opencv-cn-win defaults: @@ -311,3 +315,108 @@ jobs: - name: Warnings check timeout-minutes: 60 run: cd ${{ github.workspace }}\build && python %CI_SCRIPTS%\warnings-handling.py + + + CrossBuildArm64: + runs-on: opencv-cn-win + defaults: + run: + shell: cmd + steps: + - name: Brief system information + timeout-minutes: 60 + run: bash %GIT_CACHE%\print_system_information.sh + - name: Setup infra environment + timeout-minutes: 60 + if: ${{ github.event.repository.name == 'ci-gha-workflow' }} + shell: bash + run: echo "TARGET_BRANCH_NAME=4.x" >> $GITHUB_ENV + - name: PR info + timeout-minutes: 60 + run: | + echo "PR Author: ${{ env.PR_AUTHOR }}" + echo "PR Author fork: ${{ env.PR_AUTHOR_FORK }}" + echo "Source branch name: ${{ env.SOURCE_BRANCH_NAME }}" + echo "Target branch name: ${{ env.TARGET_BRANCH_NAME }}" + - name: Clean + timeout-minutes: 60 + run: cd ${{ github.workspace }} && rm -rf * + - name: Fetch opencv + timeout-minutes: 60 + run: cd ${{ github.workspace }} && git clone --branch ${{ env.TARGET_BRANCH_NAME }} --reference %GIT_CACHE%\opencv.git git@github.com:opencv/opencv.git + - name: Merge opencv with ${{ env.SOURCE_BRANCH_NAME }} branch + timeout-minutes: 60 + if: ${{ github.event.repository.name != 'ci-gha-workflow' }} + run: | + cd ${{ github.workspace }}\opencv + git pull -v "git@github.com:${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}" + - name: Fetch opencv_extra + timeout-minutes: 60 + run: cd ${{ github.workspace }} && git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} --reference %GIT_CACHE%\opencv_extra.git git@github.com:opencv/opencv_extra.git + - name: Configure OpenCV + timeout-minutes: 60 + run: | + mkdir ${{ github.workspace }}\build && cd ${{ github.workspace }}\build + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" + cmake -G"Visual Studio 16 2019" -A ARM64 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=ARM64 ${{ env.EXTRA_CMAKE_OPTIONS }} ${{ env.EXTRA_CMAKE_CORSS_OPTIONS }} ${{ github.workspace }}\opencv + - name: Build OpenCV + timeout-minutes: 60 + id: build-opencv + run: | + cd ${{ github.workspace }}\build + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" + msbuild.exe OpenCV.sln | tee ${{ github.workspace }}\build\build-log.txt + - name: Warnings check + timeout-minutes: 60 + run: cd ${{ github.workspace }}\build && python %CI_SCRIPTS%\warnings-handling.py + + + BuildUWP: + runs-on: opencv-cn-win + defaults: + run: + shell: cmd + steps: + - name: Brief system information + timeout-minutes: 60 + run: bash %GIT_CACHE%\print_system_information.sh + - name: Setup infra environment + timeout-minutes: 60 + if: ${{ github.event.repository.name == 'ci-gha-workflow' }} + shell: bash + run: echo "TARGET_BRANCH_NAME=4.x" >> $GITHUB_ENV + - name: PR info + timeout-minutes: 60 + run: | + echo "PR Author: ${{ env.PR_AUTHOR }}" + echo "PR Author fork: ${{ env.PR_AUTHOR_FORK }}" + echo "Source branch name: ${{ env.SOURCE_BRANCH_NAME }}" + echo "Target branch name: ${{ env.TARGET_BRANCH_NAME }}" + - name: Clean + timeout-minutes: 60 + run: cd ${{ github.workspace }} && rm -rf * + - name: Fetch opencv + timeout-minutes: 60 + run: cd ${{ github.workspace }} && git clone --branch ${{ env.TARGET_BRANCH_NAME }} --reference %GIT_CACHE%\opencv.git git@github.com:opencv/opencv.git + - name: Merge opencv with ${{ env.SOURCE_BRANCH_NAME }} branch + timeout-minutes: 60 + if: ${{ github.event.repository.name != 'ci-gha-workflow' }} + run: | + cd ${{ github.workspace }}\opencv + git pull -v "git@github.com:${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}" + - name: Configure OpenCV + timeout-minutes: 60 + run: | + mkdir ${{ github.workspace }}\build && cd ${{ github.workspace }}\build + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" + cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ${{ env.EXTRA_CMAKE_OPTIONS }} ${{ env.EXTRA_CMAKE_UWP_OPTIONS }} ${{ github.workspace }}\opencv + - name: Build OpenCV + timeout-minutes: 60 + id: build-opencv + run: | + cd ${{ github.workspace }}\build + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" + cmake --build . | tee ${{ github.workspace }}\build\build-log.txt + - name: Warnings check + timeout-minutes: 60 + run: cd ${{ github.workspace }}\build && python %CI_SCRIPTS%\warnings-handling.py