@@ -186,6 +186,7 @@ jobs:
186
186
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \
187
187
${REMOTE_BIN}/opencv_test_video \
188
188
--gtest_filter=*:-Video_RunningAvg.accuracy
189
+
189
190
BuildAndTest10 :
190
191
env :
191
192
REMOTE_HOST : ' canmv1'
@@ -345,3 +346,228 @@ jobs:
345
346
$TEST_RUNNER \
346
347
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \
347
348
${REMOTE_BIN}/opencv_test_video ${TEST_OPT}
349
+
350
+ BuildAndTestNDS :
351
+ env :
352
+ TEST_RUNNER : ' /opt/andes/bin/qemu-riscv64 -cpu andes-ax25 -L /opt/andes/sysroot'
353
+ TEST_OPT : ' '
354
+ BRANCH : ' ${{ matrix.branch }}'
355
+ strategy :
356
+ max-parallel : 1
357
+ matrix :
358
+ branch : ['4.x', '5.x']
359
+ runs-on : opencv-ru-lin-riscv
360
+ defaults :
361
+ run :
362
+ shell : bash
363
+ container :
364
+ image : quay.io/opencv-ci/opencv-ubuntu-22.04-riscv-nds:20240709
365
+ volumes :
366
+ - /mnt/cache/git_cache:/home/ci/git_cache
367
+ - /mnt/cache/ci_cache/opencv:/home/ci/.ccache
368
+ - /mnt/cache/binaries_cache:/home/ci/binaries_cache
369
+ - /home/build/.ssh:/root/.ssh
370
+ steps :
371
+ - name : Define proper HOME path
372
+ timeout-minutes : 60
373
+ run : echo "HOME=/home/ci" >> $GITHUB_ENV
374
+ - name : Fetch opencv
375
+ timeout-minutes : 60
376
+ run : |
377
+ rm -rf ${{ env.SRC_OPENCV }}
378
+ git clone \
379
+ --single-branch \
380
+ --branch ${{ env.BRANCH }} \
381
+ --reference-if-able ${{ env.GIT_CACHE_DOCKER }}/opencv.git \
382
+ https://github.com/opencv/opencv.git \
383
+ ${{ env.SRC_OPENCV }}
384
+ - name : Fetch opencv_contrib
385
+ timeout-minutes : 60
386
+ run : |
387
+ rm -rf ${{ env.SRC_OPENCV_CONTRIB }}
388
+ git clone \
389
+ --single-branch \
390
+ --branch ${{ env.BRANCH }} \
391
+ --reference-if-able ${{ env.GIT_CACHE_DOCKER }}/opencv_contrib.git \
392
+ https://github.com/opencv/opencv_contrib.git \
393
+ ${{ env.SRC_OPENCV_CONTRIB }}
394
+ - name : Fetch opencv_extra
395
+ timeout-minutes : 60
396
+ run : |
397
+ rm -rf ${{ env.SRC_OPENCV_EXTRA }}
398
+ git clone \
399
+ --single-branch \
400
+ --branch ${{ env.BRANCH }} \
401
+ --reference-if-able ${{ env.GIT_CACHE_DOCKER }}/opencv_extra.git \
402
+ https://github.com/opencv/opencv_extra.git \
403
+ ${{ env.SRC_OPENCV_EXTRA }}
404
+ - name : Configure OpenCV
405
+ timeout-minutes : 60
406
+ run : |
407
+ cmake -G Ninja \
408
+ -S ${{ env.SRC_OPENCV }} \
409
+ -B ${{ env.BUILD_DIR }} \
410
+ -DCMAKE_TOOLCHAIN_FILE=$HOME/opencv/platforms/linux/riscv64-andes-gcc.toolchain.cmake \
411
+ -DRISCV_GCC_INSTALL_ROOT=/opt/andes \
412
+ -DCPU_BASELINE=RVV \
413
+ -DCPU_BASELINE_REQUIRE=RVV \
414
+ -DRISCV_RVV_SCALABLE=ON \
415
+ -DBUILD_SHARED_LIBS=OFF \
416
+ -DWITH_OPENCL=OFF \
417
+ -DOPENCV_EXTRA_MODULES_PATH=${{ env.SRC_OPENCV_CONTRIB }}/modules \
418
+ -DCMAKE_INSTALL_PREFIX=${{ env.BUILD_DIR }}/install
419
+ - name : Build OpenCV
420
+ timeout-minutes : 60
421
+ id : build
422
+ run : |
423
+ ninja -C ${{ env.BUILD_DIR }} install | tee ${{ env.BUILD_DIR }}/build-log.txt
424
+ - name : Deploy to remote host
425
+ timeout-minutes : 60
426
+ id : deploy
427
+ run : |
428
+ rsync -az --stats ${{ env.BUILD_DIR }}/bin/ ${REMOTE_HOST}:${REMOTE_BIN} --delete
429
+ rsync -az --stats ${{ env.SRC_OPENCV_EXTRA }}/testdata/ ${REMOTE_HOST}:${REMOTE_DATA} --delete
430
+ - name : Run core test
431
+ timeout-minutes : 60
432
+ if : ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }}
433
+ run : |
434
+ $TEST_RUNNER \
435
+ OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \
436
+ ${REMOTE_BIN}/opencv_test_core ${TEST_OPT} --gtest_filter=*:-Samples.findFile
437
+ - name : Run core test
438
+ timeout-minutes : 60
439
+ if : ${{ always() && steps.build-opencv.outcome == 'success' }}
440
+ run : |
441
+ cd $HOME/build
442
+ $TEST_RUNNER} bin/opencv_test_core \
443
+ $TEST_OPT \
444
+ --gtest_filter=*
445
+ - name : Run imgproc test
446
+ timeout-minutes : 60
447
+ if : ${{ always() && steps.build-opencv.outcome == 'success' }}
448
+ run : |
449
+ cd $HOME/build
450
+ ${{ env.TEST_RUNNER }} bin/opencv_test_imgproc \
451
+ ${{ env.EXTRA_GTEST_OPTIONS }} \
452
+ --gtest_filter=*:-Imgproc_Hist_Compare.accuracy
453
+ - name : Run dnn test
454
+ timeout-minutes : 60
455
+ if : ${{ always() && steps.build-opencv.outcome == 'success' }}
456
+ run : |
457
+ cd $HOME/build
458
+ ${{ env.TEST_RUNNER }} bin/opencv_test_dnn \
459
+ ${{ env.EXTRA_GTEST_OPTIONS }} \
460
+ --gtest_filter=*
461
+
462
+ BuildAndTestSC :
463
+ env :
464
+ TEST_RUNNER : ' /opt/sc-dt/tools/bin/qemu-riscv64 -cpu rv64,v=true,vext_spec=v1.0 -L /opt/sc-dt/riscv-gcc/sysroot'
465
+ TEST_OPT : ' '
466
+ BRANCH : ' ${{ matrix.branch }}'
467
+ strategy :
468
+ max-parallel : 1
469
+ matrix :
470
+ branch : ['4.x', '5.x']
471
+ runs-on : opencv-ru-lin-riscv
472
+ defaults :
473
+ run :
474
+ shell : bash
475
+ container :
476
+ image : quay.io/opencv-ci/opencv-ubuntu-22.04-riscv-sc:20240709
477
+ volumes :
478
+ - /mnt/cache/git_cache:/home/ci/git_cache
479
+ - /mnt/cache/ci_cache/opencv:/home/ci/.ccache
480
+ - /mnt/cache/binaries_cache:/home/ci/binaries_cache
481
+ - /home/build/.ssh:/root/.ssh
482
+ steps :
483
+ - name : Define proper HOME path
484
+ timeout-minutes : 60
485
+ run : echo "HOME=/home/ci" >> $GITHUB_ENV
486
+ - name : Fetch opencv
487
+ timeout-minutes : 60
488
+ run : |
489
+ rm -rf ${{ env.SRC_OPENCV }}
490
+ git clone \
491
+ --single-branch \
492
+ --branch ${{ env.BRANCH }} \
493
+ --reference-if-able ${{ env.GIT_CACHE_DOCKER }}/opencv.git \
494
+ https://github.com/opencv/opencv.git \
495
+ ${{ env.SRC_OPENCV }}
496
+ - name : Fetch opencv_contrib
497
+ timeout-minutes : 60
498
+ run : |
499
+ rm -rf ${{ env.SRC_OPENCV_CONTRIB }}
500
+ git clone \
501
+ --single-branch \
502
+ --branch ${{ env.BRANCH }} \
503
+ --reference-if-able ${{ env.GIT_CACHE_DOCKER }}/opencv_contrib.git \
504
+ https://github.com/opencv/opencv_contrib.git \
505
+ ${{ env.SRC_OPENCV_CONTRIB }}
506
+ - name : Fetch opencv_extra
507
+ timeout-minutes : 60
508
+ run : |
509
+ rm -rf ${{ env.SRC_OPENCV_EXTRA }}
510
+ git clone \
511
+ --single-branch \
512
+ --branch ${{ env.BRANCH }} \
513
+ --reference-if-able ${{ env.GIT_CACHE_DOCKER }}/opencv_extra.git \
514
+ https://github.com/opencv/opencv_extra.git \
515
+ ${{ env.SRC_OPENCV_EXTRA }}
516
+ - name : Configure OpenCV
517
+ timeout-minutes : 60
518
+ run : |
519
+ cmake -G Ninja \
520
+ -S ${{ env.SRC_OPENCV }} \
521
+ -B ${{ env.BUILD_DIR }} \
522
+ -DCMAKE_TOOLCHAIN_FILE=$HOME/opencv/platforms/linux/riscv64-clang.toolchain.cmake \
523
+ -DRISCV_CLANG_BUILD_ROOT=/opt/sc-dt/llvm \
524
+ -DRISCV_GCC_INSTALL_ROOT=/opt/sc-dt/riscv-gcc \
525
+ -DCPU_BASELINE=RVV \
526
+ -DCPU_BASELINE_REQUIRE=RVV \
527
+ -DRISCV_RVV_SCALABLE=ON \
528
+ -DBUILD_SHARED_LIBS=OFF \
529
+ -DWITH_OPENCL=OFF \
530
+ -DOPENCV_EXTRA_MODULES_PATH=${{ env.SRC_OPENCV_CONTRIB }}/modules \
531
+ -DCMAKE_INSTALL_PREFIX=${{ env.BUILD_DIR }}/install
532
+ - name : Build OpenCV
533
+ timeout-minutes : 60
534
+ id : build
535
+ run : |
536
+ ninja -C ${{ env.BUILD_DIR }} install | tee ${{ env.BUILD_DIR }}/build-log.txt
537
+ - name : Deploy to remote host
538
+ timeout-minutes : 60
539
+ id : deploy
540
+ run : |
541
+ rsync -az --stats ${{ env.BUILD_DIR }}/bin/ ${REMOTE_HOST}:${REMOTE_BIN} --delete
542
+ rsync -az --stats ${{ env.SRC_OPENCV_EXTRA }}/testdata/ ${REMOTE_HOST}:${REMOTE_DATA} --delete
543
+ - name : Run core test
544
+ timeout-minutes : 60
545
+ if : ${{ always() && steps.build.outcome == 'success' && steps.deploy.outcome == 'success' }}
546
+ run : |
547
+ $TEST_RUNNER \
548
+ OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \
549
+ ${REMOTE_BIN}/opencv_test_core ${TEST_OPT} --gtest_filter=*:-Samples.findFile
550
+ - name : Run core test
551
+ timeout-minutes : 60
552
+ if : ${{ always() && steps.build-opencv.outcome == 'success' }}
553
+ run : |
554
+ cd $HOME/build
555
+ $TEST_RUNNER} bin/opencv_test_core \
556
+ $TEST_OPT \
557
+ --gtest_filter=*
558
+ - name : Run imgproc test
559
+ timeout-minutes : 60
560
+ if : ${{ always() && steps.build-opencv.outcome == 'success' }}
561
+ run : |
562
+ cd $HOME/build
563
+ ${{ env.TEST_RUNNER }} bin/opencv_test_imgproc \
564
+ ${{ env.EXTRA_GTEST_OPTIONS }} \
565
+ --gtest_filter=*:-Imgproc_Hist_Compare.accuracy
566
+ - name : Run dnn test
567
+ timeout-minutes : 60
568
+ if : ${{ always() && steps.build-opencv.outcome == 'success' }}
569
+ run : |
570
+ cd $HOME/build
571
+ ${{ env.TEST_RUNNER }} bin/opencv_test_dnn \
572
+ ${{ env.EXTRA_GTEST_OPTIONS }} \
573
+ --gtest_filter=*
0 commit comments