Dialect Conversion #14
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
name: Build and Test w/CMake | |
permissions: read-all | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Install prerequisites | |
run: | | |
sudo apt update | |
sudo apt install -y uuid-dev | |
- name: Cache LLVM artifact | |
id: cache-llvm | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./externals/llvm-project | |
key: ${{ runner.os }}-norm-${{ hashFiles('externals/llvm-project/llvm/CMakeLists.txt') }} | |
- name: Build LLVM | |
if: steps.cache-llvm.outputs.cache-hit != 'true' | |
run: | | |
git submodule update --init --recursive | |
cd externals/llvm-project | |
mkdir build && cd build | |
cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS=mlir -DLLVM_BUILD_EXAMPLES=ON -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RTTI=ON -DLLVM_TARGETS_TO_BUILD="host" | |
cmake --build . --target check-mlir | |
- name: Build and test mlir-tutorial | |
run: | | |
mkdir build && cd build | |
cmake -DLLVM_DIR=$PWD/../externals/llvm-project/build/lib/cmake/llvm -DMLIR_DIR=$PWD/../externals/llvm-project/build/lib/cmake/mlir .. | |
cmake --build . --target MLIRAffineFullUnrollPasses | |
cmake --build . --target MLIRMulToAddPasses | |
cmake --build . --target mlir-headers | |
cmake --build . --target tutorial-opt | |
cmake --build . --target check-mlir-tutorial |