From ef7b4f56aff3251fd5ae69f5406c17816f5fd558 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Wed, 27 Jan 2016 10:57:07 +0100 Subject: [PATCH] update CI integration --- .appveyor.yml | 11 +++++++---- .travis.yml | 22 ++++++++++++++++++---- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 914e75eb5..55aed6aab 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,16 +1,19 @@ version: '{build}' shallow_clone: true +build: off # Not a C# project environment: matrix: - PYTHON: "C:\\Python27" - PATH: "C:\\Python27;C:\\Python27\\Scripts;%PATH%" + PATH: "%APPDATA%\\Python\\Scripts;C:\\Python27;C:\\Python27\\Scripts;%PATH%" PYINSTALLER_VERSION: "git+https://github.com/pyinstaller/pyinstaller.git" install: - - "pip install --src .. -r requirements.txt" + - "pip install --user -U pip setuptools" + - "pip install --user --src .. -r requirements.txt" - "python -c \"from OpenSSL import SSL; print(SSL.SSLeay_version(SSL.SSLEAY_VERSION))\"" -build: off # Not a C# project test_script: - - "py.test -n 4" + - "py.test -s --cov libmproxy" +cache: + - C:\Users\appveyor\AppData\Local\pip\cache after_test: - | git clone https://github.com/mitmproxy/release.git ..\release diff --git a/.travis.yml b/.travis.yml index 2233f67b1..9091887a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,6 +45,19 @@ install: brew outdated openssl || brew upgrade openssl brew install python fi + - | + if [ "$TRAVIS_PYTHON_VERSION" = "pypy" ]; then + export PYENV_ROOT="$HOME/.pyenv" + if [ -f "$PYENV_ROOT/bin/pyenv" ]; then + pushd "$PYENV_ROOT" && git pull && popd + else + rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT" + fi + export PYPY_VERSION="4.0.1" + "$PYENV_ROOT/bin/pyenv" install --skip-existing "pypy-$PYPY_VERSION" + virtualenv --python="$PYENV_ROOT/versions/pypy-$PYPY_VERSION/bin/python" "$HOME/virtualenvs/pypy-$PYPY_VERSION" + source "$HOME/virtualenvs/pypy-$PYPY_VERSION/bin/activate" + fi - "pip install -U pip setuptools" - "pip install --src .. -r requirements.txt" @@ -90,7 +103,8 @@ before_cache: cache: directories: - $HOME/.cache/pip - - /home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages - - /home/travis/virtualenv/python2.7.9/bin - - /home/travis/virtualenv/pypy-2.5.0/site-packages - - /home/travis/virtualenv/pypy-2.5.0/bin + - $HOME/virtualenv/python2.7.9/lib/python2.7/site-packages + - $HOME/virtualenv/python2.7.9/bin + - $HOME/.pyenv + - $HOME/virtualenv/pypy-2.5.0/site-packages + - $HOME/virtualenv/pypy-2.5.0/bin