forked from mlflow/mlflow
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
176 lines (169 loc) · 7.92 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
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
- language: python
python: 2.7
install:
# CHANGED_FILES detects whether or not files related to the nightly build are changed.
# True is so that the command returns a 0 exit code whether or not CHANGED_FILES is empty.
- CHANGED_FILES=$(git diff --name-only master..HEAD | grep "tests/examples\|examples\|Dockerfile") || true;
- if [[ "$TRAVIS_EVENT_TYPE" == "cron" || ! -z "$CHANGED_FILES" ]]; then
INSTALL_LARGE_PYTHON_DEPS=true source ./travis/install-common-deps.sh;
fi;
script:
- ./travis/stage-python2-nightly.sh
- stage: small
if: type != cron
- language: python
name: "Lint (Python 3.6)"
if: type != cron
python: 3.6
install:
- INSTALL_SMALL_PYTHON_DEPS=true INSTALL_LARGE_PYTHON_DEPS=true source ./travis/install-common-deps.sh
- pip install -r ./travis/lint-requirements.txt
script:
- ./lint.sh
- 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: java
name: "Java"
if: type != cron
install:
- source ./travis/install-common-deps.sh
script:
- cd mlflow/java
- mvn clean package -q
- language: node_js
node_js:
- "node" # Use latest NodeJS: https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#specifying-nodejs-versions
install:
name: "Node.js"
if: type != cron
script:
- cd mlflow/server/js
- npm i
- npm run lint
- npm test -- --coverage
- stage: large
if: type != cron
- language: python
python: 2.7
if: type != cron
install:
- INSTALL_LARGE_PYTHON_DEPS=true source ./travis/install-common-deps.sh
script:
- ./travis/run-large-python-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=tests/h2o --ignore=tests/keras --ignore=tests/pytorch --ignore=tests/pyfunc --ignore=tests/sagemaker --ignore=tests/sklearn --ignore=tests/spark --ignore=tests/tensorflow --ignore=tests/keras_autolog --ignore=tests/tensorflow_autolog --ignore tests/azureml --ignore tests/onnx --ignore tests/projects --ignore=tests/xgboost --ignore=tests/lightgbm --ignore=tests/spark_autologging tests
# Run small Python 2.7 tests in the "large" test builder so that we don't spend Travis executor
# time running Python 2.7 tests if Python 3 small tests fail.
- language: python
name: "Python 2.7 Small Tests"
if: type != cron
python: 2.7
install:
- INSTALL_SMALL_PYTHON_DEPS=true source ./travis/install-common-deps.sh
script:
- ./travis/run-small-python-tests.sh
- language: python
python: 3.6
name: "Docs (rsthtml)"
if: type != cron
install:
- 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
# 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" == "Small" ]]; then
INSTALL_SMALL_PYTHON_DEPS=true source ./travis/install-common-deps.sh &&
wget https://github.com/google/protobuf/releases/download/v3.6.0/protoc-3.6.0-linux-x86_64.zip -O /travis-install/protoc.zip &&
sudo unzip /travis-install/protoc.zip -d /usr;
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