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:
parent
4ed95319db
commit
fe6dc5bd81
|
@ -72,4 +72,4 @@ cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} .. \
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
make -j$(nproc) check-onnx-lit
|
make -j$(nproc) check-onnx-lit
|
||||||
make -j$(nproc) check-onnx-backend
|
make -j$(nproc) check-onnx-backend
|
||||||
PATH=$(pwd)/bin:$PATH make -j$(nproc) test
|
make -j$(nproc) test
|
||||||
|
|
|
@ -47,7 +47,7 @@ jobs:
|
||||||
cd onnx-mlir/build
|
cd onnx-mlir/build
|
||||||
# Need to include the bin directory in $PATH,
|
# Need to include the bin directory in $PATH,
|
||||||
# otherwise CTest fails to find the test executables.
|
# 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:
|
- run:
|
||||||
name: Run DocCheck
|
name: Run DocCheck
|
||||||
command: cd onnx-mlir/build && cmake --build . --target check-doc
|
command: cd onnx-mlir/build && cmake --build . --target check-doc
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
url = https://github.com/onnx/onnx.git
|
url = https://github.com/onnx/onnx.git
|
||||||
[submodule "third_party/benchmark"]
|
[submodule "third_party/benchmark"]
|
||||||
path = 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"]
|
[submodule "third_party/pybind11"]
|
||||||
path = third_party/pybind11
|
path = third_party/pybind11
|
||||||
url = https://github.com/pybind/pybind11.git
|
url = https://github.com/pybind/pybind11.git
|
||||||
|
|
|
@ -34,11 +34,13 @@ script:
|
||||||
- df -h
|
- df -h
|
||||||
- docker cp $(pwd) build:/build/onnx-mlir
|
- docker cp $(pwd) build:/build/onnx-mlir
|
||||||
- cd docker
|
- 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 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"
|
- echo "about to execute build inside docker"
|
||||||
- docker exec build df -h
|
- docker exec build df -h
|
||||||
- docker exec build compile-onnx-mlir.sh
|
- docker exec build compile-onnx-mlir.sh
|
||||||
|
- docker exec build test-onnx-mlir.sh
|
||||||
- docker commit build onnxmlirczar/onnx-mlir-build:$CPU_ARCH
|
- docker commit build onnxmlirczar/onnx-mlir-build:$CPU_ARCH
|
||||||
after_success:
|
after_success:
|
||||||
- if [ $TRAVIS_PULL_REQUEST == false ] && [ $TRAVIS_BRANCH == "master" ] && [ $NIGHTLY == false ]; then
|
- if [ $TRAVIS_PULL_REQUEST == false ] && [ $TRAVIS_BRANCH == "master" ] && [ $NIGHTLY == false ]; then
|
||||||
|
|
|
@ -27,6 +27,7 @@ if (MSVC)
|
||||||
set(CMAKE_CXX_FLAGS "-wd4244 -wd4267 -wd4530 -wd4624")
|
set(CMAKE_CXX_FLAGS "-wd4244 -wd4267 -wd4530 -wd4624")
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory(third_party/onnx)
|
add_subdirectory(third_party/onnx)
|
||||||
|
add_subdirectory(third_party/googletest)
|
||||||
add_subdirectory(third_party/benchmark)
|
add_subdirectory(third_party/benchmark)
|
||||||
add_subdirectory(third_party/pybind11)
|
add_subdirectory(third_party/pybind11)
|
||||||
add_subdirectory(third_party/variant)
|
add_subdirectory(third_party/variant)
|
||||||
|
|
|
@ -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
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 3af06fe1664d30f98de1e78c53a7087e842a2547
|
Loading…
Reference in New Issue