Skip to content

Commit 770ac7d

Browse files
committed
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 <myungjoo.ham@samsung.com>
1 parent 64bd12e commit 770ac7d

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

.github/workflows/get_ssat.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
pushd /usr/bin/
3+
wget https://raw.githubusercontent.com/myungjoo/SSAT/main/ssat.sh
4+
wget https://raw.githubusercontent.com/myungjoo/SSAT/main/ssat-api.sh
5+
chmod 755 ssat*.sh
6+
ln -s ssat.sh ssat
7+
popd
8+
9+
mkdir -p /tmp/bmp2png
10+
pushd /tmp/bmp2png
11+
wget https://raw.githubusercontent.com/myungjoo/SSAT/main/util/bmp2png.c
12+
wget https://raw.githubusercontent.com/myungjoo/SSAT/main/util/meson.build
13+
meson build
14+
ninja -C build
15+
cp build/bmp2png /usr/bin
16+
popd

.github/workflows/risc-v.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test RISCV64 on Ubuntu
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
jobs:
8+
build_job:
9+
runs-on: ubuntu-20.04
10+
name: Build on Ubuntu 20.04 RISC-V 64
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
- name: Check if rebuild required
16+
uses: ./.github/actions/check-rebuild
17+
with:
18+
mode: rebuild
19+
- uses: uraimo/run-on-arch-action@v2
20+
name: RISCV64 Run-on-arch
21+
if: env.rebuild == '1'
22+
id: roaa_runcmd
23+
with:
24+
arch: riscv64
25+
distro: ubuntu22.04
26+
27+
githubToken: ${{ github.token }}
28+
29+
install: |
30+
apt-get -qy update
31+
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
32+
run: |
33+
bash .github/workflows/get_ssat.sh
34+
meson build -Denable-test=true -Denable-debug=true -Denable-tflite-backbone=false -Denable-tflite-interpreter=false
35+
ninja -C build
36+
export NNSTREAMER_CONF=$(pwd)/test/nnstreamer/nnstreamer-test.ini
37+
export NNSTREAMER_FILTERS=$(pwd)/build/nnstreamer/tensor_filter
38+
export NNSTREAMER_TRAINERS=$(pwd)/build/nnstreamer/tensor_trainer
39+
meson test -C build -t 2.0 --print-errorlogs

0 commit comments

Comments
 (0)