Move gtest to submodule (#262)

* Create gtest submodule and point benchmark to master

* Added submodule files for gtest

* Update benchmark submodule

* Add googletest to top level cmake so that any gtest_adds are not dependent on benchmark.

* Update buildbot, circle CI and travis CI

* Copy test-onnx-mlir.sh to docker container

* build dependencies for tests

Co-authored-by: Tian Jin <tjingrant@gmail.com>
This commit is contained in:
NathanielMcVicar 2020-08-18 05:41:19 -07:00 committed by GitHub
parent 4ed95319db
commit fe6dc5bd81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 28 additions and 5 deletions

View File

@ -72,4 +72,4 @@ cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} .. \
make -j$(nproc)
make -j$(nproc) check-onnx-lit
make -j$(nproc) check-onnx-backend
PATH=$(pwd)/bin:$PATH make -j$(nproc) test
make -j$(nproc) test

View File

@ -47,7 +47,7 @@ jobs:
cd onnx-mlir/build
# Need to include the bin directory in $PATH,
# otherwise CTest fails to find the test executables.
RUNTIME_DIR=$(pwd)/lib PATH=$(pwd)/bin:$PATH make test -j$(nproc)
RUNTIME_DIR=$(pwd)/lib make test -j$(nproc)
- run:
name: Run DocCheck
command: cd onnx-mlir/build && cmake --build . --target check-doc

5
.gitmodules vendored
View File

@ -3,7 +3,10 @@
url = https://github.com/onnx/onnx.git
[submodule "third_party/benchmark"]
path = third_party/benchmark
url = https://github.com/tjingrant/google-benchmark.git
url = https://github.com/google/benchmark.git
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://github.com/google/googletest.git
[submodule "third_party/pybind11"]
path = third_party/pybind11
url = https://github.com/pybind/pybind11.git

View File

@ -34,11 +34,13 @@ script:
- df -h
- docker cp $(pwd) build:/build/onnx-mlir
- cd docker
- chmod a+x compile-onnx-mlir.sh
- chmod a+x compile-onnx-mlir.sh test-onnx-mlir.sh
- docker cp compile-onnx-mlir.sh build:/usr/bin/compile-onnx-mlir.sh
- docker cp test-onnx-mlir.sh build:/usr/bin/test-onnx-mlir.sh
- echo "about to execute build inside docker"
- docker exec build df -h
- docker exec build compile-onnx-mlir.sh
- docker exec build test-onnx-mlir.sh
- docker commit build onnxmlirczar/onnx-mlir-build:$CPU_ARCH
after_success:
- if [ $TRAVIS_PULL_REQUEST == false ] && [ $TRAVIS_BRANCH == "master" ] && [ $NIGHTLY == false ]; then

View File

@ -27,6 +27,7 @@ if (MSVC)
set(CMAKE_CXX_FLAGS "-wd4244 -wd4267 -wd4530 -wd4624")
endif()
add_subdirectory(third_party/onnx)
add_subdirectory(third_party/googletest)
add_subdirectory(third_party/benchmark)
add_subdirectory(third_party/pybind11)
add_subdirectory(third_party/variant)

16
docker/test-onnx-mlir.sh Normal file
View File

@ -0,0 +1,16 @@
#!/bin/bash
pwd
ls -al
# Install prereqs
pip install -e onnx-mlir/third_party/onnx
cd onnx-mlir/build
# Run end-to-end tests:
cmake --build . --target check-onnx-backend
# Run unit tests:
cmake --build .
cmake --build . --target test

@ -1 +1 @@
Subproject commit b57c11391d9c749d6ef2b6139a339acac69bbb76
Subproject commit 1302d2ce094a9753b0f81a81ea74c0fa71fae582

1
third_party/googletest vendored Submodule

@ -0,0 +1 @@
Subproject commit 3af06fe1664d30f98de1e78c53a7087e842a2547