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