From c27f07b7c739b6a27be74f7b2066edf4581a69b5 Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Thu, 13 Jun 2024 19:33:10 +0900 Subject: [PATCH] action: add risc-v test on Ubuntu RISC-V is going to be one of the officially supported archtiecture, soon. Test it and reject a PR if it breaks RISC-V builds. Signed-off-by: MyungJoo Ham --- .github/workflows/get_ssat.sh | 16 ++++++++++++++ .github/workflows/risc-v.yml | 39 +++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/get_ssat.sh create mode 100644 .github/workflows/risc-v.yml diff --git a/.github/workflows/get_ssat.sh b/.github/workflows/get_ssat.sh new file mode 100644 index 0000000000..a2b1bd8bb5 --- /dev/null +++ b/.github/workflows/get_ssat.sh @@ -0,0 +1,16 @@ +#!/bin/bash +pushd /usr/bin/ +wget https://raw.githubusercontent.com/myungjoo/SSAT/main/ssat.sh +wget https://raw.githubusercontent.com/myungjoo/SSAT/main/ssat-api.sh +chmod 755 ssat*.sh +ln -s ssat.sh ssat +popd + +mkdir -p /tmp/bmp2png +pushd /tmp/bmp2png +wget https://raw.githubusercontent.com/myungjoo/SSAT/main/util/bmp2png.c +wget https://raw.githubusercontent.com/myungjoo/SSAT/main/util/meson.build +meson build +ninja -C build +cp build/bmp2png /usr/bin +popd diff --git a/.github/workflows/risc-v.yml b/.github/workflows/risc-v.yml new file mode 100644 index 0000000000..41f94c94f2 --- /dev/null +++ b/.github/workflows/risc-v.yml @@ -0,0 +1,39 @@ +name: Test RISCV64 on Ubuntu + +on: + pull_request: + branches: [ main ] + +jobs: + build_job: + runs-on: ubuntu-20.04 + name: Build on Ubuntu 20.04 RISC-V 64 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Check if rebuild required + uses: ./.github/actions/check-rebuild + with: + mode: rebuild + - uses: uraimo/run-on-arch-action@v2 + name: RISCV64 Run-on-arch + if: env.rebuild == '1' + id: roaa_runcmd + with: + arch: riscv64 + distro: ubuntu22.04 + + githubToken: ${{ github.token }} + + install: | + apt-get -qy update + apt-get -qy install meson ninja-build libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libglib2.0-dev libjson-glib-dev gstreamer1.0-tools gstreamer1.0-plugins-base gstreamer1.0-plugins-good libgtest-dev libpng-dev libopencv-dev python3 python3-dev python3-numpy pkg-config gcc g++ liblua5.1-dev bash wget libpng-dev libopenblas-dev cmake libiniparser-dev + run: | + bash .github/workflows/get_ssat.sh + meson build -Denable-test=true -Denable-debug=true -Denable-tflite-backbone=false -Denable-tflite-interpreter=false + ninja -C build + export NNSTREAMER_CONF=$(pwd)/test/nnstreamer/nnstreamer-test.ini + export NNSTREAMER_FILTERS=$(pwd)/build/nnstreamer/tensor_filter + export NNSTREAMER_TRAINERS=$(pwd)/build/nnstreamer/tensor_trainer + meson test -C build -t 2.0 --print-errorlogs