|
| 1 | +name: OCV PR:5.x W10-ARM64 |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + paths: |
| 8 | + - '.github/workflows/OCV-PR-5.x-W10-ARM64.yaml' |
| 9 | + workflow_call: |
| 10 | + |
| 11 | +concurrency: |
| 12 | + group: OCV-PR-5.x-W10-ARM64-${{ github.ref }} |
| 13 | + cancel-in-progress: true |
| 14 | + |
| 15 | +env: |
| 16 | + 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' |
| 17 | + PR_AUTHOR: ${{ github.event.pull_request.user.login }} |
| 18 | + PR_AUTHOR_FORK: ${{ github.event.pull_request.head.repo.full_name }} |
| 19 | + SOURCE_BRANCH_NAME: ${{ github.head_ref }} |
| 20 | + TARGET_BRANCH_NAME: ${{ github.base_ref }} |
| 21 | + |
| 22 | +jobs: |
| 23 | + CrossBuild: |
| 24 | + runs-on: opencv-cn-win |
| 25 | + defaults: |
| 26 | + run: |
| 27 | + shell: cmd |
| 28 | + steps: |
| 29 | + - name: Brief system information |
| 30 | + timeout-minutes: 60 |
| 31 | + run: bash %GIT_CACHE%\print_system_information.sh |
| 32 | + - name: Setup infra environment |
| 33 | + timeout-minutes: 60 |
| 34 | + if: ${{ github.event.repository.name == 'ci-gha-workflow' }} |
| 35 | + shell: bash |
| 36 | + run: echo "TARGET_BRANCH_NAME=5.x" >> $GITHUB_ENV |
| 37 | + - name: PR info |
| 38 | + timeout-minutes: 60 |
| 39 | + run: | |
| 40 | + echo "PR Author: ${{ env.PR_AUTHOR }}" |
| 41 | + echo "PR Author fork: ${{ env.PR_AUTHOR_FORK }}" |
| 42 | + echo "Source branch name: ${{ env.SOURCE_BRANCH_NAME }}" |
| 43 | + echo "Target branch name: ${{ env.TARGET_BRANCH_NAME }}" |
| 44 | + - name: Clean |
| 45 | + timeout-minutes: 60 |
| 46 | + run: cd ${{ github.workspace }} && rm -rf * |
| 47 | + - name: Fetch opencv |
| 48 | + timeout-minutes: 60 |
| 49 | + run: cd ${{ github.workspace }} && git clone --branch ${{ env.TARGET_BRANCH_NAME }} --reference %GIT_CACHE%\opencv.git git@github.com:opencv/opencv.git |
| 50 | + - name: Merge opencv with ${{ env.SOURCE_BRANCH_NAME }} branch |
| 51 | + timeout-minutes: 60 |
| 52 | + if: ${{ github.event.repository.name != 'ci-gha-workflow' }} |
| 53 | + run: | |
| 54 | + cd ${{ github.workspace }}\opencv |
| 55 | + git pull -v "git@github.com:${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}" |
| 56 | + - name: Fetch opencv_extra |
| 57 | + timeout-minutes: 60 |
| 58 | + 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 |
| 59 | + - name: Configure OpenCV |
| 60 | + timeout-minutes: 60 |
| 61 | + run: | |
| 62 | + mkdir ${{ github.workspace }}\build && cd ${{ github.workspace }}\build |
| 63 | + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" |
| 64 | + cmake -G"Visual Studio 16 2019" -A ARM64 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=ARM64 ${{ env.EXTRA_CMAKE_OPTIONS }} ${{ github.workspace }}\opencv |
| 65 | + - name: Build OpenCV |
| 66 | + timeout-minutes: 60 |
| 67 | + id: build-opencv |
| 68 | + run: | |
| 69 | + cd ${{ github.workspace }}\build |
| 70 | + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" |
| 71 | + msbuild.exe OpenCV.sln | tee ${{ github.workspace }}\build\build-log.txt |
| 72 | + - name: Warnings check |
| 73 | + timeout-minutes: 60 |
| 74 | + run: cd ${{ github.workspace }}\build && python %CI_SCRIPTS%\warnings-handling.py |
0 commit comments