Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 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
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
145 changes: 145 additions & 0 deletions .github/workflows/OCV-PR-Windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
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: opencv-cn-win
needs:
- branch_eval
strategy:
# NOTE: Debugging
fail-fast: true
# fail-fast: false
max-parallel: 3
matrix:
config:
- 'base'
- 'vulkan'
- 'uwp'
include:
- config: 'vulkan'
vulkan: true
- config: 'uwp'
uwp: true

branch: ${{ fromJSON(needs.branch_eval.outputs.branches )}}

defaults:
run:
shell: bash
env:
CMAKE_OPT: >-
-DCL_Z_OPTION=/Z7
-DBUILD_EXAMPLES=ON
-DOPENCV_ENABLE_NONFREE=ON
${{ matrix.uwp && '-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DBUILD_opencv_gapi=OFF -DWITH_MSMF=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_opencv_apps=OFF' }}
${{ matrix.vulkan && '-DWITH_OPENCL=OFF -DWITH_VULKAN=ON' }}
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
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: 'Visual Studio 16 2019'
options: '-A x64 ${{ env.CMAKE_OPT }}'

- name: Configure and build OpenCV with contrib
uses: ./configure-and-build
with:
workdir: '${{ github.workspace }}'
builddir: 'build-contrib'
generator: 'Visual Studio 16 2019'
options: '-A x64 -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