Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RISC-V: upgrade CI image to use clang 17 #176

Merged
merged 7 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/OCV-Contrib-PR-4.x-RISCV.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run:
shell: bash
container:
image: quay.io/opencv-ci/opencv-ubuntu-22.04-riscv-main:20230910
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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/OCV-Contrib-PR-5.x-RISCV.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run:
shell: bash
container:
image: quay.io/opencv-ci/opencv-ubuntu-22.04-riscv-main:20230910
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
Expand Down
202 changes: 202 additions & 0 deletions .github/workflows/OCV-Nightly-RISCV.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ jobs:
OPENCV_TEST_DATA_PATH=${REMOTE_DATA} \
${REMOTE_BIN}/opencv_test_video \
--gtest_filter=*:-Video_RunningAvg.accuracy

BuildAndTest10:
env:
REMOTE_HOST: 'canmv1'
Expand Down Expand Up @@ -345,3 +346,204 @@ jobs:
$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: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 \
-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=*
- 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=*:-Test_ONNX_layers.*:Test_ONNX_conformance.*:Test_Int8_layers.InnerProduct/0
4 changes: 2 additions & 2 deletions .github/workflows/OCV-PR-4.x-RISCV.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run:
shell: bash
container:
image: quay.io/opencv-ci/opencv-ubuntu-22.04-riscv-main:20230910
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
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
run:
shell: bash
container:
image: quay.io/opencv-ci/opencv-ubuntu-22.04-riscv-main:20230910
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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/OCV-PR-5.x-RISCV.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run:
shell: bash
container:
image: quay.io/opencv-ci/opencv-ubuntu-22.04-riscv-main:20230910
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
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
run:
shell: bash
container:
image: quay.io/opencv-ci/opencv-ubuntu-22.04-riscv-main:20230910
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
Expand Down