Skip to content

Commit 3ea3852

Browse files
authored
Merge pull request #76 from asmorkalov/as/debug_armv8
Test PRs in debug mode to check build and generic not optimized branches
2 parents 52d1add + c182867 commit 3ea3852

File tree

2 files changed

+490
-0
lines changed

2 files changed

+490
-0
lines changed
Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
name: OCV PR:4.x ARM64 debug
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- '.github/workflows/OCV-PR-4.x-ARM64-Debug.yaml'
9+
workflow_call:
10+
11+
concurrency:
12+
group: OCV-PR-4.x-ARM64-debug-${{ github.event.pull_request.number }}
13+
cancel-in-progress: true
14+
15+
env:
16+
EXTRA_CMAKE_OPTIONS: '-DCV_DISABLE_OPTIMIZATION=ON -DCMAKE_BUILD_TYPE=Debug -DPYTHON_DEFAULT_EXECUTABLE=/usr/bin/python3 -DOPENCV_DOWNLOAD_PATH=/home/ci/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/ci/git_cache'
23+
PYTHONPATH: /home/ci/build/python_loader:$PYTHONPATH
24+
OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata'
25+
OPENCV_DOCKER_WORKDIR: '/home/ci/opencv'
26+
PARALLEL_JOBS: 16
27+
28+
jobs:
29+
BuildAndTest:
30+
runs-on: opencv-cn-lin-arm64
31+
defaults:
32+
run:
33+
shell: bash
34+
container:
35+
image: quay.io/opencv-ci/opencv-ubuntu-20.04-arm64:20220901
36+
volumes:
37+
- /home/opencv-cn/git_cache:/home/ci/git_cache
38+
- /home/opencv-cn/ci_cache/opencv:/home/ci/.ccache
39+
- /home/opencv-cn/binaries_cache:/home/ci/binaries_cache
40+
- /home/opencv-cn/dnn-models:/home/ci/dnn-models
41+
steps:
42+
- name: Brief system information
43+
timeout-minutes: 60
44+
run: bash ${{ env.GIT_CACHE_DOCKER }}/print_system_information.sh
45+
- name: Define proper HOME path
46+
timeout-minutes: 60
47+
run: echo "HOME=/home/ci" >> $GITHUB_ENV
48+
- name: Setup infra environment
49+
timeout-minutes: 60
50+
if: ${{ github.event.repository.name == 'ci-gha-workflow' }}
51+
run: echo "TARGET_BRANCH_NAME=4.x" >> $GITHUB_ENV
52+
- name: PR info
53+
timeout-minutes: 60
54+
run: |
55+
echo "PR Author: ${{ env.PR_AUTHOR }}"
56+
echo "PR Author fork: ${{ env.PR_AUTHOR_FORK }}"
57+
echo "Source branch name: ${{ env.SOURCE_BRANCH_NAME }}"
58+
echo "Target branch name: ${{ env.TARGET_BRANCH_NAME }}"
59+
- name: Clean
60+
timeout-minutes: 60
61+
run: find ${{ env.OPENCV_DOCKER_WORKDIR }} -mindepth 1 -delete
62+
- name: Fetch opencv
63+
timeout-minutes: 60
64+
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 }}
65+
- name: Merge opencv with ${{ env.SOURCE_BRANCH_NAME }} branch
66+
timeout-minutes: 60
67+
if: ${{ github.event.repository.name != 'ci-gha-workflow' }}
68+
run: |
69+
cd ${{ env.OPENCV_DOCKER_WORKDIR }}
70+
git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
71+
- name: Clone opencv_extra
72+
timeout-minutes: 60
73+
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
74+
- name: Merge opencv_extra with ${{ env.SOURCE_BRANCH_NAME }} branch
75+
timeout-minutes: 60
76+
if: ${{ github.event.repository.name != 'ci-gha-workflow' }}
77+
run: |
78+
OPENCV_EXTRA_FORK=$(git ls-remote --heads "https://github.com/${{ env.PR_AUTHOR }}/opencv_extra" "${{ env.SOURCE_BRANCH_NAME }}") || true
79+
if [[ ! -z "$OPENCV_EXTRA_FORK" ]]; then
80+
echo "Merge opencv_extra with ${{ env.SOURCE_BRANCH_NAME }} branch"
81+
cd $HOME/opencv_extra
82+
git pull -v "https://github.com/${{ env.PR_AUTHOR }}/opencv_extra" "${{ env.SOURCE_BRANCH_NAME }}"
83+
else
84+
echo "No merge since ${{ env.PR_AUTHOR }}/opencv_extra does not have branch ${{ env.SOURCE_BRANCH_NAME }}"
85+
fi
86+
- name: Configure OpenCV
87+
timeout-minutes: 60
88+
run: |
89+
cmake -G Ninja -B $HOME/build ${{ env.EXTRA_CMAKE_OPTIONS }} ${{ env.OPENCV_DOCKER_WORKDIR }}
90+
- name: Build OpenCV
91+
timeout-minutes: 60
92+
id: build-opencv
93+
run: |
94+
cd $HOME/build
95+
ninja -j ${{ env.PARALLEL_JOBS }} | tee $HOME/build/build-log.txt
96+
- name: Warnings check
97+
timeout-minutes: 60
98+
run: cd $HOME/build && python3 $HOME/scripts/warnings-handling.py
99+
- name: Accuracy:calib3d
100+
timeout-minutes: 60
101+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
102+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_calib3d --test_threads=${{ env.PARALLEL_JOBS }}
103+
- name: Accuracy:core
104+
timeout-minutes: 60
105+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
106+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_core --test_threads=${{ env.PARALLEL_JOBS }}
107+
- name: Accuracy:dnn
108+
timeout-minutes: 60
109+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
110+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_dnn --test_threads=${{ env.PARALLEL_JOBS }}
111+
- name: Accuracy:features2d
112+
timeout-minutes: 60
113+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
114+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_features2d --test_threads=${{ env.PARALLEL_JOBS }}
115+
- name: Accuracy:flann
116+
timeout-minutes: 60
117+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
118+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_flann --test_threads=${{ env.PARALLEL_JOBS }}
119+
- name: Accuracy:highgui
120+
timeout-minutes: 60
121+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
122+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_highgui --test_threads=${{ env.PARALLEL_JOBS }}
123+
- name: Accuracy:imgcodecs
124+
timeout-minutes: 60
125+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
126+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_imgcodecs --test_threads=${{ env.PARALLEL_JOBS }}
127+
- name: Accuracy:imgproc
128+
timeout-minutes: 60
129+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
130+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_imgproc --test_threads=${{ env.PARALLEL_JOBS }}
131+
- name: Accuracy:ml
132+
timeout-minutes: 60
133+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
134+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_ml --test_threads=${{ env.PARALLEL_JOBS }}
135+
- name: Accuracy:objdetect
136+
timeout-minutes: 60
137+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
138+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_objdetect --test_threads=${{ env.PARALLEL_JOBS }} --gtest_filter="-Objdetect_QRCode_Close.regression/0:Objdetect_QRCode_Close.regression/4"
139+
- name: Accuracy:photo
140+
timeout-minutes: 60
141+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
142+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_photo --test_threads=${{ env.PARALLEL_JOBS }} --gtest_filter="-Photo_CalibrateDebevec.regression"
143+
- name: Accuracy:stitching
144+
timeout-minutes: 60
145+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
146+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_stitching --test_threads=${{ env.PARALLEL_JOBS }}
147+
- name: Accuracy:video
148+
timeout-minutes: 60
149+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
150+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_video --test_threads=${{ env.PARALLEL_JOBS }}
151+
- name: Accuracy:videoio
152+
timeout-minutes: 60
153+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
154+
run: cd $HOME/build && xvfb-run -a bin/opencv_test_videoio --test_threads=${{ env.PARALLEL_JOBS }}
155+
- name: Python3
156+
timeout-minutes: 60
157+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
158+
run: |
159+
cd ${{ env.OPENCV_DOCKER_WORKDIR }}/modules/python/test
160+
python3 ./test.py --repo ../../../ -v
161+
- name: Java
162+
timeout-minutes: 60
163+
id: java-test
164+
if: ${{ always() && steps.build-opencv.outcome == 'success' }}
165+
run: cd $HOME/build && xvfb-run -a python3 ${{ env.OPENCV_DOCKER_WORKDIR }}/modules/ts/misc/run.py . -a -t java
166+
- name: Save Unit Test Results
167+
timeout-minutes: 60
168+
uses: actions/upload-artifact@v3
169+
if: ${{ always() && steps.java-test.outcome == 'success' && steps.build-opencv.outcome == 'success' }}
170+
with:
171+
name: junit-html-ubuntu20-arm64
172+
path: /home/ci/build/java_test/testResults/junit-noframes.html
173+
174+
BuildContrib:
175+
runs-on: opencv-cn-lin-arm64
176+
defaults:
177+
run:
178+
shell: bash
179+
container:
180+
image: quay.io/opencv-ci/opencv-ubuntu-20.04-arm64:20220901
181+
volumes:
182+
- /home/opencv-cn/git_cache:/home/ci/git_cache
183+
- /home/opencv-cn/ci_cache/opencv:/home/ci/.ccache
184+
- /home/opencv-cn/binaries_cache:/home/ci/binaries_cache
185+
steps:
186+
- name: Brief system information
187+
timeout-minutes: 60
188+
run: bash ${{ env.GIT_CACHE_DOCKER }}/print_system_information.sh
189+
- name: Define proper HOME path
190+
timeout-minutes: 60
191+
run: echo "HOME=/home/ci" >> $GITHUB_ENV
192+
- name: Setup infra environment
193+
timeout-minutes: 60
194+
if: ${{ github.event.repository.name == 'ci-gha-workflow' }}
195+
run: echo "TARGET_BRANCH_NAME=4.x" >> $GITHUB_ENV
196+
- name: PR info
197+
timeout-minutes: 60
198+
run: |
199+
echo "PR Author: ${{ env.PR_AUTHOR }}"
200+
echo "PR Author fork: ${{ env.PR_AUTHOR_FORK }}"
201+
echo "Source branch name: ${{ env.SOURCE_BRANCH_NAME }}"
202+
echo "Target branch name: ${{ env.TARGET_BRANCH_NAME }}"
203+
- name: Clean
204+
timeout-minutes: 60
205+
run: find ${{ env.OPENCV_DOCKER_WORKDIR }} -mindepth 1 -delete
206+
- name: Fetch opencv
207+
timeout-minutes: 60
208+
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 }}
209+
- name: Merge opencv with a test branch
210+
timeout-minutes: 60
211+
if: ${{ github.event.repository.name != 'ci-gha-workflow' }}
212+
run: |
213+
cd ${{ env.OPENCV_DOCKER_WORKDIR }}
214+
git pull -v "https://github.com/${{ env.PR_AUTHOR_FORK }}" "${{ env.SOURCE_BRANCH_NAME }}"
215+
- name: Clone opencv_contrib
216+
timeout-minutes: 60
217+
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
218+
- name: Merge opencv_contrib with ${{ env.SOURCE_BRANCH_NAME }} branch
219+
timeout-minutes: 60
220+
if: ${{ github.event.repository.name != 'ci-gha-workflow' }}
221+
run: |
222+
OPENCV_CONTRIB_FORK=$(git ls-remote --heads "https://github.com/${{ env.PR_AUTHOR }}/opencv_contrib" "${{ env.SOURCE_BRANCH_NAME }}") || true
223+
if [[ ! -z "$OPENCV_CONTRIB_FORK" ]]; then
224+
echo "Merge opencv_contrib with ${{ env.SOURCE_BRANCH_NAME }} branch"
225+
cd $HOME/opencv_contrib
226+
git pull -v "https://github.com/${{ env.PR_AUTHOR }}/opencv_contrib" "${{ env.SOURCE_BRANCH_NAME }}"
227+
else
228+
echo "No merge since ${{ env.PR_AUTHOR }}/opencv_contrib does not have branch ${{ env.SOURCE_BRANCH_NAME }}"
229+
fi
230+
- name: Configure OpenCV Contrib
231+
timeout-minutes: 60
232+
run: |
233+
cmake -G Ninja -B $HOME/build ${{ env.EXTRA_CMAKE_OPTIONS }} -DOPENCV_EXTRA_MODULES_PATH=$HOME/opencv_contrib/modules ${{ env.OPENCV_DOCKER_WORKDIR }}
234+
- name: Build OpenCV Contrib
235+
timeout-minutes: 60
236+
run: |
237+
cd $HOME/build
238+
ninja -j ${{ env.PARALLEL_JOBS }} | tee $HOME/build/build-log.txt
239+
- name: Warnings check
240+
timeout-minutes: 60
241+
run: cd $HOME/build && python3 $HOME/scripts/warnings-handling.py

0 commit comments

Comments
 (0)