Enable MLIR python bindings in CI.

pull/81/head
Stella Laurenzo 2020-10-12 21:49:39 -07:00
parent 5c5b8db70f
commit 86df4cabeb
1 changed files with 14 additions and 8 deletions

View File

@ -15,6 +15,12 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
submodules: 'true' submodules: 'true'
- name: Install pytest
run: |
pip3 install pytest
- name: Install pybind11
run: |
sudo apt-get install python3-pybind11
- name: Get LLVM Hash - name: Get LLVM Hash
id: get-llvm-hash id: get-llvm-hash
run: echo "::set-output name=hash::$(git submodule status)" run: echo "::set-output name=hash::$(git submodule status)"
@ -31,7 +37,7 @@ jobs:
mkdir -p ${LLVM}/build mkdir -p ${LLVM}/build
mkdir -p ${LLVM}/install mkdir -p ${LLVM}/install
cd ${LLVM}/build cd ${LLVM}/build
cmake ../llvm -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_TARGETS_TO_BUILD="host" -DCMAKE_INSTALL_PREFIX=../install -DLLVM_ENABLE_PROJECTS='mlir' -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_ENABLE_OCAMLDOC=OFF -DLLVM_ENABLE_BINDINGS=OFF -DLLVM_INSTALL_UTILS=ON -DLLVM_BUILD_TOOLS=ON -DLLVM_INCLUDE_TESTS=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_ENABLE_LLD=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_BUILD_LLVM_DYLIB=ON cmake ../llvm -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_TARGETS_TO_BUILD="host" -DCMAKE_INSTALL_PREFIX=../install -DLLVM_ENABLE_PROJECTS='mlir' -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_ENABLE_OCAMLDOC=OFF -DLLVM_ENABLE_BINDINGS=OFF -DLLVM_INSTALL_UTILS=ON -DLLVM_BUILD_TOOLS=ON -DLLVM_INCLUDE_TESTS=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_ENABLE_LLD=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DMLIR_BINDINGS_PYTHON_ENABLED=ON
cmake --build . --target install -- -j$(nproc) cmake --build . --target install -- -j$(nproc)
build: build:
name: Build and Test name: Build and Test
@ -44,6 +50,12 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
submodules: 'true' submodules: 'true'
- name: Install pytest
run: |
pip3 install pytest
- name: Install pybind11
run: |
sudo apt-get install python3-pybind11
- name: Get LLVM Hash - name: Get LLVM Hash
id: get-llvm-hash id: get-llvm-hash
run: echo "::set-output name=hash::$(git submodule status)" run: echo "::set-output name=hash::$(git submodule status)"
@ -60,14 +72,8 @@ jobs:
mkdir ${LLVM}/build mkdir ${LLVM}/build
mkdir ${LLVM}/install mkdir ${LLVM}/install
cd ${LLVM}/build cd ${LLVM}/build
cmake ../llvm -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_TARGETS_TO_BUILD="host" -DCMAKE_INSTALL_PREFIX=../install -DLLVM_ENABLE_PROJECTS='mlir' -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_ENABLE_OCAMLDOC=OFF -DLLVM_ENABLE_BINDINGS=OFF -DLLVM_INSTALL_UTILS=ON -DLLVM_INCLUDE_TESTS=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_ENABLE_LLD=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_BUILD_LLVM_DYLIB=ON cmake ../llvm -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_TARGETS_TO_BUILD="host" -DCMAKE_INSTALL_PREFIX=../install -DLLVM_ENABLE_PROJECTS='mlir' -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_ENABLE_OCAMLDOC=OFF -DLLVM_ENABLE_BINDINGS=OFF -DLLVM_INSTALL_UTILS=ON -DLLVM_INCLUDE_TESTS=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_ENABLE_LLD=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DMLIR_BINDINGS_PYTHON_ENABLED=ON
cmake --build . --target install -- -j$(nproc) cmake --build . --target install -- -j$(nproc)
- name: Install pytest
run: |
pip3 install pytest
- name: Install pybind11
run: |
sudo apt-get install python3-pybind11
- name: Build and Test npcomp (Assert) - name: Build and Test npcomp (Assert)
run: | run: |
mkdir build_assert mkdir build_assert