Skip to content

Commit

Permalink
Install gtest in travis.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jul 30, 2018
1 parent fe68170 commit c9eff29
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/travis/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,24 @@ fi

if [ ${TASK} == "cmake_test" ]; then
set -e
# Build gtest via cmake
# Build and install gtest via cmake
wget -nc https://github.com/google/googletest/archive/release-1.7.0.zip
unzip -n release-1.7.0.zip
mv googletest-release-1.7.0 gtest && cd gtest
cmake . && make
mkdir lib && mv libgtest.a lib
make install
cd ..
rm -rf release-1.7.0.zip
rm -rf gtest

# Build/test without AVX
mkdir build && cd build
cmake .. -DGOOGLE_TEST=ON -DGTEST_ROOT=../gtest/
cmake .. -DGOOGLE_TEST=ON
make
cd ..
./testxgboost
rm -rf build

# Build/test with AVX
mkdir build && cd build
cmake .. -DGOOGLE_TEST=ON -DUSE_AVX=ON -DGTEST_ROOT=../gtest/
Expand Down

0 comments on commit c9eff29

Please sign in to comment.