Skip to content

Commit fef6ec1

Browse files
authored
Ubuntu 24.04 pipeline for 5.x branch (#175)
1 parent b4738f0 commit fef6ec1

File tree

1 file changed

+343
-0
lines changed

1 file changed

+343
-0
lines changed

.github/workflows/OCV-PR-5.x-U24.yaml

+343
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,343 @@
1+
name: OCV PR:5.x U24
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- '.github/workflows/OCV-PR-5.x-U24.yaml'
9+
workflow_call:
10+
11+
concurrency:
12+
group: OCV-PR-5.x-U24-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
env:
16+
EXTRA_CMAKE_OPTIONS: '-DBUILD_DOCS=ON -DPYTHON_DEFAULT_EXECUTABLE=/usr/bin/python3 -DOPENCV_DOWNLOAD_PATH=/home/ubuntu/binaries_cache -DBUILD_EXAMPLES=ON -DOPENCV_ENABLE_NONFREE=ON'
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+
ANT_HOME: '/usr/share/ant'
22+
GIT_CACHE_DOCKER: '/home/ubuntu/git_cache'
23+
PYTHONPATH: /home/ubuntu/build/python_loader:$PYTHONPATH
24+
OPENCV_TEST_DATA_PATH: '/home/ubuntu/opencv_extra/testdata'
25+
OPENCV_TEST_REQUIRE_DATA: 1
26+
OPENCV_DOCKER_WORKDIR: '/home/ubuntu/opencv'
27+
DNN_MODELS: '/home/ubuntu/dnn-models'
28+
PARALLEL_JOBS: 8
29+
30+
jobs:
31+
BuildAndTest:
32+
runs-on: opencv-cn-lin-x86-64
33+
defaults:
34+
run:
35+
shell: bash
36+
container:
37+
image: quay.io/opencv-ci/opencv-ubuntu-24.04:20240424
38+
volumes:
39+
- /home/opencv-cn/git_cache:/home/ubuntu/git_cache
40+
- /home/opencv-cn/ci_cache/opencv:/home/ubuntu/.ccache
41+
- /home/opencv-cn/binaries_cache:/home/ubuntu/binaries_cache
42+
- /home/opencv-cn/dnn-models:/home/ubuntu/dnn-models
43+
steps:
44+
- name: Brief system information
45+
timeout-minutes: 60
46+
run: bash ${{ env.GIT_CACHE_DOCKER }}/print_system_information.sh
47+
- name: Define proper HOME path
48+
timeout-minutes: 60
49+
run: echo "HOME=/home/ubuntu" >> $GITHUB_ENV
50+
- name: Setup infra environment
51+
timeout-minutes: 60
52+
if: ${{ github.event.repository.name == 'ci-gha-workflow' }}
53+
run: echo "TARGET_BRANCH_NAME=5.x" >> $GITHUB_ENV
54+
- name: Setup test environment
55+
if: ${{ github.event.repository.name != 'ci-gha-workflow' }}
56+
run: |
57+
echo "EXTRA_GTEST_OPTIONS=--skip_unstable=1" >> $GITHUB_ENV
58+
- name: PR info
59+
timeout-minutes: 60
60+
run: |
61+
echo "PR Author: ${{ env.PR_AUTHOR }}"
62+
echo "PR Author fork: ${{ env.PR_AUTHOR_FORK }}"
63+
echo "Source branch name: ${{ env.SOURCE_BRANCH_NAME }}"
64+
echo "Target branch name: ${{ env.TARGET_BRANCH_NAME }}"
65+
- name: Clean
66+
timeout-minutes: 60
67+
run: find ${{ env.OPENCV_DOCKER_WORKDIR }} -mindepth 1 -delete
68+
- name: Fetch opencv
69+
timeout-minutes: 60
70+
run: git clone --branch ${{ env.TARGET_BRANCH_NAME }} --reference ${{ env.GIT_CACHE_DOCKER }}/opencv.git https://github.com/opencv/opencv.git ${{ env.OPENCV_DOCKER_WORKDIR }}
71+
- name: Merge opencv with ${{ env.SOURCE_BRANCH_NAME }} branch
72+
timeout-minutes: 60
73+
if: ${{ github.event.repository.name != 'ci-gha-workflow' }}
74+
run: |
75+
cd ${{ env.OPENCV_DOCKER_WORKDIR }}
76+
git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
77+
- name: Clone opencv_extra
78+
timeout-minutes: 60
79+
run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} --reference ${{ env.GIT_CACHE_DOCKER }}/opencv_extra.git https://github.com/opencv/opencv_extra.git $HOME/opencv_extra
80+
- name: Merge opencv_extra with ${{ env.SOURCE_BRANCH_NAME }} branch
81+
if: ${{ github.event.repository.name != 'ci-gha-workflow' }}
82+
run: |
83+
OPENCV_EXTRA_FORK=$(git ls-remote --heads "https://github.com/${{ env.PR_AUTHOR }}/opencv_extra" "${{ env.SOURCE_BRANCH_NAME }}") || true
84+
if [[ ! -z "$OPENCV_EXTRA_FORK" ]]; then
85+
echo "Merge opencv_extra with ${{ env.SOURCE_BRANCH_NAME }} branch"
86+
cd $HOME/opencv_extra
87+
git pull -v "https://github.com/${{ env.PR_AUTHOR }}/opencv_extra" "${{ env.SOURCE_BRANCH_NAME }}"
88+
else
89+
echo "No merge since ${{ env.PR_AUTHOR }}/opencv_extra does not have branch ${{ env.SOURCE_BRANCH_NAME }}"
90+
fi
91+
- name: Extra DNN models update
92+
timeout-minutes: 60
93+
run: |
94+
DOWNLOAD_MODELS_FILE='download_models.py'
95+
LATEST_SAVED_HASH=$(cat ${{ env.DNN_MODELS }}/dnn/latest-hash-${{ env.TARGET_BRANCH_NAME }}.txt)
96+
LATEST_HASH=$(sha256sum $HOME/opencv_extra/testdata/dnn/$DOWNLOAD_MODELS_FILE | awk '{print $1}')
97+
if [[ $LATEST_HASH == $LATEST_SAVED_HASH ]]; then
98+
echo "DNN models are up to date"
99+
echo "OPENCV_DNN_TEST_DATA_PATH=${{ env.DNN_MODELS }}" >> $GITHUB_ENV
100+
else
101+
echo "Updating DNN models list"
102+
echo "OPENCV_DNN_TEST_DATA_PATH=/home/ubuntu/new-dnn-models" >> $GITHUB_ENV && OPENCV_DNN_TEST_DATA_PATH='/home/ubuntu/new-dnn-models'
103+
mkdir -p "$OPENCV_DNN_TEST_DATA_PATH"
104+
rsync -a --exclude=$DOWNLOAD_MODELS_FILE ${{ env.DNN_MODELS }}/* $OPENCV_DNN_TEST_DATA_PATH
105+
cp $HOME/opencv_extra/testdata/dnn/download_models.py $OPENCV_DNN_TEST_DATA_PATH/dnn
106+
cd $OPENCV_DNN_TEST_DATA_PATH/dnn && python3 download_models.py
107+
fi
108+
- name: Configure OpenCV
109+
timeout-minutes: 60
110+
run: |
111+
cd $HOME/build
112+
cmake -G Ninja ${{ env.EXTRA_CMAKE_OPTIONS }} ${{ env.OPENCV_DOCKER_WORKDIR }}
113+
- name: Build OpenCV
114+
timeout-minutes: 60
115+
id: build-opencv
116+
run: |
117+
cd $HOME/build
118+
ninja -j ${{ env.PARALLEL_JOBS }} | tee $HOME/build/build-log.txt
119+
- name: Warnings check
120+
timeout-minutes: 60
121+
run: cd $HOME/build && python3 $HOME/scripts/warnings-handling.py
122+
- name: Accuracy:3d
123+
timeout-minutes: 60
124+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
125+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_3d --test_threads=${{ env.PARALLEL_JOBS }} ${{ env.EXTRA_GTEST_OPTIONS }}
126+
- name: Accuracy:calib
127+
timeout-minutes: 60
128+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
129+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_calib --test_threads=${{ env.PARALLEL_JOBS }} ${{ env.EXTRA_GTEST_OPTIONS }}
130+
- name: Accuracy:core
131+
timeout-minutes: 60
132+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
133+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_core --test_threads=${{ env.PARALLEL_JOBS }} ${{ env.EXTRA_GTEST_OPTIONS }}
134+
- name: Accuracy:dnn
135+
timeout-minutes: 60
136+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
137+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_dnn --test_threads=${{ env.PARALLEL_JOBS }} ${{ env.EXTRA_GTEST_OPTIONS }}
138+
- name: Accuracy:features2d
139+
timeout-minutes: 60
140+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
141+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_features2d --test_threads=${{ env.PARALLEL_JOBS }} ${{ env.EXTRA_GTEST_OPTIONS }}
142+
- name: Accuracy:flann
143+
timeout-minutes: 60
144+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
145+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_flann --test_threads=${{ env.PARALLEL_JOBS }} ${{ env.EXTRA_GTEST_OPTIONS }}
146+
- name: Accuracy:gapi
147+
timeout-minutes: 60
148+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
149+
# G-API bug with GCC 11+: https://github.com/opencv/opencv/issues/19678
150+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_gapi --gtest_filter='-AsyncAPICancelation/cancel/*' --test_threads=${{ env.PARALLEL_JOBS }} ${{ env.EXTRA_GTEST_OPTIONS }}
151+
- name: Accuracy:highgui
152+
timeout-minutes: 60
153+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
154+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_highgui --test_threads=${{ env.PARALLEL_JOBS }} ${{ env.EXTRA_GTEST_OPTIONS }}
155+
- name: Accuracy:imgcodecs
156+
timeout-minutes: 60
157+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
158+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_imgcodecs --test_threads=${{ env.PARALLEL_JOBS }} ${{ env.EXTRA_GTEST_OPTIONS }}
159+
- name: Accuracy:imgproc
160+
timeout-minutes: 60
161+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
162+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_imgproc --test_threads=${{ env.PARALLEL_JOBS }} ${{ env.EXTRA_GTEST_OPTIONS }}
163+
- name: Accuracy:objdetect
164+
timeout-minutes: 60
165+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
166+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_objdetect --test_threads=${{ env.PARALLEL_JOBS }} ${{ env.EXTRA_GTEST_OPTIONS }}
167+
- name: Accuracy:photo
168+
timeout-minutes: 60
169+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
170+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_photo --test_threads=${{ env.PARALLEL_JOBS }} ${{ env.EXTRA_GTEST_OPTIONS }}
171+
- name: Accuracy:stereo
172+
timeout-minutes: 60
173+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
174+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_stereo --test_threads=${{ env.PARALLEL_JOBS }} ${{ env.EXTRA_GTEST_OPTIONS }}
175+
- name: Accuracy:stitching
176+
timeout-minutes: 60
177+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
178+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_stitching --test_threads=${{ env.PARALLEL_JOBS }} ${{ env.EXTRA_GTEST_OPTIONS }}
179+
- name: Accuracy:video
180+
timeout-minutes: 60
181+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
182+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_video --test_threads=${{ env.PARALLEL_JOBS }} ${{ env.EXTRA_GTEST_OPTIONS }}
183+
- name: Accuracy:videoio
184+
timeout-minutes: 60
185+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
186+
# OpenCV-GStreamer bug with MPEG: https://github.com/opencv/opencv/issues/25547
187+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_videoio --gtest_filter='-videoio/videoio_synthetic.write_read_position/9:videoio/videoio_synthetic.write_read_position/12:videoio/videoio_synthetic.write_read_position/25:videoio/videoio_synthetic.write_read_position/28:videoio/videowriter_acceleration.write/40:videoio/videowriter_acceleration.write/42' --test_threads=${{ env.PARALLEL_JOBS }} ${{ env.EXTRA_GTEST_OPTIONS }}
188+
- name: Performance:3d
189+
timeout-minutes: 60
190+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
191+
run: cd $HOME/build && xvfb-run -a bin/opencv_perf_3d --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --perf_threads=${{ env.PARALLEL_JOBS }}
192+
- name: Performance:calib
193+
timeout-minutes: 60
194+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
195+
run: cd $HOME/build && xvfb-run -a bin/opencv_perf_calib --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --perf_threads=${{ env.PARALLEL_JOBS }}
196+
- name: Performance:core
197+
timeout-minutes: 60
198+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
199+
run: cd $HOME/build && xvfb-run -a bin/opencv_perf_core --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --perf_threads=${{ env.PARALLEL_JOBS }}
200+
- name: Performance:dnn
201+
timeout-minutes: 60
202+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
203+
run: cd $HOME/build && xvfb-run -a bin/opencv_perf_dnn --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --perf_threads=${{ env.PARALLEL_JOBS }}
204+
- name: Performance:features2d
205+
timeout-minutes: 60
206+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
207+
run: cd $HOME/build && xvfb-run -a bin/opencv_perf_features2d --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --perf_threads=${{ env.PARALLEL_JOBS }}
208+
- name: Performance:gapi
209+
timeout-minutes: 60
210+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
211+
run: cd $HOME/build && xvfb-run -a bin/opencv_perf_gapi --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --perf_threads=${{ env.PARALLEL_JOBS }}
212+
- name: Performance:imgcodecs
213+
timeout-minutes: 60
214+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
215+
run: cd $HOME/build && xvfb-run -a bin/opencv_perf_imgcodecs --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --perf_threads=${{ env.PARALLEL_JOBS }}
216+
- name: Performance:imgproc
217+
timeout-minutes: 60
218+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
219+
run: cd $HOME/build && xvfb-run -a bin/opencv_perf_imgproc --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --perf_threads=${{ env.PARALLEL_JOBS }}
220+
- name: Performance:objdetect
221+
timeout-minutes: 60
222+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
223+
run: cd $HOME/build && xvfb-run -a bin/opencv_perf_objdetect --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --perf_threads=${{ env.PARALLEL_JOBS }}
224+
- name: Performance:photo
225+
timeout-minutes: 60
226+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
227+
run: cd $HOME/build && xvfb-run -a bin/opencv_perf_photo --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --perf_threads=${{ env.PARALLEL_JOBS }}
228+
- name: Performance:stereo
229+
timeout-minutes: 60
230+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
231+
run: cd $HOME/build && xvfb-run -a bin/opencv_perf_stereo --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --perf_threads=${{ env.PARALLEL_JOBS }}
232+
- name: Performance:stitching
233+
timeout-minutes: 60
234+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
235+
run: cd $HOME/build && xvfb-run -a bin/opencv_perf_stitching --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --perf_threads=${{ env.PARALLEL_JOBS }}
236+
- name: Performance:video
237+
timeout-minutes: 60
238+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
239+
run: cd $HOME/build && xvfb-run -a bin/opencv_perf_video --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --perf_threads=${{ env.PARALLEL_JOBS }}
240+
- name: Performance:videoio
241+
timeout-minutes: 60
242+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
243+
run: cd $HOME/build && xvfb-run -a bin/opencv_perf_videoio --perf_impl=plain --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity --skip_unstable=1 --perf_threads=${{ env.PARALLEL_JOBS }}
244+
- name: Python3 Bindings
245+
timeout-minutes: 60
246+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
247+
run: |
248+
cd $HOME/build
249+
python3 $HOME/opencv/modules/python/test/test.py --repo $HOME/opencv -v
250+
- name: Python3 Apps
251+
timeout-minutes: 60
252+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
253+
run: |
254+
cd $HOME/build
255+
if [ -f "$HOME/opencv/apps/python_app_test.py" ]; then
256+
python3 "$HOME/opencv/apps/python_app_test.py" --repo $HOME/opencv -v
257+
fi
258+
- name: Java
259+
timeout-minutes: 60
260+
id: java-test
261+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
262+
run: cd $HOME/build && xvfb-run -a python3 ${{ env.OPENCV_DOCKER_WORKDIR }}/modules/ts/misc/run.py . -a -t java
263+
- name: Save Unit Test Results
264+
timeout-minutes: 60
265+
uses: actions/upload-artifact@v3
266+
if: ${{ always() && steps.java-test.outcome == 'success' && steps.build-opencv.outcome == 'success' }}
267+
with:
268+
name: junit-html-ubuntu22-x86-64
269+
path: /home/ubuntu/build/java_test/testResults/junit-noframes.html
270+
- name: Pylint
271+
timeout-minutes: 60
272+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
273+
run: cd $HOME/build && cmake --build . --config release --target check_pylint -- -j4
274+
275+
BuildContrib:
276+
runs-on: opencv-cn-lin-x86-64
277+
defaults:
278+
run:
279+
shell: bash
280+
container:
281+
image: quay.io/opencv-ci/opencv-ubuntu-24.04:20240424
282+
volumes:
283+
- /home/opencv-cn/git_cache:/home/ubuntu/git_cache
284+
- /home/opencv-cn/ci_cache/opencv:/home/ubuntu/.ccache
285+
- /home/opencv-cn/binaries_cache:/home/ubuntu/binaries_cache
286+
steps:
287+
- name: Brief system information
288+
timeout-minutes: 60
289+
run: bash ${{ env.GIT_CACHE_DOCKER }}/print_system_information.sh
290+
- name: Define proper HOME path
291+
timeout-minutes: 60
292+
run: echo "HOME=/home/ubuntu" >> $GITHUB_ENV
293+
- name: Setup infra environment
294+
timeout-minutes: 60
295+
if: ${{ github.event.repository.name == 'ci-gha-workflow' }}
296+
run: echo "TARGET_BRANCH_NAME=5.x" >> $GITHUB_ENV
297+
- name: PR info
298+
timeout-minutes: 60
299+
run: |
300+
echo "PR Author: ${{ env.PR_AUTHOR }}"
301+
echo "PR Author fork: ${{ env.PR_AUTHOR_FORK }}"
302+
echo "Source branch name: ${{ env.SOURCE_BRANCH_NAME }}"
303+
echo "Target branch name: ${{ env.TARGET_BRANCH_NAME }}"
304+
- name: Clean
305+
timeout-minutes: 60
306+
run: find ${{ env.OPENCV_DOCKER_WORKDIR }} -mindepth 1 -delete
307+
- name: Fetch opencv
308+
timeout-minutes: 60
309+
run: git clone --branch ${{ env.TARGET_BRANCH_NAME }} --reference ${{ env.GIT_CACHE_DOCKER }}/opencv.git https://github.com/opencv/opencv.git ${{ env.OPENCV_DOCKER_WORKDIR }}
310+
- name: Merge opencv with a test branch
311+
timeout-minutes: 60
312+
if: ${{ github.event.repository.name != 'ci-gha-workflow' }}
313+
run: |
314+
cd ${{ env.OPENCV_DOCKER_WORKDIR }}
315+
git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
316+
- name: Clone opencv_contrib
317+
timeout-minutes: 60
318+
run: git clone --single-branch --branch ${{ env.TARGET_BRANCH_NAME }} --reference ${{ env.GIT_CACHE_DOCKER }}/opencv_contrib.git https://github.com/opencv/opencv_contrib.git $HOME/opencv_contrib
319+
- name: Merge opencv_contrib with ${{ env.SOURCE_BRANCH_NAME }} branch
320+
timeout-minutes: 60
321+
if: ${{ github.event.repository.name != 'ci-gha-workflow' }}
322+
run: |
323+
OPENCV_CONTRIB_FORK=$(git ls-remote --heads "https://github.com/${{ env.PR_AUTHOR }}/opencv_contrib" "${{ env.SOURCE_BRANCH_NAME }}") || true
324+
if [[ ! -z "$OPENCV_CONTRIB_FORK" ]]; then
325+
echo "Merge opencv_contrib with ${{ env.SOURCE_BRANCH_NAME }} branch"
326+
cd $HOME/opencv_contrib
327+
git pull -v "https://github.com/${{ env.PR_AUTHOR }}/opencv_contrib" "${{ env.SOURCE_BRANCH_NAME }}"
328+
else
329+
echo "No merge since ${{ env.PR_AUTHOR }}/opencv_contrib does not have branch ${{ env.SOURCE_BRANCH_NAME }}"
330+
fi
331+
- name: Configure OpenCV Contrib
332+
timeout-minutes: 60
333+
run: |
334+
cd $HOME/build
335+
cmake -G Ninja ${{ env.EXTRA_CMAKE_OPTIONS }} -DOPENCV_EXTRA_MODULES_PATH=$HOME/opencv_contrib/modules ${{ env.OPENCV_DOCKER_WORKDIR }}
336+
- name: Build OpenCV Contrib
337+
timeout-minutes: 60
338+
run: |
339+
cd $HOME/build
340+
ninja -j ${{ env.PARALLEL_JOBS }} | tee $HOME/build/build-log.txt
341+
- name: Warnings check
342+
timeout-minutes: 60
343+
run: cd $HOME/build && python3 $HOME/scripts/warnings-handling.py

0 commit comments

Comments
 (0)