Refresh template with bindings/c/iree/compiler/
code.
#1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 Compiler Template | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
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: Install prerelease IREE compiler | |
run: | | |
python3 -m pip install iree-compiler \ | |
--find-links https://openxla.github.io/iree/pip-release-links.html | |
- name: Checkout repository | |
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 | |
with: | |
submodules: recursive | |
- name: Build custom compiler tool | |
run: | | |
cmake -B build/ -G Ninja . \ | |
-DCMAKE_C_COMPILER=clang-10 \ | |
-DCMAKE_CXX_COMPILER=clang++-10 | |
cmake --build build/ --target hello-compiler | |
- name: Run custom compiler tool | |
run: | | |
COMPILER_PATH=$(python -c "import iree.compiler as _; print(_.__path__[0])") | |
./build/hello_compiler/hello-compiler \ | |
$COMPILER_PATH/_mlir_libs/libIREECompiler.so |