.travis.yml 1.59 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: focal
13
osx_image: xcode12.2
14
15

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

wxchan's avatar
wxchan committed
30
matrix:
31
  exclude:
wxchan's avatar
wxchan committed
32
    - os: osx
33
      env: TASK=gpu METHOD=source
wxchan's avatar
wxchan committed
34
    - os: osx
35
      env: TASK=gpu METHOD=pip PYTHON_VERSION=3.6
36
37
    - os: osx
      env: TASK=gpu METHOD=wheel PYTHON_VERSION=3.7
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 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