Skip to content

Commit

Permalink
[infra/github] Add arm32/64 onert test
Browse files Browse the repository at this point in the history
This commit adds arm32/64 onert test to onert test workflow.

ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <[email protected]>
  • Loading branch information
hseok-oh committed Jan 14, 2025
1 parent 55ebd1b commit 58f8749
Showing 1 changed file with 46 additions and 2 deletions.
48 changes: 46 additions & 2 deletions .github/workflows/run-onert-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,22 @@ jobs:
matrix:
type: [ debug, release ]
ubuntu_code: [ focal, jammy ] # TODO: noble
arch: [ x86_64 ] # TODO: armv7l, aarch64
arch: [ x86_64, armv7l, aarch64 ]
include:
- arch: armv7l
platform: linux/arm/v7
arch_fs: arm
- arch: aarch64
platform: linux/arm64
arch_fs: aarch64
runs-on: ubuntu-22.04
container:
image: nnfw/one-devtools:${{ matrix.ubuntu_code }}
options: --user root
env:
TARGET_ARCH: ${{ matrix.arch }}
BUILD_TYPE: ${{ matrix.type }}
CROSS_BUILD: ${{ matrix.arch != 'x86_64' && '1' || '0' }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -67,11 +75,47 @@ jobs:
external-onert-
external-
- name: Download rootfs for cross build
if: matrix.arch != 'x86_64'
uses: dawidd6/action-download-artifact@v7
with:
workflow: generate-rootfs.yml
branch: master
name: rootfs_${{ matrix.arch_fs }}_${{ matrix.ubuntu_code }}

# Workaround: symlink for rootfs checker in cmake toolchain file
- name: Install rootfs for cross build
if: matrix.arch != 'x86_64'
run: |
mkdir -p tools/cross/rootfs
tar -zxf rootfs_${{ matrix.arch_fs }}_${{ matrix.ubuntu_code }}.tar.gz -C tools/cross/rootfs
pushd tools/cross/rootfs/${{ matrix.arch_fs }}
ln -sf usr/lib lib
popd
- name: Build onert
run: |
make -f Makefile.template
- name: Run test
- name: Run test on native build
if: matrix.arch == 'x86_64'
run: |
./Product/out/test/onert-test unittest
./Product/out/test/onert-test unittest --unittestdir=./Product/out/nnapi-gtest
- name: QEMU for cross build
if: matrix.arch != 'x86_64'
uses: docker/setup-qemu-action@v3

- name: Run test on cross build
if: matrix.arch != 'x86_64'
uses: addnab/docker-run-action@v3
with:
image: ubuntu:${{ matrix.ubuntu_code }}
shell: bash
options: |
--platform ${{ matrix.platform }}
-v ${{ github.workspace }}:/work -w /work
run: |
./Product/out/test/onert-test unittest
./Product/out/test/onert-test unittest --unittestdir=./Product/out/nnapi-gtest

0 comments on commit 58f8749

Please sign in to comment.