2019-12-24 05:33:08 +08:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
2019-12-24 06:03:22 +08:00
|
|
|
- image: circleci/python
|
2020-01-21 01:30:08 +08:00
|
|
|
resource_class: medium+
|
2019-12-24 05:33:08 +08:00
|
|
|
|
|
|
|
steps:
|
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
|
2020-01-21 01:30:08 +08:00
|
|
|
- checkout:
|
|
|
|
path: ONNF
|
|
|
|
- run:
|
|
|
|
name: Pull Submodules
|
|
|
|
command: |
|
|
|
|
cd ONNF
|
|
|
|
git submodule update --init --recursive
|
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-03-02 16:24:15 +08:00
|
|
|
key: V8-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-31 23:24:45 +08:00
|
|
|
export MAKEFLAGS=-j4
|
2020-01-21 01:30:08 +08:00
|
|
|
source ONNF/utils/install-mlir.sh
|
2019-12-24 13:09:31 +08:00
|
|
|
fi
|
|
|
|
- save_cache:
|
2020-03-02 16:24:15 +08:00
|
|
|
key: V8-LLVM-PROJECT-{{ arch }}
|
2019-12-24 13:09:31 +08:00
|
|
|
paths:
|
|
|
|
- llvm-project
|
2020-01-10 07:35:52 +08:00
|
|
|
- run:
|
|
|
|
name: Install ONNF
|
|
|
|
command: source ONNF/utils/install-onnf.sh
|
2020-01-21 01:30:08 +08:00
|
|
|
- run:
|
|
|
|
name: Run End-To-End Tests
|
|
|
|
command: |
|
2020-02-25 13:04:15 +08:00
|
|
|
sudo pip install -q -e ./ONNF/third_party/onnx
|
2020-01-21 01:30:08 +08:00
|
|
|
cd ONNF/build
|
|
|
|
cmake --build . --target run-onnx-backend-test
|
2020-01-10 07:35:52 +08:00
|
|
|
- run:
|
|
|
|
name: Run DocCheck
|
|
|
|
command: cd ONNF/build && cmake --build . --target check-doc
|
2020-02-11 03:18:54 +08:00
|
|
|
- run:
|
|
|
|
name: Ensure tablegen documentation is up-to-date
|
|
|
|
command: |
|
|
|
|
cd ONNF/build
|
|
|
|
cmake --build . --target onnf-doc
|
|
|
|
# Check whether dialect documentation is up-to-date.
|
|
|
|
diff doc/Dialects ../doc/Dialects
|
2019-12-24 05:33:08 +08:00
|
|
|
- run:
|
|
|
|
name: Print the Current Time
|
|
|
|
command: date
|