[TRAVIS] cleanup travis script

This commit is contained in:
tqchen
2016-01-14 17:08:41 -08:00
parent fd173e260f
commit 634db18a0f
25 changed files with 2558 additions and 171 deletions

61
tests/travis/run_test.sh Executable file
View File

@@ -0,0 +1,61 @@
#!/bin/bash
if [ ${TASK} == "lint" ]; then
make lint || exit -1
echo "Check documentations..."
make doxygen 2>log.txt
(cat log.txt| grep -v ENABLE_PREPROCESSING |grep -v "unsupported tag") > logclean.txt
echo "---------Error Log----------"
cat logclean.txt
echo "----------------------------"
(cat logclean.txt|grep warning) && exit -1
(cat logclean.txt|grep error) && exit -1
exit 0
fi
cp make/travis.mk config.mk
make -f dmlc-core/scripts/packages.mk lz4
if [ ${TRAVIS_OS_NAME} == "osx" ]; then
echo "USE_OPENMP=0" >> config.mk
fi
if [ ${TASK} == "python_test" ]; then
make all || exit -1
echo "-------------------------------"
source activate python3
python --version
python -m nose tests/python || exit -1
source activate python2
echo "-------------------------------"
python --version
python -m nose tests/python || exit -1
exit 0
fi
if [ ${TASK} == "r_test" ]; then
set -e
export _R_CHECK_TIMINGS_=0
export R_BUILD_ARGS="--no-build-vignettes --no-manual"
export R_CHECK_ARGS="--no-vignettes --no-manual"
curl -OL http://raw.github.com/craigcitro/r-travis/master/scripts/travis-tool.sh
chmod 755 ./travis-tool.sh
./travis-tool.sh bootstrap
make Rpack
cd ./xgboost
../travis-tool.sh install_deps
../travis-tool.sh run_tests
exit 0
fi
if [ ${TASK} == "java_test" ]; then
set -e
make java
cd java
./create_wrap.sh
cd xgboost4j
mvn clean install -DskipTests=true
mvn test
fi

35
tests/travis/setup.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/bash
if [ ${TRAVIS_OS_NAME} == "osx" ]; then
brew update
brew install graphviz
fi
if [ ${TASK} == "lint" ]; then
pip install cpplint 'pylint==1.4.4' 'astroid==1.3.6' --user `whoami`
fi
if [ ${TASK} == "python_test" ]; then
# python2
if [ ${TRAVIS_OS_NAME} == "osx" ]; then
wget -O conda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
else
wget -O conda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
fi
bash conda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
hash -r
conda config --set always_yes yes --set changeps1 no
conda update -q conda
# Useful for debugging any issues with conda
conda info -a
conda create -n python3 python=3.5
conda create -n python2 python=2.7
source activate python3
conda install numpy scipy pandas matplotlib nose scikit-learn
python -m pip install graphviz
source activate python2
conda install numpy scipy pandas matplotlib nose scikit-learn
python -m pip install graphviz
fi

View File

@@ -0,0 +1,5 @@
#!/bin/bash
if [ ${TASK} == "r_test" ]; then
cat xgboost/xgboost.Rcheck/*.log
fi