RISC-V: added nightly builder for RVV 0.7.1 #12
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 * * *' | |
concurrency: | |
group: OCV-Nightly-RISCV-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
BRANCH: '4.x' | |
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: | |
BuildAndTest: | |
runs-on: opencv-ru-lin-riscv | |
defaults: | |
run: | |
shell: bash | |
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:/home/ci/.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 \ | |
-DOPENCV_EXTRA_MODULES_PATH=${{ env.SRC_OPENCV_CONTRIB }}/modules | |
- name: Build OpenCV | |
timeout-minutes: 60 | |
id: build-opencv | |
run: | | |
ninja -C ${{ env.BUILD_DIR }} | tee ${{ env.BUILD_DIR }}/build-log.txt | |
- name: Probe remote host | |
timeout-minutes: 60 | |
run: rsync -avz ${{ env.BUILD_DIR }}/bin nnplich019:./build/bin |