.travis.yml 1.6 KB
Newer Older
1
2
if: branch = master

Guolin Ke's avatar
Guolin Ke committed
3
4
language: cpp

5
6
git:
  submodules: true
7
  depth: 5
8

9
10
11
os:
  - linux
  - osx
12
dist: bionic
13
osx_image: xcode12
14
15

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

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

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

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

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

notifications:
  email: false