Skip to content

Update GitHub Actions to account for upstream IREE changes. (#2) #7

Update GitHub Actions to account for upstream IREE changes. (#2)

Update GitHub Actions to account for upstream IREE changes. (#2) #7

# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
name: IREE Runtime Template
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build and Test
runs-on: ubuntu-20.04
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install cmake clang ninja-build
- name: Setting up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install IREE compiler
run: |
python -m pip install iree-compiler
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize submodules
run : |
git \
-c submodule."third_party/llvm-project".update=none \
-c submodule."third_party/torch-mlir".update=none \
submodule update --init --recursive
- name: Build sample
run: |
cmake -B build/ -G Ninja \
-DCMAKE_C_COMPILER=clang-10 \
-DCMAKE_CXX_COMPILER=clang++-10
cmake --build build/ --target hello_world
- name: Compile sample module
run: |
iree-compile \
--iree-hal-target-backends=llvm-cpu \
simple_mul.mlir \
-o build/simple_mul.vmfb
- name: Test execution
run: |
./build/hello_world local-sync build/simple_mul.vmfb