-
Notifications
You must be signed in to change notification settings - Fork 74
/
.travis.yml
50 lines (44 loc) · 3.43 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
sudo: required
language: python
matrix:
include:
# - os: osx
# osx_image: xcode8.3
# language: generic
# go: 1.13
# - os: osx
# env: GNMI=true
# osx_image: xcode8.3
# language: generic
# go: 1.13
# - env: DOCKER=true OS_TYPE=centos OS_VERSION=centos7 PYTHON_VERSION=3.6
# - env: DOCKER=true OS_TYPE=centos OS_VERSION=centos7 PYTHON_VERSION=3.6 GNMI=true
# - env: DOCKER=true OS_TYPE=centos OS_VERSION=centos8 PYTHON_VERSION=3.6
# - env: DOCKER=true OS_TYPE=centos OS_VERSION=centos8 PYTHON_VERSION=3.6 GNMI=true
# - env: DOCKER=true OS_TYPE=ubuntu OS_VERSION=xenial PYTHON_VERSION=3.5
# - env: DOCKER=true OS_TYPE=ubuntu OS_VERSION=xenial PYTHON_VERSION=3.5 GNMI=true
# - env: DOCKER=true OS_TYPE=ubuntu OS_VERSION=bionic PYTHON_VERSION=2.7
# - env: DOCKER=true OS_TYPE=ubuntu OS_VERSION=bionic PYTHON_VERSION=2.7 GNMI=true
- env: DOCKER=true OS_TYPE=ubuntu OS_VERSION=bionic PYTHON_VERSION=3
# - env: DOCKER=true OS_TYPE=ubuntu OS_VERSION=bionic PYTHON_VERSION=3 GNMI=true
# - env: DOCKER=true OS_TYPE=ubuntu OS_VERSION=focal PYTHON_VERSION=3
# - env: DOCKER=true OS_TYPE=ubuntu OS_VERSION=focal PYTHON_VERSION=3 GNMI=true
allow_failures:
- os: osx
services:
- docker
before_install:
# - if [[ "$DOCKER" != "true" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$DOCKER" != "true" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install curl doxygen xml2 ; fi
- if [[ "$DOCKER" != "true" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./test/dependencies_osx.sh ; fi
- if [[ "$DOCKER" != "true" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$GNMI" == "true" ]]; then ./test/dependencies_osx_gnmi.sh ; fi
- if [[ "$DOCKER" == "true" ]]; then docker pull ${OS_TYPE}:${OS_VERSION} ; fi
script:
- if [[ "$DOCKER" != "true" ]] && [[ "$GNMI" != "true" ]]; then ./test/tests.sh ; fi
- if [[ "$DOCKER" != "true" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$GNMI" == "true" ]]; then ./test/gnmi_tests.sh ; fi
- if [[ "$DOCKER" == "true" ]] && [[ "$OS_TYPE" == "centos" ]] && [[ "$GNMI" != "true" ]]; then docker run -v `pwd`:/ydk-gen ${OS_TYPE}:${OS_VERSION} bash -c "yum install git sudo -y && cd /ydk-gen && ./test/dependencies_centos.sh && ./test/tests.sh -p ${PYTHON_VERSION} && ./test/test_package_centos.sh -p ${PYTHON_VERSION}" ; fi
- if [[ "$DOCKER" == "true" ]] && [[ "$OS_TYPE" == "centos" ]] && [[ "$GNMI" == "true" ]]; then docker run -v `pwd`:/ydk-gen ${OS_TYPE}:${OS_VERSION} bash -c "yum install git sudo -y && cd /ydk-gen && ./test/dependencies_centos.sh && ./test/dependencies_linux_gnmi.sh && ./test/gnmi_tests.sh -p ${PYTHON_VERSION}"; fi
- if [[ "$DOCKER" == "true" ]] && [[ "$OS_TYPE" == "ubuntu" ]] && [[ "$GNMI" != "true" ]]; then docker run -v `pwd`:/ydk-gen ${OS_TYPE}:${OS_VERSION} bash -c "cd /ydk-gen && ./test/dependencies_ubuntu.sh && ./test/tests.sh -p ${PYTHON_VERSION} && ./test/test_package_ubuntu.sh -p ${PYTHON_VERSION}" ; fi
- if [[ "$DOCKER" == "true" ]] && [[ "$OS_TYPE" == "ubuntu" ]] && [[ "$GNMI" == "true" ]]; then docker run -v `pwd`:/ydk-gen ${OS_TYPE}:${OS_VERSION} bash -c "cd /ydk-gen && ./test/dependencies_ubuntu.sh && ./test/dependencies_linux_gnmi.sh && ./test/gnmi_tests.sh -p ${PYTHON_VERSION}"; fi
after_success:
- if [[ "$DOCKER" == "true" ]] && [[ "$OS_TYPE" == "ubuntu" ]]; then bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" ; fi # Upload python report to CodeCov