onnx-mlir/.circleci/config.yml

65 lines
2.0 KiB
YAML

version: 2
jobs:
build:
docker:
- image: circleci/python
steps:
- checkout
- run:
name: "Pull Submodules"
command: |
git submodule update --init --recursive
- run:
name: Check current directory
command: pwd
- run:
name: Check current directory content
command: ls
- run:
name: Installing GCC
command: 'sudo apt-get update && sudo apt-get install -y gcc g++'
- run:
name: Install CMAKE
command: 'sudo apt-get update && sudo apt-get install -y cmake ninja-build'
- run:
name: Install Protobuf
command: 'sudo apt-get update && sudo apt-get install -y protobuf-compiler'
- run:
name: Check gcc version
command: gcc --version
- restore_cache:
key: LLVM-PROJECT-{{ arch }}
- run:
name: Install MLIR
command: |
if [ ! -f llvm-project/build/bin/mlir-opt ]; then
git clone https://github.com/llvm/llvm-project.git
mkdir llvm-project/build
cd llvm-project/build
cmake -G Ninja ../llvm \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_BUILD_EXAMPLES=ON \
-DLLVM_TARGETS_TO_BUILD="host" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_RTTI=ON
# TODO(tjingrant): why is RTTI necessary?
cmake --build . --target check-mlir
fi
- save_cache:
key: LLVM-PROJECT-{{ arch }}
paths:
- llvm-project
- run:
name: Install ONNF
command: |
mkdir build && cd build
LLVM_SRC=$(pwd)/../llvm-project/llvm LLVM_BUILD=$(pwd)/../llvm-project/build cmake ..
make all
LIT_OPTS=-v make check-mlir-lit
- run:
name: Print the Current Time
command: date