Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0cfaa15
Unified windows build
mshabunin Apr 17, 2025
a1a3990
fixup! Unified windows build
mshabunin Apr 18, 2025
623b131
fixup! Unified windows build
mshabunin Apr 18, 2025
3c63481
fixup! Unified windows build
mshabunin Apr 18, 2025
6948293
fixup! Unified windows build
mshabunin Apr 18, 2025
c29374c
fixup! Unified windows build
mshabunin Apr 18, 2025
5dd6636
fixup! Unified windows build
mshabunin Apr 18, 2025
2438dd5
fixup! Unified windows build
mshabunin Apr 18, 2025
1760a00
fixup! Unified windows build
mshabunin Apr 18, 2025
63a9816
fixup! Unified windows build
mshabunin Apr 18, 2025
40a9570
fixup! Unified windows build
mshabunin Apr 18, 2025
3d1528d
fixup! Unified windows build
mshabunin Apr 18, 2025
4105efc
fixup! Unified windows build
mshabunin Apr 18, 2025
d1a0955
fixup! Unified windows build
mshabunin Apr 18, 2025
cddf556
fixup! Unified windows build
mshabunin Apr 18, 2025
ca57e3c
fixup! Unified windows build
mshabunin Apr 18, 2025
2ca66ad
fixup! Unified windows build
mshabunin Apr 18, 2025
5a270c8
fixup! Unified windows build
mshabunin Apr 18, 2025
ad5b62e
fixup! Unified windows build
mshabunin Apr 18, 2025
f67a11f
fixup! Unified windows build
mshabunin Apr 18, 2025
071e98e
fixup! Unified windows build
mshabunin Apr 18, 2025
58f6589
fixup! Unified windows build
mshabunin Apr 18, 2025
3fff657
fixup! Unified windows build
mshabunin Apr 18, 2025
2656cd5
fixup! Unified windows build
mshabunin Apr 18, 2025
7759b80
fixup! Unified windows build
mshabunin Apr 18, 2025
1b8a6df
fixup! Unified windows build
mshabunin Apr 18, 2025
e2830ee
fixup! Unified windows build
mshabunin Apr 28, 2025
b82ede5
Merge branch 'opencv-pr-241' into merge-opencv-pr241
Oct 1, 2025
44f2f5b
Update OCV-PR-Windows.yaml
avdivan Oct 1, 2025
7e34400
Test add ARM to OCV-PR-Windows.yaml
avdivan Oct 2, 2025
54c1520
Update OCV-PR-Windows.yaml
avdivan Oct 3, 2025
2b4f13e
Update OCV-PR-Windows.yaml
avdivan Oct 3, 2025
e86fca6
Update OCV-PR-Windows.yaml
avdivan Oct 3, 2025
a43246b
Update OCV-PR-Windows.yaml
avdivan Oct 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/OCV-PR-Linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:
paths:
- '.github/workflows/OCV-PR-Linux.yaml'
# TODO: are following paths necessary?
- 'checkout-and-merge/*'
- 'configure-and-build/*'
- 'run-tests/*'
- 'scripts/runner.py'
- 'scripts/test-plan.json'
# - 'checkout-and-merge/*'
# - 'configure-and-build/*'
# - 'run-tests/*'
# - 'scripts/runner.py'
# - 'scripts/test-plan.json'
workflow_call:
inputs:
workflow_branch:
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
# - /mnt/cache/binaries_cache:/opt/binaries_cache
# - vol_dnn_models:/opt/dnn-models
# NOTE: CN config
- /home/opencv-cn/git_cache/:/opt/git_cache
- /home/opencv-cn/git_cache:/opt/git_cache
- /home/opencv-cn/ci_cache/opencv/${{ matrix.version }}:/opt/.ccache
- /home/opencv-cn/binaries_cache/${{ matrix.version }}:/opt/binaries_cache
- /home/opencv-cn/dnn-models:/opt/dnn-models
Expand Down
179 changes: 179 additions & 0 deletions .github/workflows/OCV-PR-Windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
name: OCV PR Windows

on:
pull_request:
branches:
- main
paths:
- '.github/workflows/OCV-PR-Windows.yaml'
# TODO: are following paths necessary?
- 'checkout-and-merge/*'
- 'configure-and-build/*'
- 'run-tests/*'
- 'scripts/runner.py'
- 'scripts/test-plan.json'
workflow_call:
inputs:
workflow_branch:
description: "Branch for ci-gha-workflow repository"
default: "main"
required: false
type: string

concurrency:
group: OCV-PR-Windows-${{ github.ref }}
cancel-in-progress: true

jobs:

branch_eval:
runs-on: ubuntu-24.04
outputs:
branches: ${{ steps.determine-branches.outputs.branches }}
steps:
- id: determine-branches
shell: bash
run: |
if [ "${{ github.event.repository.name == 'ci-gha-workflow' }}" = "true" ] ; then
echo "branches=[ '4.x', '5.x' ]" >> "$GITHUB_OUTPUT"
else
echo "branches=[ '${{ github.base_ref }}' ]" >> "$GITHUB_OUTPUT"
fi

Windows:
runs-on: ${{ matrix.runner }}
needs:
- branch_eval
strategy:
# NOTE: Debugging
fail-fast: true
# fail-fast: false
max-parallel: 3
matrix:
arch: [ x64, arm64 ]
config: [ base, vulkan, uwp ]
include:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add x86 32 bit configuration too. No vulkan, no uwp, just build and test.

- arch: x64
config: vulkan
runner: opencv-cn-win
vs: 'Visual Studio 16 2019'
cmake_arch: x64
vulkan: true
- arch: x64
config: uwp
runner: opencv-cn-win
vs: 'Visual Studio 16 2019'
cmake_arch: x64
uwp: true
uwp_proc: x86_64
- arch: x64
config: base
runner: opencv-cn-win
vs: 'Visual Studio 16 2019'
cmake_arch: x64
uwp_proc: x86_64
- arch: arm64
config: base
runner: windows-11-arm
vs: 'Visual Studio 17 2022'
cmake_arch: ARM64
uwp_proc: ARM64
no_opencl: true
- arch: arm64
config: uwp
runner: windows-11-arm
vs: 'Visual Studio 17 2022'
cmake_arch: ARM64
uwp: true
uwp_proc: ARM64
no_opencl: true
Comment on lines +82 to +89
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would sau, it's redundant and can be removed.


branch: ${{ fromJSON(needs.branch_eval.outputs.branches )}}
exclude:
- branch: '5.x'
config: 'vulkan'
- arch: arm64
config: vulkan
defaults:
run:
shell: bash
env:
CMAKE_OPT: >-
-DCL_Z_OPTION=/Z7
-DBUILD_EXAMPLES=ON
-DOPENCV_ENABLE_NONFREE=ON
${{ matrix.no_opencl && '-DWITH_OPENCL=OFF' || '' }}
${{ matrix.uwp && format('-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_SYSTEM_PROCESSOR={0} -DBUILD_opencv_gapi=OFF -DWITH_MSMF=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_opencv_apps=OFF', matrix.uwp_proc) || '' }}
${{ matrix.config == 'vulkan' && '-DWITH_OPENCL=OFF -DWITH_VULKAN=ON' || '' }}
${{ matrix.arch == 'arm64' && '-DWITH_VULKAN=OFF -DBUILD_opencv_vulkan=OFF -DOPENCV_DNN_VULKAN=OFF -DCMAKE_DISABLE_FIND_PACKAGE_Vulkan=ON -DBUILD_LIST=core,imgproc,highgui,videoio' || '' }}
MAIN_BUILD_DIR: "${{ (github.event.repository.name != 'opencv_contrib') && 'build' || 'build-contrib' }}"
OPENCV_FOR_THREADS_NUM: 8
CMAKE_BUILD_PARALLEL_LEVEL: 8

# ==========

steps:

- name: Propagate environment
run: |
echo "GIT_CACHE=$(cygpath -u "$GIT_CACHE")" >> "$GITHUB_ENV"
echo "DNN_MODELS=$(cygpath -u "$DNN_MODELS")" >> "$GITHUB_ENV"
echo "BINARIES_CACHE=$(cygpath -u "$BINARIES_CACHE")" >> "$GITHUB_ENV"
echo "OPENCV_DOWNLOAD_PATH=$(cygpath -u "$BINARIES_CACHE")" >> "$GITHUB_ENV"


- name: Checkout workflow repository
uses: actions/checkout@v4
with:
repository: opencv/ci-gha-workflow
ref: "${{ github.repository == 'opencv/ci-gha-workflow' && github.ref || inputs.workflow_branch }}"

- working-directory: '${{ github.workspace }}'
shell: bash
run: |
ls -l
export
whoami
id
which bash
echo "GIT_CACHE=$GIT_CACHE"
echo "DNN_MODELS=$DNN_MODELS"
echo "BINARIES_CACHE=$BINARIES_CACHE"
echo "OPENCV_DOWNLOAD_PATH=$BINARIES_CACHE"


- name: Checkout and merge OpenCV
uses: ./checkout-and-merge
with:
target_branch: '${{ matrix.branch }}'
author: '${{ github.event.pull_request.user.login }}'
source_branch: "${{ github.event.repository.name == 'ci-gha-workflow' && '' || github.head_ref }}"
gitcache: '${{ env.GIT_CACHE }}'
workdir: '${{ github.workspace }}'

- name: Update extra dnn models
if: ${{ matrix.arch != 'arm64' }}
timeout-minutes: 60
working-directory: '${{ github.workspace }}'
run: |
python opencv_extra/testdata/dnn/download_models.py \
--cleanup \
--dst '${{ env.DNN_MODELS }}/dnn'
echo "OPENCV_DNN_TEST_DATA_PATH=${{ env.DNN_MODELS }}" >> $GITHUB_ENV

- if: ${{ github.event.repository.name != 'opencv_contrib' }}
name: Configure and build OpenCV
uses: ./configure-and-build
with:
workdir: '${{ github.workspace }}'
builddir: 'build'
generator: '${{ matrix.vs }}'
options: '-A ${{ matrix.cmake_arch }} ${{ env.CMAKE_OPT }}'

- name: Configure and build OpenCV with contrib
uses: ./configure-and-build
with:
workdir: '${{ github.workspace }}'
builddir: 'build-contrib'
generator: '${{ matrix.vs }}'
options: '-A ${{ matrix.cmake_arch }} -DOPENCV_EXTRA_MODULES_PATH=opencv_contrib/modules ${{ env.CMAKE_OPT }}'
12 changes: 3 additions & 9 deletions checkout-and-merge/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ runs:
run: |
echo "::group::Clone opencv"
rm -rf opencv
HOME=${{ inputs.home }} \
git clone \
--reference-if-able ${{ inputs.gitcache }}/opencv.git \
--single-branch \
Expand All @@ -44,14 +43,13 @@ runs:
working-directory: ${{ inputs.workdir }}
shell: bash
run: |
echo "OPENCV_MAIN_FORK=$(HOME=${{ inputs.home }} git ls-remote --heads https://github.com/${{ inputs.author }}/opencv ${{ inputs.source_branch }})" >> $GITHUB_ENV
echo "OPENCV_MAIN_FORK=$(git ls-remote --heads https://github.com/${{ inputs.author }}/opencv ${{ inputs.source_branch }})" >> $GITHUB_ENV

- if: ${{ github.event.repository.name != 'ci-gha-workflow' && contains(inputs.repos, 'main') && inputs.source_branch && env.OPENCV_MAIN_FORK }}
working-directory: ${{ inputs.workdir }}
shell: bash
run: |
echo "::group::Merge opencv"
HOME=${{ inputs.home }} \
git -C opencv pull -v "https://github.com/${{ inputs.author }}/opencv" "${{ inputs.source_branch }}"
echo "::endgroup::"

Expand All @@ -63,7 +61,6 @@ runs:
run: |
echo "::group::Clone opencv_contrib"
rm -rf opencv_contrib
HOME=${{ inputs.home }} \
git clone \
--reference-if-able ${{ inputs.gitcache }}/opencv_contrib.git \
--single-branch \
Expand All @@ -75,14 +72,13 @@ runs:
working-directory: ${{ inputs.workdir }}
shell: bash
run: |
echo "OPENCV_CONTRIB_FORK=$(HOME=${{ inputs.home }} git ls-remote --heads https://github.com/${{ inputs.author }}/opencv_contrib ${{ inputs.source_branch }})" >> $GITHUB_ENV
echo "OPENCV_CONTRIB_FORK=$(git ls-remote --heads https://github.com/${{ inputs.author }}/opencv_contrib ${{ inputs.source_branch }})" >> $GITHUB_ENV

- if: ${{ github.event.repository.name != 'ci-gha-workflow' && contains(inputs.repos, 'contrib') && inputs.source_branch && env.OPENCV_CONTRIB_FORK }}
working-directory: ${{ inputs.workdir }}
shell: bash
run: |
echo "::group::Merge opencv_contrib"
HOME=${{ inputs.home }} \
git -C opencv_contrib pull -v "https://github.com/${{ inputs.author }}/opencv_contrib" "${{ inputs.source_branch }}"
echo "::endgroup::"

Expand All @@ -94,7 +90,6 @@ runs:
run: |
echo "::group::Clone opencv_extra"
rm -rf opencv_extra
HOME=${{ inputs.home }} \
git clone \
--reference-if-able ${{ inputs.gitcache }}/opencv_extra.git \
--single-branch \
Expand All @@ -106,13 +101,12 @@ runs:
working-directory: ${{ inputs.workdir }}
shell: bash
run: |
echo "OPENCV_EXTRA_FORK=$(HOME=${{ inputs.home }} git ls-remote --heads https://github.com/${{ inputs.author }}/opencv_extra ${{ inputs.source_branch }})" >> $GITHUB_ENV
echo "OPENCV_EXTRA_FORK=$(git ls-remote --heads https://github.com/${{ inputs.author }}/opencv_extra ${{ inputs.source_branch }})" >> $GITHUB_ENV

- if: ${{ github.event.repository.name != 'ci-gha-workflow' && contains(inputs.repos, 'extra') && inputs.source_branch && env.OPENCV_EXTRA_FORK }}
working-directory: ${{ inputs.workdir }}
shell: bash
run: |
echo "::group::Merge opencv_extra"
HOME=${{ inputs.home }} \
git -C opencv_extra pull -v "https://github.com/${{ inputs.author }}/opencv_extra" "${{ inputs.source_branch }}"
echo "::endgroup::"
12 changes: 6 additions & 6 deletions configure-and-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@ runs:
shell: bash
run: |
echo "::group::Configure"
rm -rf ${{ inputs.builddir }}
mkdir -p ${{ inputs.builddir }}
rm -rf '${{ inputs.builddir }}'
mkdir -p '${{ inputs.builddir }}'
cmake \
-S opencv \
-B ${{ inputs.builddir }} \
-G ${{ inputs.generator }} \
-B '${{ inputs.builddir }}' \
-G '${{ inputs.generator }}' \
${{ inputs.options }}
echo "::endgroup::"

- working-directory: ${{ inputs.workdir }}
shell: bash
run: |
echo "::group::Build"
cmake --build ${{ inputs.builddir }} 2>&1 | tee ${{ inputs.builddir }}/log.txt
cmake --build '${{ inputs.builddir }}' 2>&1 | tee '${{ inputs.builddir }}/log.txt'
echo "::endgroup::"

- shell: bash
run: |
set +e
python3 ./scripts/warnings-handling.py \
${{ inputs.workdir }}/${{ inputs.builddir }}/log.txt
'${{ inputs.workdir }}/${{ inputs.builddir }}/log.txt'
if [ $? -ne 0 ]; then
echo "WARNINGS=1" >> $GITHUB_ENV
fi
Loading