diff options
author | Thomas Waldmann <tw@waldmann-edv.de> | 2015-08-09 23:51:46 +0200 |
---|---|---|
committer | Thomas Waldmann <tw@waldmann-edv.de> | 2015-08-09 23:51:46 +0200 |
commit | 8af3aa33973fe583e376cffbb6e0ba4e6a881601 (patch) | |
tree | af6f3cfb938ee06777d9c83f9d76f355f256544c /.travis | |
parent | 4c0012bddfc91e45167f65293369814511695de9 (diff) | |
parent | 822379048f0a0fdec0bc8b541b1a113e2b9bba01 (diff) |
merged master
Diffstat (limited to '.travis')
-rwxr-xr-x | .travis/install.sh | 46 | ||||
-rwxr-xr-x | .travis/run.sh | 23 | ||||
-rwxr-xr-x | .travis/upload_coverage.sh | 13 |
3 files changed, 82 insertions, 0 deletions
diff --git a/.travis/install.sh b/.travis/install.sh new file mode 100755 index 000000000..e25ab1288 --- /dev/null +++ b/.travis/install.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +set -e +set -x + +if [[ "$(uname -s)" == 'Darwin' ]]; then + brew update || brew update + + if [[ "${OPENSSL}" != "0.9.8" ]]; then + brew outdated openssl || brew upgrade openssl + fi + + if which pyenv > /dev/null; then + eval "$(pyenv init -)" + fi + + brew outdated pyenv || brew upgrade pyenv + + case "${TOXENV}" in + py32) + pyenv install 3.2.6 + pyenv global 3.2.6 + ;; + py33) + pyenv install 3.3.6 + pyenv global 3.3.6 + ;; + py34) + pyenv install 3.4.3 + pyenv global 3.4.3 + ;; + esac + pyenv rehash + python -m pip install --user virtualenv +else + pip install virtualenv + sudo add-apt-repository -y ppa:gezakovacs/lz4 + sudo apt-get update + sudo apt-get install -y liblz4-dev + sudo apt-get install -y libacl1-dev +fi + +python -m virtualenv ~/.venv +source ~/.venv/bin/activate +pip install tox pytest pytest-cov codecov Cython +pip install -e . diff --git a/.travis/run.sh b/.travis/run.sh new file mode 100755 index 000000000..cf504ac51 --- /dev/null +++ b/.travis/run.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -e +set -x + +if [[ "$(uname -s)" == "Darwin" ]]; then + eval "$(pyenv init -)" + if [[ "${OPENSSL}" != "0.9.8" ]]; then + # set our flags to use homebrew openssl + export ARCHFLAGS="-arch x86_64" + export LDFLAGS="-L/usr/local/opt/openssl/lib" + export CFLAGS="-I/usr/local/opt/openssl/include" + fi +fi + +source ~/.venv/bin/activate + +if [[ "$(uname -s)" == "Darwin" ]]; then + # no fakeroot on OS X + sudo tox -e $TOXENV +else + fakeroot -u tox +fi diff --git a/.travis/upload_coverage.sh b/.travis/upload_coverage.sh new file mode 100755 index 000000000..4cb8273cf --- /dev/null +++ b/.travis/upload_coverage.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e +set -x + +NO_COVERAGE_TOXENVS=(pep8) +if ! [[ "${NO_COVERAGE_TOXENVS[*]}" =~ "${TOXENV}" ]]; then + source ~/.venv/bin/activate + ln .tox/.coverage .coverage + # on osx, tests run as root, need access to .coverage + sudo chmod 666 .coverage + codecov -e TRAVIS_OS_NAME TOXENV +fi |