.travis.yml 1.59 KB
Newer Older
Guolin Ke's avatar
Guolin Ke committed
1
2
language: cpp

3
4
5
git:
  submodules: true

6
7
8
os:
  - linux
  - osx
9
10
dist: trusty
osx_image: xcode10.2
11
12

env:
13
  global:  # default values
14
    - PYTHON_VERSION=3.7
15
  matrix:
16
17
18
    - TASK=regular PYTHON_VERSION=3.6
    - TASK=sdist PYTHON_VERSION=2.7
    - TASK=bdist
19
    - TASK=if-else
20
21
    - TASK=pylint
    - TASK=check-docs
22
23
    - TASK=mpi METHOD=source
    - TASK=mpi METHOD=pip
24
25
    - TASK=gpu METHOD=source PYTHON_VERSION=3.5
    - TASK=gpu METHOD=pip PYTHON_VERSION=3.6
26

wxchan's avatar
wxchan committed
27
matrix:
28
  exclude:
wxchan's avatar
wxchan committed
29
    - os: osx
30
      env: TASK=gpu METHOD=source PYTHON_VERSION=3.5
wxchan's avatar
wxchan committed
31
    - os: osx
32
      env: TASK=gpu METHOD=pip PYTHON_VERSION=3.6
33
    - os: osx
34
      env: TASK=pylint
35
36
    - os: osx
      env: TASK=check-docs
wxchan's avatar
wxchan committed
37

Guolin Ke's avatar
Guolin Ke committed
38
before_install:
39
40
  - test -n $CC  && unset CC
  - test -n $CXX && unset CXX
41
  - export HOME_DIRECTORY="$HOME"
42
  - export BUILD_DIRECTORY="$TRAVIS_BUILD_DIR"
43
44
  - if [[ $TRAVIS_OS_NAME == "osx" ]]; then
        export OS_NAME="macos";
45
        export COMPILER="gcc";
46
47
    else
        export OS_NAME="linux";
48
        export COMPILER="clang";
49
    fi
Nikita Titov's avatar
Nikita Titov committed
50
51
  - export CONDA="$HOME/miniconda"
  - export PATH="$CONDA/bin:$PATH"
52
  - export CONDA_ENV="test-env"
53
  - export LGB_VER=$(head -n 1 VERSION.txt)
54
55
  - export AMDAPPSDK_PATH=$HOME/AMDAPPSDK
  - export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH"
56
  - export LD_LIBRARY_PATH="/usr/local/clang/lib:$LD_LIBRARY_PATH"  # fix error "libomp.so: cannot open shared object file: No such file or directory" on Linux with Clang
57
  - export OPENCL_VENDOR_PATH=$AMDAPPSDK_PATH/etc/OpenCL/vendors
wxchan's avatar
wxchan committed
58
59

install:
60
  - bash .ci/setup.sh
Guolin Ke's avatar
Guolin Ke committed
61
62

script:
63
  - bash .ci/test.sh
Guolin Ke's avatar
Guolin Ke committed
64
65
66

notifications:
  email: false