Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run ONERT Ubuntu Build
name: Run ONERT Ubuntu Cross Build

on:
push:
Expand Down Expand Up @@ -45,27 +45,22 @@ jobs:
build:
if: github.repository_owner == 'Samsung'
strategy:
# Debug build test on ubuntu 20.04 only
# Debug build test on ubuntu arm32 only
matrix:
type: [ debug, release ]
ubuntu_code: [ focal, jammy ] # TODO: noble
arch: [ x86_64, armv7l, aarch64 ]
ubuntu_code: [ jammy ]
arch: [ armv7l ]
include:
- arch: armv7l
platform: arm
- arch: aarch64
platform: aarch64
exclude:
- ubuntu_code: jammy
type: debug
runs-on: ubuntu-22.04
runs-on: one-x64-linux
container:
image: nnfw/one-devtools:${{ matrix.ubuntu_code }}
image: nnfw/one-devtools:${{ matrix.ubuntu_code }}-cross
options: --user root
env:
TARGET_ARCH: ${{ matrix.arch }}
BUILD_TYPE: ${{ matrix.type }}
CROSS_BUILD: ${{ matrix.arch != 'x86_64' && '1' || '0' }}
CROSS_BUILD: 1
OPTIONS: "-DBUILD_ARMCOMPUTE=OFF" # Disable arm compute library
steps:
- name: Checkout
Expand All @@ -82,7 +77,6 @@ jobs:
external-

- name: Download rootfs for cross build
if: matrix.arch != 'x86_64'
uses: dawidd6/action-download-artifact@v7
with:
workflow: generate-rootfs.yml
Expand All @@ -91,7 +85,6 @@ jobs:

# 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.platform }}_${{ matrix.ubuntu_code }}.tar.gz -C tools/cross/rootfs
Expand All @@ -103,12 +96,6 @@ jobs:
run: |
make -f Makefile.template create-testsuite

- 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: Upload artifacts
uses: actions/upload-artifact@v4
if: matrix.type == 'release'
Expand All @@ -123,13 +110,11 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
ubuntu_code: [ focal, jammy ] # TODO: noble
arch: [ armv7l, aarch64 ]
ubuntu_code: [ jammy ]
arch: [ armv7l ]
include:
- arch: armv7l
platform: linux/arm/v7
- arch: aarch64
platform: linux/arm64
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
Expand Down
87 changes: 87 additions & 0 deletions .github/workflows/run-onert-native-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Run ONERT Ubuntu Native Build

on:
push:
branches:
- master
- release/*
paths:
- '.github/workflows/run-onert-build.yml'
- 'nn*'
- 'Makefile.template'
- 'infra/buildtool/**'
- 'infra/cmake/**'
- 'infra/nncc/**'
- 'infra/nnfw/**'
- 'runtime/**'
- '!runtime/contrib/**'
- '!**/*.md'
pull_request:
branches:
- master
- release/*
paths:
- '.github/workflows/run-onert-build.yml'
- 'nn*'
- 'Makefile.template'
- 'infra/buildtool/**'
- 'infra/cmake/**'
- 'infra/nncc/**'
- 'infra/nnfw/**'
- 'runtime/**'
- '!runtime/contrib/**'
- '!**/*.md'

defaults:
run:
shell: bash

# Cancel previous running jobs when pull request is updated
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
if: github.repository_owner == 'Samsung'
strategy:
# Release build test only on non arm32 platforms
matrix:
type: [ release ]
ubuntu_code: [ jammy ]
arch: [ x86_64, aarch64 ]
include:
- arch: x86_64
runner: one-x64-linux
- arch: aarch64
runner: one-arm-linux
runs-on: ${{ matrix.runner }}
container:
# Use test image: default image is not supporting arm64 yet
# TODO Use default image when it supports arm64
image: nnfw/one-devtools:${{ matrix.ubuntu_code }}-test
options: --user root
env:
TARGET_ARCH: ${{ matrix.arch }}
BUILD_TYPE: ${{ matrix.type }}
OPTIONS: "-DBUILD_ARMCOMPUTE=OFF" # Disable arm compute library
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: Build onert
run: |
make -f Makefile.template
- name: Run test on native
run: |
./Product/out/test/onert-test unittest
./Product/out/test/onert-test unittest --unittestdir=./Product/out/nnapi-gtest