Skip to content

[infra/github] Add arm32/64 onert test #7

[infra/github] Add arm32/64 onert test

[infra/github] Add arm32/64 onert test #7

Workflow file for this run

name: Run ONERT Ubuntu Build
on:
push:
branches:
- master
- release/*
paths:
- '.github/workflows/run-onert-build.yml'
- 'nn*'
- 'Makefile.template'
- 'compute/**'
- 'infra/buildtool/**'
- 'infra/cmake/**'
- 'infra/nncc/**'
- 'infra/nnfw/**'
- 'runtime/**'
- 'tests/**'
- '!**/*.md'
pull_request:
branches:
- master
- release/*
paths:
- '.github/workflows/run-onert-build.yml'
- 'nn*'
- 'Makefile.template'
- 'compute/**'
- 'infra/buildtool/**'
- 'infra/cmake/**'
- 'infra/nncc/**'
- 'infra/nnfw/**'
- 'runtime/**'
- 'tests/**'
- '!**/*.md'
defaults:
run:
shell: bash
jobs:
build:
if: github.repository_owner == 'Samsung'
strategy:
matrix:
type: [ debug, release ]
ubuntu_code: [ focal, jammy ] # TODO: noble
arch: [ x86_64, armv7l, aarch64 ]
include:
- arch: armv7l
rootfs: rootfs_${{ matrix.ubuntu_code }}_arm

Check failure on line 51 in .github/workflows/run-onert-build.yml

View workflow run for this annotation

GitHub Actions / Run ONERT Ubuntu Build

Invalid workflow file

The workflow is not valid. .github/workflows/run-onert-build.yml (Line: 51, Col: 21): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.ubuntu_code .github/workflows/run-onert-build.yml (Line: 55, Col: 21): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.ubuntu_code
platform: arm/v7
- arch: aarch64
platform: arm64
rootfs: rootfs_${{ matrix.ubuntu_code }}_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
- name: Caching externals
uses: actions/cache@v4
with:
path: externals
key: external-onert-${{ matrix.ubuntu_code }}-${{ hashFiles('infra/cmake/packages/**/*.cmake') }}-${{ hashFiles('infra/nnfw/cmake/packages/**/*.cmake') }}
restore-keys: |
external-onert-${{ matrix.ubuntu_code }}-
external-onert-
external-
- name: Download rootfs for cross build
if: matrix.arch != 'x86_64'
uses: dawidd6/action-download-artifact@7
with:
workflow: generate-rootfs.yml
branch: master
name: ${{ matrix.rootfs }}
- name: Install rootfs for cross build
if: matrix.arch != 'x86_64'
run: |
mkdir -p tools/cross/rootfs
tar -zxf ${{ matrix.rootfs }}.tar.gz -C tools/cross/rootfs
- name: Build onert
run: |
make -f Makefile.template
- 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 linux/${{ 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