2019-12-24 05:33:08 +08:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
2019-12-24 06:03:22 +08:00
|
|
|
- image: circleci/python
|
2019-12-24 05:33:08 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
2019-12-24 13:51:23 +08:00
|
|
|
- run:
|
2020-01-01 02:28:26 +08:00
|
|
|
name: Pull Submodules
|
2019-12-24 13:51:23 +08:00
|
|
|
command: |
|
|
|
|
git submodule update --init --recursive
|
2019-12-24 07:19:55 +08:00
|
|
|
- run:
|
2019-12-31 14:45:32 +08:00
|
|
|
name: Installing GCC, CMake, Ninja, Protobuf
|
2020-01-01 02:28:26 +08:00
|
|
|
command: sudo apt-get update && sudo apt-get install -y gcc g++ cmake ninja-build protobuf-compiler
|
2019-12-31 14:45:32 +08:00
|
|
|
# Use cached mlir installation if possible.
|
2019-12-24 13:09:31 +08:00
|
|
|
- restore_cache:
|
2020-01-01 02:28:26 +08:00
|
|
|
key: V2-LLVM-PROJECT-{{ arch }}
|
2019-12-24 05:33:08 +08:00
|
|
|
- run:
|
2019-12-24 07:19:55 +08:00
|
|
|
name: Install MLIR
|
2019-12-24 05:53:08 +08:00
|
|
|
command: |
|
2019-12-31 14:45:32 +08:00
|
|
|
# Check whether cache restoration succeeds by checking whether
|
|
|
|
# mlir-opt executable exists.
|
2019-12-24 13:48:42 +08:00
|
|
|
if [ ! -f llvm-project/build/bin/mlir-opt ]; then
|
2020-01-01 02:28:26 +08:00
|
|
|
export MAKEFLAGS=-j4
|
|
|
|
source .circleci/install-mlir.sh
|
2019-12-24 13:09:31 +08:00
|
|
|
fi
|
|
|
|
- save_cache:
|
2020-01-01 02:28:26 +08:00
|
|
|
key: V2-LLVM-PROJECT-{{ arch }}
|
2019-12-24 13:09:31 +08:00
|
|
|
paths:
|
|
|
|
- llvm-project
|
|
|
|
- run:
|
|
|
|
name: Install ONNF
|
|
|
|
command: |
|
2019-12-24 13:46:32 +08:00
|
|
|
mkdir build && cd build
|
|
|
|
LLVM_SRC=$(pwd)/../llvm-project/llvm LLVM_BUILD=$(pwd)/../llvm-project/build cmake ..
|
2019-12-24 16:25:07 +08:00
|
|
|
make all
|
2019-12-24 16:15:49 +08:00
|
|
|
LIT_OPTS=-v make check-mlir-lit
|
2019-12-24 05:33:08 +08:00
|
|
|
- run:
|
|
|
|
name: Print the Current Time
|
|
|
|
command: date
|