Skip to content

[infra/onert] Bump up libraries for compute (#16101) #20

[infra/onert] Bump up libraries for compute (#16101)

[infra/onert] Bump up libraries for compute (#16101) #20

name: Run Circle-MLIR Ubuntu Build
on:
push:
branches:
- master
- release/*
paths:
- '.github/workflows/run-circle-mlir-build.yml'
- 'circle-mlir/**'
- '!circle-mlir/infra/debian/**'
- '!circle-mlir/infra/docker/**'
- '!circle-mlir/externals/**'
pull_request:
branches:
- master
- release/*
paths:
- '.github/workflows/run-circle-mlir-build.yml'
- 'circle-mlir/**'
- '!circle-mlir/infra/debian/**'
- '!circle-mlir/infra/docker/**'
- '!circle-mlir/externals/**'
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:
prepare:
if: github.repository_owner == 'Samsung'
runs-on: ubuntu-latest
outputs:
run_matrix: ${{ steps.set-matrix.outputs.run_matrix }}
steps:
- name: set matrix
id: set-matrix
env:
EVENT_NAME: ${{ github.event_name }}
run: |
JSON='{'
if [[ "$EVENT_NAME" == "push" ]]; then
JSON+='"type": ["Debug"],'
JSON+='"ubuntu_code": ["jammy"]'
elif [[ "$EVENT_NAME" == "pull_request" ]]; then
JSON+='"type": ["Debug", "Release"],'
JSON+='"ubuntu_code": ["focal", "jammy", "noble"],'
JSON+='"exclude": [{"ubuntu_code": "focal", "type": "Debug"},'
JSON+='{"ubuntu_code": "noble", "type": "Debug"}]'
else
exit 1
fi
JSON+='}'
echo "run_matrix=$JSON" >> "$GITHUB_OUTPUT"
circle-mlir-test:
needs: [ prepare ]
strategy:
matrix: ${{ fromJSON(needs.prepare.outputs.run_matrix) }}
runs-on: one-x64-linux
container:
image: nnfw/circle-mlir-build:${{ matrix.ubuntu_code }}
options: --user root
name: circle-mlir ${{ matrix.ubuntu_code }} ${{ matrix.type }} test
steps:
- name: Install circle-interpreter
run: |
add-apt-repository ppa:circletools/nightly
apt update
apt install circle-interpreter
- name: Checkout
uses: actions/checkout@v4
# NOTE Docker image has pre-installed submodules in /workdir
# NOTE Docker image has pre-installed python packages
- name: Configure
run: |
source /workdir/venv/bin/activate
cd circle-mlir
Python3_ROOT_DIR=/workdir/venv/bin cmake -B build/${{ matrix.type }} -S ./ \
-DCMAKE_INSTALL_PREFIX=build/${{ matrix.type }}.install \
-DCMAKE_BUILD_TYPE=${{ matrix.type }} \
-DCIRCLE_MLIR_WORKDIR=/workdir
- name: Build, test & install
env:
ONE_COMPILER_ROOT: /usr/share/circletools
run: |
source /workdir/venv/bin/activate
cd circle-mlir
cmake --build build/${{ matrix.type }} -j4
CTEST_OUTPUT_ON_FAILURE=1 cmake --build build/${{ matrix.type }} --verbose -- test
cmake --build build/${{ matrix.type }} -j4 -- install