-
Notifications
You must be signed in to change notification settings - Fork 16
169 lines (164 loc) · 5.79 KB
/
OCV-Nightly-RISCV.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
name: OCV Nightly RISC-V
on:
pull_request:
branches:
- main
paths:
- '.github/workflows/OCV-Nightly-RISCV.yaml'
workflow_dispatch:
schedule:
- cron: '0 0 * * 6'
concurrency:
group: OCV-Nightly-RISCV-${{ github.ref }}
cancel-in-progress: true
env:
SRC_OPENCV: '/home/ci/opencv'
SRC_OPENCV_CONTRIB: '/home/ci/opencv_contrib'
SRC_OPENCV_EXTRA: '/home/ci/opencv_extra'
BUILD_DIR: '/home/ci/build'
CCACHE_DIR: '/home/ci/.ccache'
GIT_CACHE_DOCKER: '/home/ci/git_cache'
OPENCV_DOWNLOAD_PATH: '/home/ci/binaries_cache'
OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata'
TEST_RUNNER: 'ssh nnplich019'
jobs:
BuildAndTest:
strategy:
max-parallel: 1
matrix:
branch: ['4.x', '5.x']
runs-on: opencv-ru-lin-riscv
defaults:
run:
shell: bash
env:
BRANCH: '${{ matrix.branch }}'
container:
image: quay.io/opencv-ci/opencv-ubuntu-22.04-riscv-071:20231030
volumes:
- /mnt/cache/git_cache:/home/ci/git_cache
- /mnt/cache/ci_cache/opencv:/home/ci/.ccache
- /mnt/cache/binaries_cache:/home/ci/binaries_cache
- /home/build/.ssh:/root/.ssh
steps:
- name: Define proper HOME path
timeout-minutes: 60
run: echo "HOME=/home/ci" >> $GITHUB_ENV
- name: Fetch opencv
timeout-minutes: 60
run: |
rm -rf ${{ env.SRC_OPENCV }}
git clone \
--single-branch \
--branch ${{ env.BRANCH }} \
--reference-if-able ${{ env.GIT_CACHE_DOCKER }}/opencv.git \
https://github.com/opencv/opencv.git \
${{ env.SRC_OPENCV }}
- name: Fetch opencv_contrib
timeout-minutes: 60
run: |
rm -rf ${{ env.SRC_OPENCV_CONTRIB }}
git clone \
--single-branch \
--branch ${{ env.BRANCH }} \
--reference-if-able ${{ env.GIT_CACHE_DOCKER }}/opencv_contrib.git \
https://github.com/opencv/opencv_contrib.git \
${{ env.SRC_OPENCV_CONTRIB }}
- name: Fetch opencv_extra
timeout-minutes: 60
run: |
rm -rf ${{ env.SRC_OPENCV_EXTRA }}
git clone \
--single-branch \
--branch ${{ env.BRANCH }} \
--reference-if-able ${{ env.GIT_CACHE_DOCKER }}/opencv_extra.git \
https://github.com/opencv/opencv_extra.git \
${{ env.SRC_OPENCV_EXTRA }}
- name: Configure OpenCV
timeout-minutes: 60
run: |
cmake -G Ninja \
-S ${{ env.SRC_OPENCV }} \
-B ${{ env.BUILD_DIR }} \
-DCMAKE_TOOLCHAIN_FILE=${{ env.SRC_OPENCV }}/platforms/linux/riscv64-071-gcc.toolchain.cmake \
-DBUILD_SHARED_LIBS=OFF \
-DWITH_OPENCL=OFF \
-DOPENCV_EXTRA_MODULES_PATH=${{ env.SRC_OPENCV_CONTRIB }}/modules \
-DCMAKE_INSTALL_PREFIX=${{ env.BUILD_DIR }}/install
- name: Build OpenCV
timeout-minutes: 60
id: build
run: |
ninja -C ${{ env.BUILD_DIR }} install | tee ${{ env.BUILD_DIR }}/build-log.txt
- name: Deploy to remote host
timeout-minutes: 60
id: deploy
run: |
rsync -az ${{ env.BUILD_DIR }}/bin/ nnplich019:./app --delete
rsync -az ${{ env.SRC_OPENCV_EXTRA }}/testdata/ nnplich019:./testdata --delete
- name: Run core test
timeout-minutes: 60
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }}
run: |
$TEST_RUNNER \
OPENCV_TEST_DATA_PATH=./testdata \
./app/opencv_test_core \
--gtest_filter=*:-Samples.findFile:hal_intrin128.*_BASELINE
- name: Run imgproc test
timeout-minutes: 60
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }}
run: |
$TEST_RUNNER \
OPENCV_TEST_DATA_PATH=./testdata \
./app/opencv_test_imgproc \
--gtest_filter=*:-Imgproc_Hist_Compare.accuracy
- name: Run calib3d test
timeout-minutes: 60
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }}
run: |
$TEST_RUNNER \
OPENCV_TEST_DATA_PATH=./testdata \
./app/opencv_test_calib3d
- name: Run dnn test
timeout-minutes: 60
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }}
run: |
$TEST_RUNNER \
OPENCV_TEST_DATA_PATH=./testdata \
./app/opencv_test_dnn
- name: Run features2d test
timeout-minutes: 60
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }}
run: |
$TEST_RUNNER \
OPENCV_TEST_DATA_PATH=./testdata \
./app/opencv_test_features2d
- name: Run objdetect test
timeout-minutes: 60
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }}
run: |
$TEST_RUNNER \
OPENCV_TEST_DATA_PATH=./testdata \
./app/opencv_test_objdetect
- name: Run photo test
timeout-minutes: 60
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }}
run: |
$TEST_RUNNER \
OPENCV_TEST_DATA_PATH=./testdata \
./app/opencv_test_photo
- name: Run stitching test
timeout-minutes: 60
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }}
run: |
$TEST_RUNNER \
OPENCV_TEST_DATA_PATH=./testdata \
./app/opencv_test_stitching
- name: Run video test
timeout-minutes: 60
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }}
run: |
$TEST_RUNNER \
OPENCV_TEST_DATA_PATH=./testdata \
./app/opencv_test_video \
--gtest_filter=*:-Video_RunningAvg.accuracy