Imported Upstream version 1.25.0
[platform/core/ml/nnfw.git] / .github / workflows / run-onert-micro-unit-tests.yml
1 name: Run onert-micro Unit tests
2
3 on:
4   pull_request:
5     branches:
6       - master
7       - release/*
8     types:
9       - opened
10       - synchronize
11       - reopened
12       - ready_for_review
13     paths:
14       - 'onert-micro/**'
15       - '.github/workflows/run-onert-micro-unit-tests.yml'
16
17 defaults:
18   run:
19     shell: bash
20
21 jobs:
22   run-onert-micro-unit-tests:
23     name: Run onert-micro Unit tests
24     runs-on: ubuntu-20.04
25     # Skip on draft, check on draft -> ready
26     if: github.event.pull_request.draft == false
27
28     steps:
29       - name: Install Arm GNU Toolchain (arm-none-eabi-gcc)
30         uses: carlosperate/arm-none-eabi-gcc-action@v1
31         with:
32           release: '12.2.Rel1' # <-- The compiler release to use
33       - name: Checkout
34         uses: actions/checkout@v3
35         with:
36           # Checkout PR head commit
37           # Checkout Action use merge commit as default
38           ref: ${{ github.event.pull_request.head.sha }}
39           # Fetch all history and branch (default: 1)
40           fetch-depth: 0
41       - name: Build and Run Tests
42         run: |
43           mkdir build
44           cd build
45           cmake ../infra/onert-micro/ -DENABLE_ONERT_MICRO_TEST=1 -DENABLE_TEST=1
46           make -j$(nproc) luci_interpreter_kernels_micro_test
47           ./onert-micro/eval-driver/luci-interpreter/src/kernels/luci_interpreter_kernels_micro_test