forked from tensorflow/io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
120 lines (113 loc) · 5.42 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
dist: xenial
language: minimal
git:
quiet: true
services:
- docker
install:
- curl https://bootstrap.pypa.io/get-pip.py | sudo -H python
- |
# Ignite probably takes more resource so start it first,
# otherwise it may run into issues competing with other services.
bash -x -e tests/test_ignite/start_ignite.sh
bash -x -e tests/test_kafka/kafka_test.sh start kafka
bash -x -e tests/test_kinesis/kinesis_test.sh start kinesis
bash -x -e tests/test_pubsub/pubsub_test.sh start pubsub
- sudo -H python -m pip install -q -U twine --ignore-installed six
- twine --version
- export TENSORFLOW_INSTALL="$(python setup.py --package-version)"
stages:
- lint
- build
- release
jobs:
include:
- stage: lint
name: "Lint"
script:
- bash -x -e .travis/lint.bazel.sh
- docker run -i -t --rm -v $PWD:/v -v $PWD/.cache/pip/:/root/.cache/pip -w /v --net=host buildpack-deps:14.04 bash -x -e .travis/lint.python.sh
# Install Builds make sure the release of the repo could be
# install and run on commodity user environment (Ubuntu 16.04/18.04).
# Note the release of the repo build on Ubuntu 14.04.
- stage: build
name: "Install Build on Ubuntu 16.04"
script:
- docker run -i -t --rm -v $PWD:/v -v $PWD/.cache/pip/:/root/.cache/pip -w /v --net=host buildpack-deps:14.04 bash -x -e .travis/python.release.sh "${TENSORFLOW_INSTALL}" python python3.5
- docker run -i -t --rm -v $PWD:/v -v $PWD/.cache/pip/:/root/.cache/pip -w /v --net=host -e GITHUB_PAT=9eecea9200150af1ec29f70bb067575eb2e56fc7 buildpack-deps:16.04 bash -x -e .travis/wheel.test.sh
- stage: build
name: "Install Build on Ubuntu 18.04"
script:
- docker run -i -t --rm -v $PWD:/v -v $PWD/.cache/pip/:/root/.cache/pip -w /v --net=host buildpack-deps:14.04 bash -x -e .travis/python.release.sh "${TENSORFLOW_INSTALL}" python python3.6
- docker run -i -t --rm -v $PWD:/v -v $PWD/.cache/pip/:/root/.cache/pip -w /v --net=host -e GITHUB_PAT=9eecea9200150af1ec29f70bb067575eb2e56fc7 buildpack-deps:18.04 bash -x -e .travis/wheel.test.sh
# Preview Release Builds are for TensorFlow 2.0 Preview release.
# Note only Linux (Ubuntu 18.04) and macOS are supported.
- stage: release
name: "TensorFlow 2.0 Preview Release Build on Linux"
script:
- docker run -i -t --rm -v $PWD:/v -v $PWD/.cache/pip/:/root/.cache/pip -w /v --net=host buildpack-deps:14.04 bash -x -e .travis/python.release.sh tensorflow==2.0.0alpha --preview ${TRAVIS_BUILD_NUMBER} python python3.6
- docker run -i -t --rm -v $PWD:/v -v $PWD/.cache/pip/:/root/.cache/pip -w /v --net=host buildpack-deps:18.04 bash -x -e .travis/wheel.test.sh
after_success:
- |
if [[ ( ${TRAVIS_BRANCH} == "master" ) && ( ${TRAVIS_EVENT_TYPE} != "pull_request" ) ]]; then
twine upload wheelhouse/*.whl
fi
- stage: release
name: "TensorFlow 2.0 Preview Release Build on Linux with Python 3.7"
script:
- docker run -i -t --rm -v $PWD:/v -v $PWD/.cache/pip/:/root/.cache/pip -w /v --net=host ubuntu:16.04 bash -x -e .travis/python3.7+.release.sh python3.7 tensorflow==2.0.0alpha --preview ${TRAVIS_BUILD_NUMBER}
- echo "Skip test for now, will fix later"
after_success:
- |
if [[ ( ${TRAVIS_BRANCH} == "master" ) && ( ${TRAVIS_EVENT_TYPE} != "pull_request" ) ]]; then
twine upload wheelhouse/*.whl
fi
- stage: release
name: "TensorFlow 2.0 Preview Release Build on macOS"
os: osx
osx_image: xcode9
script:
- sudo -H bash -x -e .travis/python.release.sh tensorflow==2.0.0alpha --preview ${TRAVIS_BUILD_NUMBER} python
- sudo -H bash -x -e .travis/wheel.test.sh
after_success:
- |
if [[ ( ${TRAVIS_BRANCH} == "master" ) && ( ${TRAVIS_EVENT_TYPE} != "pull_request" ) ]]; then
twine upload wheelhouse/*.whl
fi
# Release Builds are for nightly release.
# Note Python 2.7, 3.4, 3.5, 3.6 are supported on Linux
# for Ubuntu 14.04/16.04/18.04, and Python 2.7 for macOS.
- stage: release
name: "Nightly Release Build on Linux"
script:
- docker run -i -t --rm -v $PWD:/v -v $PWD/.cache/pip/:/root/.cache/pip -w /v --net=host buildpack-deps:14.04 bash -x -e .travis/python.release.sh "${TENSORFLOW_INSTALL}" --nightly ${TRAVIS_BUILD_NUMBER} python python3 python3.5 python3.6
- echo "Skip test for nightly build, as it has been covered in install build"
after_success:
- |
if [[ ( ${TRAVIS_BRANCH} == "master" ) && ( ${TRAVIS_EVENT_TYPE} != "pull_request" ) ]]; then
twine upload wheelhouse/*.whl
fi
- stage: release
name: "Nightly Release Build on Linux with Python 3.7"
script:
- docker run -i -t --rm -v $PWD:/v -v $PWD/.cache/pip/:/root/.cache/pip -w /v --net=host ubuntu:16.04 bash -x -e .travis/python3.7+.release.sh python3.7 "${TENSORFLOW_INSTALL}" --nightly ${TRAVIS_BUILD_NUMBER}
- echo "Skip test for now, will fix later"
after_success:
- |
if [[ ( ${TRAVIS_BRANCH} == "master" ) && ( ${TRAVIS_EVENT_TYPE} != "pull_request" ) ]]; then
twine upload wheelhouse/*.whl
fi
- stage: release
name: "Nightly Release Build on macOS"
os: osx
osx_image: xcode9
script:
- sudo -H bash -x -e .travis/python.release.sh "${TENSORFLOW_INSTALL}" --nightly ${TRAVIS_BUILD_NUMBER} python
- sudo -H bash -x -e .travis/wheel.test.sh
after_success:
- |
if [[ ( ${TRAVIS_BRANCH} == "master" ) && ( ${TRAVIS_EVENT_TYPE} != "pull_request" ) ]]; then
twine upload wheelhouse/*.whl
fi
notifications:
- email: false