Skip to content
Open
Changes from all commits
Commits
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
170 changes: 120 additions & 50 deletions .github/workflows/PR-4.x.yaml
Original file line number Diff line number Diff line change
@@ -1,55 +1,125 @@
name: PR:4.x

on:
pull_request:
branches:
- 4.x
pull_request:
branches:
- 4.x
schedule:
- cron: "*/20 * * * *"

jobs:

Linux:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-Linux.yaml@main
with:
workflow_branch: main

Windows:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-Windows.yaml@main
with:
workflow_branch: main

Ubuntu2404-ARM64:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-4.x-ARM64.yaml@main

Ubuntu2404-ARM64-Debug:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml@main

Ubuntu2004-x64-OpenVINO:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-4.x-U20-OpenVINO.yaml@main

Ubuntu2004-x64-CUDA:
if: "${{ contains(github.event.pull_request.labels.*.name, 'category: dnn') }} || ${{ contains(github.event.pull_request.labels.*.name, 'category: dnn (onnx)') }}"
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-4.x-U20-Cuda.yaml@main

macOS-ARM64:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-4.x-macOS-ARM64.yaml@main
concurrency:
group: OCV-PR-Linux-${{ github.ref }}
cancel-in-progress: true

macOS-x64:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-4.x-macOS-x86_64.yaml@main

macOS-ARM64-Vulkan:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-4.x-macOS-ARM64-Vulkan.yaml@main

iOS:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-4.x-iOS.yaml@main

Android-SDK:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-4.x-Android-SDK.yaml@main

TIM-VX:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-timvx-backend-tests-4.x.yml@main

docs:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-4.x-docs.yaml@main

Linux-RISC-V-Clang:
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-4.x-RISCV.yaml@main
jobs:
Ubuntu:
runs-on: incredibuild-runner
permissions:
contents: read
defaults:
run:
shell: bash
container:
image: "quay.io/opencv-ci/opencv-ubuntu-24.04:20251127"

env:
CCACHE_MAXSIZE: "8G"
CMAKE_OPT: >-
-DBUILD_DOCS=ON
-DBUILD_EXAMPLES=ON
-DOPENCV_ENABLE_NONFREE=ON
-DWITH_IMGCODEC_GIF=ON
MAIN_BUILD_DIR: "${{ (github.event.repository.name != 'opencv_contrib') && 'build' || 'build-contrib' }}"
OPENCV_FOR_THREADS_NUM: 4
CMAKE_BUILD_PARALLEL_LEVEL: 4

steps:
- name: Checkout workflow repository
uses: actions/checkout@v4
with:
repository: opencv/ci-gha-workflow
ref: main

- name: Checkout and merge OpenCV
uses: ./checkout-and-merge
with:
target_branch: "4.x"
author: "${{ github.event.pull_request.user.login }}"
source_branch: "${{ github.head_ref }}"
home: "${{ github.workspace }}"
workdir: "${{ github.workspace }}"

- name: Create cache directories
run: |
mkdir -p "$GITHUB_WORKSPACE/.ccache"
mkdir -p "$GITHUB_WORKSPACE/binaries_cache"

- if: ${{ github.event.repository.name != 'opencv_contrib' }}
name: Configure OpenCV
run: |
echo "::group::Configure"
cd "$GITHUB_WORKSPACE"
rm -rf build
mkdir -p build
cmake \
-S opencv \
-B build \
-G Ninja \
${{ env.CMAKE_OPT }}
echo "::endgroup::"

- if: ${{ github.event.repository.name != 'opencv_contrib' }}
name: Build OpenCV
run: |
set -x
echo "::group::Build"
cd "$GITHUB_WORKSPACE"
cmake --build build 2>&1 | tee build/log.txt
echo "::endgroup::"

- if: ${{ github.event.repository.name != 'opencv_contrib' }}
name: Check build warnings
run: |
set +e
python3 ./scripts/warnings-handling.py \
"$GITHUB_WORKSPACE/build/log.txt"
if [ $? -ne 0 ]; then
echo "WARNINGS=1" >> $GITHUB_ENV
fi

- name: Configure OpenCV with contrib
run: |
echo "::group::Configure"
cd "$GITHUB_WORKSPACE"
rm -rf build-contrib
mkdir -p build-contrib
cmake \
-S opencv \
-B build-contrib \
-G Ninja \
-DOPENCV_EXTRA_MODULES_PATH=opencv_contrib/modules \
${{ env.CMAKE_OPT }}
echo "::endgroup::"

- name: Build OpenCV with contrib
run: |
set -x
echo "::group::Build"
cd "$GITHUB_WORKSPACE"
cmake --build build-contrib 2>&1 | tee build-contrib/log.txt
echo "::endgroup::"

- name: Check build-contrib warnings
run: |
set +e
python3 ./scripts/warnings-handling.py \
"$GITHUB_WORKSPACE/build-contrib/log.txt"
if [ $? -ne 0 ]; then
echo "WARNINGS=1" >> $GITHUB_ENV
fi

- if: ${{ always() && env.WARNINGS == '1' }}
name: Warnings check
run: |
echo "::error Warnings have been found!"
exit 1
Loading