RISC-V: upgrade SC image with new compiler 2024.08 #131
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
BuildAndTest07: | |
env: | |
REMOTE_HOST: 'lichee1' | |
REMOTE_BIN: './bin' | |
REMOTE_DATA: './testdata' | |
TEST_RUNNER: 'ssh lichee1' | |
BRANCH: '${{ matrix.branch }}' | |
strategy: | |
max-parallel: 1 | |
matrix: | |
branch: ['4.x', '5.x'] | |
runs-on: opencv-ru-lin-riscv | |
defaults: | |
run: | |
shell: bash | |
container: | |
image: quay.io/opencv-ci/opencv-ubuntu-22.04-riscv-071:20240117 | |
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 \ | |
-DCORE=C910V \ | |
-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 --stats ${{ env.BUILD_DIR }}/bin/ ${REMOTE_HOST}:${REMOTE_BIN} --delete | |
rsync -az --stats ${{ env.SRC_OPENCV_EXTRA }}/testdata/ ${REMOTE_HOST}:${REMOTE_DATA} --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=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_core \ | |
--gtest_filter=*:-Samples.findFile:Core_Or*/ElemWiseTest.accuracy/0:Core_Xor*/ElemWiseTest.accuracy/0 | |
- name: Run imgproc test | |
timeout-minutes: 60 | |
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }} | |
run: | | |
$TEST_RUNNER \ | |
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_imgproc | |
- name: Run calib3d test | |
timeout-minutes: 60 | |
if: ${{ always() && matrix.branch == '4.x' && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }} | |
run: | | |
$TEST_RUNNER \ | |
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_calib3d | |
- name: Run 3d test | |
timeout-minutes: 60 | |
if: ${{ always() && matrix.branch == '5.x' && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }} | |
run: | | |
$TEST_RUNNER \ | |
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_3d \ | |
--gtest_filter=*:-Volume/VolumeTestFixture.* | |
- name: Run calib test | |
timeout-minutes: 60 | |
if: ${{ always() && matrix.branch == '5.x' && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }} | |
run: | | |
$TEST_RUNNER \ | |
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_calib | |
- name: Run dnn test | |
timeout-minutes: 60 | |
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }} | |
run: | | |
$TEST_RUNNER \ | |
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_dnn \ | |
--gtest_filter=*:-Test_Int8_layers.InnerProduct/0:Test_Caffe_layers.InnerProduct/0:Test_Caffe_layers.layer_prelu_fc/0:Test_TensorFlow_layers.matmul/0:Test_TensorFlow_layers.lstm/0:Test_Torch_layers.run_reshape_single_sample/0 | |
- name: Run features2d test | |
timeout-minutes: 60 | |
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }} | |
run: | | |
$TEST_RUNNER \ | |
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \ | |
${REMOTE_BIN}/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=${REMOTE_DATA} \ | |
${REMOTE_BIN}/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=${REMOTE_DATA} \ | |
${REMOTE_BIN}/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=${REMOTE_DATA} \ | |
${REMOTE_BIN}/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=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_video \ | |
--gtest_filter=*:-Video_RunningAvg.accuracy | |
BuildAndTest10: | |
env: | |
REMOTE_HOST: 'canmv1' | |
REMOTE_BIN: './bin' | |
REMOTE_DATA: './testdata' | |
TEST_RUNNER: 'ssh canmv1' | |
TEST_OPT: '--test_tag_skip=mem_512mb' | |
BRANCH: '${{ matrix.branch }}' | |
strategy: | |
max-parallel: 1 | |
matrix: | |
branch: ['4.x', '5.x'] | |
runs-on: opencv-ru-lin-riscv | |
defaults: | |
run: | |
shell: bash | |
container: | |
image: quay.io/opencv-ci/opencv-ubuntu-22.04-riscv-main:20240709 | |
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=$HOME/opencv/platforms/linux/riscv64-clang.toolchain.cmake \ | |
-DCPU_BASELINE=RVV \ | |
-DCPU_BASELINE_REQUIRE=RVV \ | |
-DRISCV_RVV_SCALABLE=ON \ | |
-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 --stats ${{ env.BUILD_DIR }}/bin/ ${REMOTE_HOST}:${REMOTE_BIN} --delete | |
rsync -az --stats ${{ env.SRC_OPENCV_EXTRA }}/testdata/ ${REMOTE_HOST}:${REMOTE_DATA} --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=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_core ${TEST_OPT} --gtest_filter=*:-Samples.findFile | |
- name: Run imgproc test | |
timeout-minutes: 60 | |
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }} | |
run: | | |
$TEST_RUNNER \ | |
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_imgproc ${TEST_OPT} --gtest_filter=*:-Imgproc_Hist_Compare.accuracy | |
- name: Run calib3d test | |
timeout-minutes: 60 | |
if: ${{ always() && matrix.branch == '4.x' && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }} | |
run: | | |
$TEST_RUNNER \ | |
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_calib3d ${TEST_OPT} | |
- name: Run 3d test | |
timeout-minutes: 60 | |
if: ${{ always() && matrix.branch == '5.x' && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }} | |
run: | | |
$TEST_RUNNER \ | |
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_3d ${TEST_OPT} | |
- name: Run calib test | |
timeout-minutes: 60 | |
if: ${{ always() && matrix.branch == '5.x' && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }} | |
run: | | |
$TEST_RUNNER \ | |
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_calib ${TEST_OPT} | |
- name: Run dnn test | |
timeout-minutes: 60 | |
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }} | |
run: | | |
$TEST_RUNNER \ | |
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_dnn ${TEST_OPT} --gtest_filter=*:-Test_Caffe_layers.InnerProduct/0 | |
- name: Run features2d test | |
timeout-minutes: 60 | |
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }} | |
run: | | |
$TEST_RUNNER \ | |
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_features2d ${TEST_OPT} --gtest_filter=*:-KAZE/DetectorScaleInvariance.scale/* | |
- name: Run objdetect test | |
timeout-minutes: 60 | |
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }} | |
run: | | |
$TEST_RUNNER \ | |
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_objdetect ${TEST_OPT} | |
- name: Run photo test | |
timeout-minutes: 60 | |
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }} | |
run: | | |
$TEST_RUNNER \ | |
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_photo ${TEST_OPT} | |
- name: Run stitching test | |
timeout-minutes: 60 | |
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }} | |
run: | | |
$TEST_RUNNER \ | |
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_stitching ${TEST_OPT} | |
- name: Run video test | |
timeout-minutes: 60 | |
if: ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }} | |
run: | | |
$TEST_RUNNER \ | |
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \ | |
${REMOTE_BIN}/opencv_test_video ${TEST_OPT} | |
BuildAndTestNDS: | |
env: | |
BRANCH: '${{ matrix.branch }}' | |
OPENCV_DOWNLOAD_PATH: '/home/ci/binaries_cache' | |
OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' | |
TEST_RUNNER: '/opt/andes/bin/qemu-riscv64 -cpu andes-ax25 -L /opt/andes/sysroot' | |
TEST_OPT: '--skip_unstable=1' | |
strategy: | |
max-parallel: 1 | |
matrix: | |
branch: ['4.x', '5.x'] | |
runs-on: opencv-ru-lin-riscv | |
defaults: | |
run: | |
shell: bash | |
container: | |
image: quay.io/opencv-ci/opencv-ubuntu-22.04-riscv-nds:20240709 | |
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=$HOME/opencv/platforms/linux/riscv64-andes-gcc.toolchain.cmake \ | |
-DRISCV_GCC_INSTALL_ROOT=/opt/andes \ | |
-DWITH_NDSRVP=ON \ | |
-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: Run core test | |
timeout-minutes: 60 | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
run: | | |
cd $HOME/build | |
$TEST_RUNNER bin/opencv_test_core \ | |
$TEST_OPT \ | |
--gtest_filter=* | |
- name: Run imgproc test | |
timeout-minutes: 60 | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
run: | | |
cd $HOME/build | |
$TEST_RUNNER bin/opencv_test_imgproc \ | |
$TEST_OPT \ | |
--gtest_filter=*:-Imgproc_Hist_Compare.accuracy | |
- name: Run dnn test | |
timeout-minutes: 60 | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
run: | | |
cd $HOME/build | |
$TEST_RUNNER bin/opencv_test_dnn \ | |
$TEST_OPT \ | |
--gtest_filter=* | |
BuildAndTestSC: | |
env: | |
BRANCH: '${{ matrix.branch }}' | |
OPENCV_DOWNLOAD_PATH: '/home/ci/binaries_cache' | |
OPENCV_TEST_DATA_PATH: '/home/ci/opencv_extra/testdata' | |
TEST_RUNNER: '/opt/sc-dt/tools/bin/qemu-riscv64 -cpu rv64,v=true,vext_spec=v1.0 -L /opt/sc-dt/riscv-gcc/sysroot' | |
TEST_OPT: '--skip_unstable=1' | |
strategy: | |
max-parallel: 1 | |
matrix: | |
branch: ['4.x', '5.x'] | |
runs-on: opencv-ru-lin-riscv | |
defaults: | |
run: | |
shell: bash | |
container: | |
image: quay.io/opencv-ci/opencv-ubuntu-22.04-riscv-sc:20240918 | |
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=$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 \ | |
-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: Run core test | |
timeout-minutes: 60 | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
run: | | |
cd $HOME/build | |
$TEST_RUNNER bin/opencv_test_core \ | |
$TEST_OPT \ | |
--gtest_filter=*:-hal_intrin128.float64x2_BASELINE:Core_ArithmMask.uninitialized:Core_ConvertScale*/ElemWiseTest.accuracy/*:Core_Add/ElemWiseTest.accuracy/*:Core_Sub/ElemWiseTest.accuracy/*:Core_AddS/ElemWiseTest.accuracy/*:Core_SubRS/ElemWiseTest.accuracy/* | |
- name: Run imgproc test | |
timeout-minutes: 60 | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
run: | | |
cd $HOME/build | |
$TEST_RUNNER bin/opencv_test_imgproc \ | |
$TEST_OPT \ | |
--gtest_filter=*:-Imgproc_Hist_Compare.accuracy:ImgProc/Imgproc_RemapRelative.validity/* | |
- name: Run dnn test | |
timeout-minutes: 60 | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
run: | | |
cd $HOME/build | |
$TEST_RUNNER bin/opencv_test_dnn \ | |
$TEST_OPT \ | |
--gtest_filter=*:-Test_ONNX_layers.*:Test_ONNX_conformance.*:Test_Int8_layers.InnerProduct/0 |