Commit 314342ce authored by Nikita Titov's avatar Nikita Titov Committed by Guolin Ke
Browse files

[ci] boost_root and opencl_include_dir as pip options (#1161)

* boost_root as pip option

* opencl_include_dir as pip option
parent 28cdf612
...@@ -86,11 +86,9 @@ fi ...@@ -86,11 +86,9 @@ fi
if [[ ${TASK} == "gpu" ]]; then if [[ ${TASK} == "gpu" ]]; then
conda install --yes -c conda-forge boost=1.63.0 conda install --yes -c conda-forge boost=1.63.0
if [[ ${METHOD} == "pip" ]]; then if [[ ${METHOD} == "pip" ]]; then
export PATH="$AMDAPPSDK/include/:$PATH"
export BOOST_ROOT="$HOME/miniconda/envs/test-env/"
sed -i 's/const std::string kDefaultDevice = "cpu";/const std::string kDefaultDevice = "gpu";/' ../include/LightGBM/config.h sed -i 's/const std::string kDefaultDevice = "cpu";/const std::string kDefaultDevice = "gpu";/' ../include/LightGBM/config.h
cd $TRAVIS_BUILD_DIR/python-package && python setup.py sdist || exit -1 cd $TRAVIS_BUILD_DIR/python-package && python setup.py sdist || exit -1
cd $TRAVIS_BUILD_DIR/python-package/dist && pip install lightgbm-$LGB_VER.tar.gz -v --install-option=--gpu || exit -1 cd $TRAVIS_BUILD_DIR/python-package/dist && pip install lightgbm-$LGB_VER.tar.gz -v --install-option=--gpu --install-option="--boost-root=$HOME/miniconda/envs/test-env/" --install-option="--opencl-include-dir=$AMDAPPSDK/include/" || exit -1
cd $TRAVIS_BUILD_DIR && pytest tests/python_package_test || exit -1 cd $TRAVIS_BUILD_DIR && pytest tests/python_package_test || exit -1
exit 0 exit 0
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment