Add travis.yml for building binaries.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2015-10-06 16:32:59 -04:00
parent c8cd618df9
commit ad96e10938
6 changed files with 50 additions and 2 deletions

19
.travis.yml Normal file
View File

@ -0,0 +1,19 @@
sudo: required
language: python
services:
- docker
matrix:
include:
- os: linux
- os: osx
language: generic
install: ./script/travis/install
script:
- ./script/travis/ci
- ./script/travis/build-binary

View File

@ -3,7 +3,6 @@ set -ex
PATH="/usr/local/bin:$PATH"
./script/clean
rm -rf venv
virtualenv -p /usr/local/bin/python venv

View File

@ -24,7 +24,7 @@ if !(which brew); then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
brew update
brew update > /dev/null
if !(python_version | grep "$desired_python_version"); then
if brew list | grep python; then

11
script/travis/build-binary Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
set -e
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
script/build-linux
# TODO: add script/build-image
else
script/prepare-osx
script/build-osx
fi

10
script/travis/ci Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
set -e
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
tox -e py27,py34 -- tests/unit
else
# TODO: we could also install py34 and test against it
python -m tox -e py27 -- tests/unit
fi

9
script/travis/install Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
set -ex
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
pip install tox==2.1.1
else
pip install --user tox==2.1.1
fi