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..fdc5120cbf --- /dev/null +++ b/.github/workflows/risc-v.yml @@ -0,0 +1,37 @@ +name: Test RISCV64 on Ubuntu + +on: + pull_request: + branches: [ main ] + +jobs: + build_job: + runs-on: ubuntu-22.04 + name: Build on Ubuntu 22.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 libjsoncpp-dev libcurl3-dev + run: | + bash .github/workflows/get_ssat.sh + meson build -Denable-test=true -Denable-tflite-backbone=false -Denable-tflite-interpreter=false -Denable-app=false + ninja -C build + pushd build && ninja test + popd diff --git a/meson.build b/meson.build index 2c2e6add3d..98e6430718 100644 --- a/meson.build +++ b/meson.build @@ -457,12 +457,13 @@ if get_option('enable-app') endif endif -if get_option('platform') != 'android' - nnstreamer_dep = dependency('nnstreamer') - message('building nnstreamer') - subdir('nnstreamer') -else - warning('android nnstreamer-filter and nnstreamer-trainer are not yet supported, building them is skipped') +if get_option('enable-nnstreamer-tensor-filter').enabled() or get_option('enable-nnstreamer-tensor-trainer').enabled() + if get_option('platform') != 'android' + nnstreamer_dep = dependency('nnstreamer') + subdir('nnstreamer') + else + warning('android nnstreamer-filter and nnstreamer-trainer are not yet supported, building them is skipped') + endif endif if get_option('platform') == 'android' diff --git a/test/unittest/compiler/meson.build b/test/unittest/compiler/meson.build index cf9a864577..72cf17ce5c 100644 --- a/test/unittest/compiler/meson.build +++ b/test/unittest/compiler/meson.build @@ -4,19 +4,23 @@ test_target = [ 'compiler_test_util.cpp', 'unittest_compiler.cpp', 'unittest_interpreter.cpp', - 'unittest_tflite_export.cpp', 'unittest_realizer.cpp', ] +test_deps = [ + nntrainer_test_main_deps, + nntrainer_dep, + nntrainer_ccapi_dep, +] + +if get_option('enable-tflite-interpreter') or get_option('enable-nnstreamer-tensor-filter').enabled() + test_target += 'unittest_tflite_export.cpp' + test_deps += tflite_dep +endif exe = executable( test_name, test_target, - dependencies: [ - nntrainer_test_main_deps, - nntrainer_dep, - nntrainer_ccapi_dep, - tflite_dep - ], + dependencies: test_deps, install: get_option('enable-test'), install_dir: application_install_dir )