1group: travis_latest
2language: python
3services: docker
4
5osx_image: xcode10.1
6
7matrix:
8  include:
9  - env: TASK=lint
10    os: linux
11    python: '3.6'
12  - env: TASK=unittest_gtest
13    os: linux
14    python: '3.6'
15  - env: TASK=cmake_test
16    os: linux
17    python: '3.6'
18  - env: TASK=sanitizer_test
19    os: linux
20    python: '3.6'
21  - env: TASK=unittest_gtest
22    language: ruby
23    os: osx
24  - env: TASK=cmake_test
25    language: ruby
26    os: osx
27  - env: TASK=s390x_test
28    os: linux
29    python: '3.6'
30
31# dependent apt packages
32addons:
33  apt:
34    sources:
35      - ubuntu-toolchain-r-test
36    packages:
37      - doxygen
38      - wget
39      - git
40      - libcurl4-openssl-dev
41      - unzip
42      - gcc-4.8
43      - g++-4.8
44  homebrew:
45    packages:
46      - gcc@7
47      - python3
48    update: true
49
50before_install:
51  - export TRAVIS=scripts/travis
52  - source ${TRAVIS}/travis_setup_env.sh
53  - ${TRAVIS}/travis_osx_install.sh
54
55install:
56  - if [[ ${TRAVIS_OS_NAME} == "osx" ]]; then brew install python; fi
57  - python3 --version ; python3 -m pip --version
58  - python3 -m pip install cpplint pylint flake8
59  - |
60    # Set up QEMU to run s390x Docker container
61    if [[ ${TASK} == "s390x_test" ]]; then
62      docker run --rm --privileged multiarch/qemu-user-static:register --reset
63    fi
64
65before_script:
66  # stop the build if there are Python syntax errors or undefined names
67  - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
68  # exit-zero treats all errors as warnings.  The GitHub editor is 127 chars wide
69  - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
70
71script: ${TRAVIS}/travis_script.sh
72
73before_cache:
74  - ${TRAVIS}/travis_before_cache.sh
75
76cache:
77  directories:
78    - ${HOME}/.cache/usr
79
80notifications:
81# Emails are sent to the committer's git-configured email address by default,
82  email:
83    on_success: change
84    on_failure: always
85  slack: dmlc:mKX5kxjqTP6fBb89lXD3G5f3
86