-
Notifications
You must be signed in to change notification settings - Fork 21
150 lines (133 loc) · 4.87 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
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'
jobs:
RISC-V:
runs-on: opencv-ru-lin-riscv
concurrency:
group: OCV-Nightly-RISCV-${{ matrix.remote && matrix.host || matrix.version }}
cancel-in-progress: false
strategy:
fail-fast: false
max-parallel: 3
matrix:
version:
- '071'
- 'main'
- 'nds'
- 'sc'
branch: ['4.x', '5.x']
include:
- version: '071'
image: '20240117'
remote: true
host: 'lichee1'
- version: 'main'
image: '20240709'
remote: true
host: 'canmv1'
- version: 'nds'
image: '20240709'
- version: 'sc'
image: '20250216'
defaults:
run:
shell: bash
container:
image: 'quay.io/opencv-ci/opencv-ubuntu-22.04-riscv-${{ matrix.version }}:${{ matrix.image }}'
volumes:
- /mnt/cache/git_cache:/opt/git_cache
- /mnt/cache/ci_cache/opencv:/opt/.ccache
- /mnt/cache/binaries_cache:/opt/binaries_cache
- /home/build/.ssh:/root/.ssh
options: '--user root:root'
env:
CCACHE_DIR: '/opt/.ccache'
CCACHE_MAXSIZE: '3G'
OPENCV_DOWNLOAD_PATH: '/opt/binaries_cache'
CMAKE_OPT: >-
-DBUILD_EXAMPLES=ON
-DOPENCV_ENABLE_NONFREE=ON
-DBUILD_SHARED_LIBS=OFF
-DWITH_OPENCL=OFF
${{ matrix.version == '071' && '-DCMAKE_TOOLCHAIN_FILE=${HOME}/opencv/platforms/linux/riscv64-071-gcc.toolchain.cmake -DCORE=C910V' || '' }}
${{ matrix.version == 'main' && '-DCMAKE_TOOLCHAIN_FILE=${HOME}/opencv/platforms/linux/riscv64-clang.toolchain.cmake -DCPU_BASELINE=RVV -DCPU_BASELINE_REQUIRE=RVV -DRISCV_RVV_SCALABLE=ON' || '' }}
${{ matrix.version == 'nds' && '-DCMAKE_TOOLCHAIN_FILE=${HOME}/opencv/platforms/linux/riscv64-andes-gcc.toolchain.cmake -DRISCV_GCC_INSTALL_ROOT=/opt/andes -DWITH_NDSRVP=ON' || '' }}
${{ matrix.version == 'sc' && '-DCMAKE_TOOLCHAIN_FILE=${HOME}/opencv/platforms/linux/riscv64-clang.toolchain.cmake -DRISCV_CLANG_BUILD_ROOT=/opt/sc-dt/llvm -DRISCV_GCC_INSTALL_ROOT=/opt/sc-dt/riscv-gcc -DCPU_BASELINE=RVV -DCPU_BASELINE_REQUIRE=RVV -DRISCV_RVV_SCALABLE=ON' || '' }}
HOME: '/home/ci'
OPENCV_FOR_THREADS_NUM: 10
CMAKE_BUILD_PARALLEL_LEVEL: 20
REMOTE_HOST: ${{ matrix.host }}
REMOTE_BIN: './bin'
REMOTE_DATA: './testdata'
steps:
- name: Checkout workflow repository
uses: actions/checkout@v4
with:
repository: opencv/ci-gha-workflow
ref: "${{ github.repository == 'opencv/ci-gha-workflow' && github.ref || 'main' }}"
- name: Checkout and merge OpenCV
uses: ./checkout-and-merge
with:
target_branch: "${{ matrix.branch }}"
author: ''
source_branch: ''
gitcache: '/opt/git_cache'
home: '${{ env.HOME }}'
workdir: '${{ env.HOME }}'
- name: Configure and build OpenCV
uses: ./configure-and-build
with:
workdir: '${{ env.HOME }}'
builddir: 'build'
generator: 'Ninja'
options: '${{ env.CMAKE_OPT }}'
- if: ${{ matrix.remote }}
name: Deploy to remote host
timeout-minutes: 15
id: deploy
run: |
rsync -az --stats ${{ env.HOME }}/build/bin/ ${REMOTE_HOST}:${REMOTE_BIN} --delete
rsync -az --stats ${{ env.HOME }}/opencv_extra/testdata/ ${REMOTE_HOST}:${REMOTE_DATA} --delete
- name: Run OpenCV tests
uses: ./run-tests
env:
OPENCV_TEST_DATA_PATH: '${{ env.HOME }}/opencv_extra/testdata'
OPENCV_TEST_CHECK_OPTIONAL_DATA: 1
with:
workdir: '${{ matrix.remote && ''.'' || env.HOME }}'
builddir: '${{ matrix.remote && ''.'' || ''build'' }}'
logdir: '${{ env.HOME }}/build'
plan: "test-plan-riscv-${{ matrix.branch }}.json"
suite: '[ ''${{ matrix.version == ''sc'' && ''short'' || ''default'' }}'' ]'
filter: "[ '${{ matrix.version }}' ]"
options: "${{ matrix.version }}"
timeout: "45"
enable_python: "false"
enable_java: "false"
suffix: '${{ matrix.version }}_${{ matrix.branch }}'
# TODO: enable
# - if: ${{ always() && env.WARNINGS == '1' }}
# name: Warnings check
# run: |
# echo "::error Warnings have been found!"
# exit 1