forked from tf-coreml/tf-coreml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
59 lines (49 loc) · 1.85 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
dist: trusty
cache:
directories:
- $HOME/.ccache
language: python
matrix:
include:
- python: 2.7
- python: 3.6
- python: 3.7
dist: xenial
sudo: true
env:
global:
- CI=false
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- python-setuptools
script:
- free -m
# Set cache size to 2G (defaults to 512M)
- ccache -M 2G
- ccache -s
# On certain Travis builds the machines contain the correct `python` and `pip`
# versions. Running `which python` and `which pip` points to the right path
# to both the `python` and `pip` programs. Running `which virtualenv` uncovers
# that some machines on travis have `virtualenv` installed in their current
# environment while others do not. To correct this running `pip install virtualenv`
# will ensure that the `virtualenv` the `python` and the `pip` versions all match.
- pip install virtualenv
# We sometimes get `error: No space left on device`
# The workaround seems to be to force blocking I/O
# See https://github.com/travis-ci/travis-ci/issues/8902 and
# https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-348435959
# Check whether O_NONBLOCK is set (probably should print "1"):
- python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); print(flags&os.O_NONBLOCK);'
# Turn off O_NONBLOCK:
- python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);'
# Check whether O_NONBLOCK is set (should print "0"):
- python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); print(flags&os.O_NONBLOCK);'
# Make wheel using default python
- bash -e scripts/make_wheel.sh
#- bash -e scripts/test_wheel.sh --wheel-path=dist/*.whl
# See the changes in ccache
- ccache -s