forked from mlflow/mlflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
147 lines (139 loc) · 6.15 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
language: python
dist: trusty
services:
- docker
matrix:
include:
# Nightly builds run the tests/examples end-to-end test suite.
# Does not include Windows since Projects/Models are mostly not compatible with Windows as of now.
- stage: Nightly
if: type == cron
- stage: Large
if: type != cron
- language: r
name: "R"
if: type != cron
cache: packages
before_install:
# cache packages dramatically decreases build time, but it must not include mlflow
- rm -rf /home/travis/R/Library/mlflow
- export NOT_CRAN=true
- cd mlflow/R/mlflow
- Rscript -e 'install.packages("devtools")'
- Rscript -e 'devtools::install_deps(dependencies = TRUE, upgrade = FALSE)'
- cd ../../..
install:
- source ./travis/install-common-deps.sh
script:
- cd mlflow/R/mlflow
# Building the package here populates the /home/travis/R/Library cache,
# and is also used when python forks into R (e.g., rfunc via models CLI).
- R CMD build .
- export LINTR_COMMENT_BOT=false
- cd tests
- Rscript ../.travis.R
after_success:
- export COVR_RUNNING=true
- Rscript -e 'covr::codecov()'
after_failure:
- "[ -r /home/travis/build/mlflow/mlflow/mlflow/R/mlflow/mlflow.Rcheck/00check.log ] && cat /home/travis/build/mlflow/mlflow/mlflow/R/mlflow/mlflow.Rcheck/00check.log"
- language: python
python: 3.6
name: "Flavors"
if: type != cron
install:
- INSTALL_LARGE_PYTHON_DEPS=true source ./travis/install-common-deps.sh
script:
- ./travis/run-python-flavor-tests.sh;
- language: python
python: 3.6
name: "TensorFlow"
if: type != cron
install:
- INSTALL_LARGE_PYTHON_DEPS=true source ./travis/install-common-deps.sh
script:
- ./travis/run-python-tf-tests.sh;
- language: python
python: 3.6
name: "SageMaker"
if: type != cron
install:
- INSTALL_LARGE_PYTHON_DEPS=true source ./travis/install-common-deps.sh
script:
- ./travis/run-python-sagemaker-tests.sh;
# Run Windows tests in the "large" test builder so that we don't spend Travis executor
# time running Windows tests if Python 3 small tests fail.
- os: windows
name: "Windows"
if: type != cron
language: sh
before_install:
- choco install python3 --version=3.7.4
install:
- export PATH="/c/Python37:/c/Python37/Scripts:$PATH"
- pip install -r dev-requirements.txt
- pip install -r travis/small-requirements.txt
- pip install -e .
script:
- pytest --verbose --ignore-flavors --ignore=tests/projects tests
- language: python
python: 3.6
name: "Docs (rsthtml, javadocs)"
if: type != cron
install:
# Install Java & Maven
- sudo apt-get update
- sudo apt-get install default-jdk -y
- sudo apt-get install maven -y
- java -version
# Install Python doc deps
- INSTALL_SMALL_PYTHON_DEPS=true INSTALL_LARGE_PYTHON_DEPS=true source ./travis/install-common-deps.sh
- pip install sphinx==2.2.1 sphinx-click==2.3.0
script:
- cd docs
- make rsthtml SPHINXOPTS="-W --keep-going" # Interpret Sphinx warnings as errors via the `-W` flag
- make javadocs
# Travis runs an extra top-level job for each build stage - depending on the build stage, we either
# run small or large Python tests below.
install:
- echo "Build stage $TRAVIS_BUILD_STAGE_NAME";
- CHANGED_FILES=$(git diff --name-only master..HEAD | grep "tests/examples\|examples") || true;
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
echo "skipping this step on windows.";
elif [[ "$TRAVIS_BUILD_STAGE_NAME" == "Nightly" ]] && ! [[ "$TRAVIS_EVENT_TYPE" == "cron" || ! -z "$CHANGED_FILES" ]]; then
echo "skipping the nightly stage because this build is not nightly and there are no changed files associated with nightly tests.";
else
INSTALL_LARGE_PYTHON_DEPS=true source ./travis/install-common-deps.sh;
fi;
script:
- ./travis/stage-python3.sh;
notifications:
# Send Slack notifications on build being broken or fixed, and email (Pagerduty) notifications
# on build being broken. See
# https://docs.travis-ci.com/user/notifications/#changing-notification-frequency for more info.
email:
recipients:
- secure: "UFN6LLWRASxILSKY/hD5ugxP78Bhuq58X4H0ar6BnNl6SS70bhJFbJFuvkWBoLHAhydV876h2nBZLfTUCvf3\
RyOz4nvkGfRaFH3ZUnseSZSSXydFOixYjk+byDy7sjzjTKuqtQu2WKqZxT8cdtP2lWc7y/LPlLBR4cYKjQZZZWIGKef/Q\
JuHp50HwLq3LKqAsg9EpukBqkfxncDItvr2Fis9krRgc288BZkwQh+G5S9WNFY1Bu7G60bzfbOJJYTV3TQPnPpaMh+IsG\
0G+xC/gZV7bEPDHEIUFRDnnXK9msvhu55plkOnAbHWnAYiZruVWpmIj76wayjEafOiTKp8G6lVtfDZdQ+cX4c8pN4Lq37\
wolvZ+ZuxMt51D03iUQ5aWi0TXyV6ZMnB7r3k0yWlLr7faHt1b1bvtAPVasKKUHHjvoc0ehz+K2oaJ/my275L+gytZs6b\
nLUZQ0Qclcsv/Z5szquf5HwV76WKIy+nMceGYtmMwHMbQv0Z+CEGYqdeD/PwMT7HQc/NwsOQ2CL/WNRqI/7E7EZHY+8Xp\
anyvXFez3SsalJ8xJM7kmH2zAAHKciZQMin9ND7kWaqYOdhpPxhWcqUtyAI7N4YMKrnUap2H9OOLeKDyzhR/m9D9w5DoQ\
MotE8n5J3OtQQ8Yl304J/uR2QX4YwulMQKr/BmrQs="
on_success: "never"
on_failure: "always"
# TODO(sid): Reenable Slack notifications on build failures once we've de-noised them
# slack:
# rooms:
# - secure: "bs4DSU5ZAkZ30StvWzzQHo+X97YIjPMKy2z2kNpbic1ScujfdkZvnYB/d/0FMWrQUTs7sY/TS918f0HvUU\
# gMX9bdobPoBOcBLe34pCtidrCbMzm1T3h1aRjeLKXH0IbeiuZjd0MTp0RSvTFyDknAculoZRbtFoAqwOEgkQ9jm9Feu\
# 3cNck6TreSIxA+gf5BCetJhOJvUcCGKAUIfXxOKOp/22E+G5HoJSj9+RIEijOzNAQ9Vd7kehA/s454KSsW5WrbGeX/b\
# UadLr/y4MkTBH59B7E+ZUHnOUZIuptZb2pR808AvdJW3Fwc6s0sa8hmjjBZH3TgnTHBUwZ9VG+x1Q7gQFG6Ug7WQ+5N\
# FwIGqgYshaTomFSh9W7ITOPESlYGfW13xCO/bRGNj8DCB09aIiNgF4mPfJIF2H0yuiT4mJ9fIQQi17YuoC1Zb2gsA50\
# D5zZfYQosnPmgjVDYs4Jr12pAQIrk/XnC8RFA1NlmDtoDe7qguY+wdxKaC0D3yleT2DLWaxB5iSNZlbamGEFfbcB4xb\
# HHVb7QR2L/t3+ITsUcQ3bf1SOGnIrzVCYFFe+KzshQSaEP9fcRA9cSCbKkdQIgmsN7XOq+rlaR+S3bj2XN0g1fvGy89\
# 7rzw6+BBe11y9g8p2yiZGKxzWDUDHseAzZllUeUfEAsr1aeG7R4y1do="
# on_success: "change"
# on_failure: "always"
# on_pull_requests: false