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

3
4
git:
  submodules: true
5
  depth: 5
6

7
8
9
os:
  - linux
  - osx
10
11
dist: bionic
osx_image: xcode11
12
13

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

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

Guolin Ke's avatar
Guolin Ke committed
39
before_install:
40
41
  - test -n $CC  && unset CC
  - test -n $CXX && unset CXX
42
  - export HOME_DIRECTORY="$HOME"
43
  - export BUILD_DIRECTORY="$TRAVIS_BUILD_DIR"
44
45
  - if [[ $TRAVIS_OS_NAME == "osx" ]]; then
        export OS_NAME="macos";
46
        export COMPILER="gcc";
47
48
    else
        export OS_NAME="linux";
49
        export COMPILER="clang";
50
    fi
Nikita Titov's avatar
Nikita Titov committed
51
52
  - export CONDA="$HOME/miniconda"
  - export PATH="$CONDA/bin:$PATH"
53
  - export CONDA_ENV="test-env"
54
  - export LGB_VER=$(head -n 1 VERSION.txt)
55
56
  - export AMDAPPSDK_PATH=$HOME/AMDAPPSDK
  - export LD_LIBRARY_PATH="$AMDAPPSDK_PATH/lib/x86_64:$LD_LIBRARY_PATH"
57
  - 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
58
  - export OPENCL_VENDOR_PATH=$AMDAPPSDK_PATH/etc/OpenCL/vendors
wxchan's avatar
wxchan committed
59
60

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

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

notifications:
  email: false