.travis.yml 2.81 KB
Newer Older
Guolin Ke's avatar
Guolin Ke committed
1
2
3
4
5
6
7
language: cpp
sudo: required
dist: trusty

before_install:
- test -n $CC  && unset CC
- test -n $CXX && unset CXX
Guolin Ke's avatar
Guolin Ke committed
8
9
10
11
12
13
- wget -O conda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
- chmod +x conda.sh
- bash conda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
- sudo add-apt-repository ppa:george-edison55/cmake-3.x -y
- sudo apt-get update -q
- bash .travis/amd_sdk.sh;
- tar -xjf AMD-SDK.tar.bz2;
- AMDAPPSDK=${HOME}/AMDAPPSDK;
- export OPENCL_VENDOR_PATH=${AMDAPPSDK}/etc/OpenCL/vendors;
- mkdir -p ${OPENCL_VENDOR_PATH};
- sh AMD-APP-SDK*.sh --tar -xf -C ${AMDAPPSDK};
- echo libamdocl64.so > ${OPENCL_VENDOR_PATH}/amdocl64.icd;
- export LD_LIBRARY_PATH=${AMDAPPSDK}/lib/x86_64:${LD_LIBRARY_PATH};
- chmod +x ${AMDAPPSDK}/bin/x86_64/clinfo;
- ${AMDAPPSDK}/bin/x86_64/clinfo;
- export LIBRARY_PATH="$HOME/miniconda/lib:$LIBRARY_PATH"
- export LD_RUN_PATH="$HOME/miniconda/lib:$LD_RUN_PATH"
- export CPLUS_INCLUDE_PATH="$HOME/miniconda/include:$AMDAPPSDK/include/:$CPLUS_INCLUDE_PATH"
Guolin Ke's avatar
Guolin Ke committed
29
30

install:
wxchan's avatar
wxchan committed
31
- sudo apt-get install -y libopenmpi-dev openmpi-bin build-essential
32
- sudo apt-get install -y cmake
33
- conda install --yes atlas numpy scipy scikit-learn pandas matplotlib
34
- conda install --yes -c conda-forge boost=1.63.0
wxchan's avatar
wxchan committed
35
- pip install pep8
Guolin Ke's avatar
Guolin Ke committed
36
37
38

script:
- cd $TRAVIS_BUILD_DIR
39
- mkdir build && cd build && cmake .. && make
Guolin Ke's avatar
Guolin Ke committed
40
- cd $TRAVIS_BUILD_DIR/tests/c_api_test && python test.py
Guolin Ke's avatar
Guolin Ke committed
41
- cd $TRAVIS_BUILD_DIR/python-package && python setup.py install
wxchan's avatar
wxchan committed
42
- cd $TRAVIS_BUILD_DIR/tests/python_package_test && python test_basic.py && python test_engine.py && python test_sklearn.py && python test_plotting.py
43
- cd $TRAVIS_BUILD_DIR && pep8 --ignore=E501 --exclude=./compute .
44
- rm -rf build && mkdir build && cd build && cmake -DUSE_MPI=ON ..&& make
wxchan's avatar
wxchan committed
45
- cd $TRAVIS_BUILD_DIR/tests/c_api_test && python test.py
Guolin Ke's avatar
Guolin Ke committed
46
- cd $TRAVIS_BUILD_DIR/python-package && python setup.py install
wxchan's avatar
wxchan committed
47
- cd $TRAVIS_BUILD_DIR/tests/python_package_test && python test_basic.py && python test_engine.py && python test_sklearn.py && python test_plotting.py
48
49
50
- cd $TRAVIS_BUILD_DIR
- rm -rf build && mkdir build && cd build && cmake -DUSE_GPU=ON -DBOOST_ROOT="$HOME/miniconda/" -DOpenCL_INCLUDE_DIR=$AMDAPPSDK/include/ ..
- sed -i 's/std::string device_type = "cpu";/std::string device_type = "gpu";/' ../include/LightGBM/config.h
51
- make
52
53
54
55
- sed -i 's/std::string device_type = "gpu";/std::string device_type = "cpu";/' ../include/LightGBM/config.h
- cd $TRAVIS_BUILD_DIR/tests/c_api_test && python test.py
- cd $TRAVIS_BUILD_DIR/python-package && python setup.py install
- cd $TRAVIS_BUILD_DIR/tests/python_package_test && python test_basic.py && python test_engine.py && python test_sklearn.py && python test_plotting.py
Guolin Ke's avatar
Guolin Ke committed
56
57
58
59
60
61
62
63

notifications:
  email: false

matrix:
  include:
    - compiler: gcc
    - compiler: clang