Skip to content

Commit

Permalink
Squized different Windows configurations into one job. (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
asmorkalov authored Feb 17, 2025
1 parent cbe6583 commit 9724d1d
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 157 deletions.
74 changes: 0 additions & 74 deletions .github/workflows/OCV-PR-4.x-W10-ARM64.yaml

This file was deleted.

80 changes: 0 additions & 80 deletions .github/workflows/OCV-PR-4.x-W10-UWP.yaml

This file was deleted.

116 changes: 113 additions & 3 deletions .github/workflows/OCV-PR-4.x-W10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ concurrency:
cancel-in-progress: true

env:
EXTRA_CMAKE_OPTIONS: '-DCL_Z_OPTION=/Z7 -DOPENCV_DOWNLOAD_PATH=%BINARIES_CACHE% -DWITH_IMGCODEC_GIF=ON -DBUILD_EXAMPLES=ON -DOPENCV_ENABLE_NONFREE=ON -DCMAKE_BUILD_TYPE=Release'
COMMON_CMAKE_OPTIONS: '-DCL_Z_OPTION=/Z7 -DOPENCV_DOWNLOAD_PATH=%BINARIES_CACHE% -DWITH_IMGCODEC_GIF=ON -DOPENCV_ENABLE_NONFREE=ON -DCMAKE_BUILD_TYPE=Release'
EXTRA_CMAKE_OPTIONS: '-DBUILD_EXAMPLES=ON'
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
Expand Down Expand Up @@ -102,7 +106,7 @@ jobs:
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 Ninja ${{ env.EXTRA_CMAKE_OPTIONS }} ${{ github.workspace }}\opencv
cmake -G Ninja ${{ env.COMMON_CMAKE_OPTIONS }} ${{ env.EXTRA_CMAKE_OPTIONS }} ${{ github.workspace }}\opencv
- name: Build OpenCV
timeout-minutes: 60
id: build-opencv
Expand Down Expand Up @@ -245,6 +249,7 @@ jobs:
name: junit-html-windows10
path: ${{ github.workspace }}\build\java_test\testResults\junit-noframes.html


BuildContrib:
runs-on: opencv-cn-win
defaults:
Expand Down Expand Up @@ -299,7 +304,7 @@ jobs:
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 Ninja ${{ env.EXTRA_CMAKE_OPTIONS }} -DOPENCV_EXTRA_MODULES_PATH=${{ github.workspace }}\opencv_contrib\modules ${{ github.workspace }}\opencv
cmake -G Ninja ${{ env.COMMON_CMAKE_OPTIONS }} ${{ env.EXTRA_CMAKE_OPTIONS }} -DOPENCV_EXTRA_MODULES_PATH=${{ github.workspace }}\opencv_contrib\modules ${{ github.workspace }}\opencv
- name: Build OpenCV Contrib
timeout-minutes: 60
run: |
Expand All @@ -309,3 +314,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 [email protected]: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 "[email protected]:${{ 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 [email protected]: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.COMMON_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 [email protected]: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 "[email protected]:${{ 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.COMMON_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

0 comments on commit 9724d1d

Please sign in to comment.