From 358b3a7020941cb8dae1c83ba1876a776901228b Mon Sep 17 00:00:00 2001 From: Andreas Maier Date: Wed, 11 Oct 2017 14:37:24 +0200 Subject: [PATCH] Enabled Travis and Appveyor for manual-ci-run Details: - This change enables Travis and Appveyor to distinguish between quick runs and full runs. Runs from branch manual-ci-run are run as full runs (after locally rebasing to master), and all other branches are run as quick runs. Signed-off-by: Andreas Maier --- .travis.yml | 58 ++++++++++++++++++++++++++++++++++++---------------- appveyor.yml | 22 ++++++++++++++------ 2 files changed, 56 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index f110688a..6ee16b13 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,13 +30,26 @@ matrix: python: "3.4" env: - PACKAGE_LEVEL=minimum - - os: linux - language: python - python: "3.5" - env: - - PACKAGE_LEVEL=minimum - before_install: - - if [[ "$TRAVIS_EVENT_TYPE" != "cron" ]]; then exit 0; fi +# - os: linux +# language: python +# python: "3.4" +# env: +# - PACKAGE_LEVEL=latest +# - os: linux +# language: python +# python: "3.5" +# env: +# - PACKAGE_LEVEL=minimum +# - os: linux +# language: python +# python: "3.5" +# env: +# - PACKAGE_LEVEL=latest +# - os: linux +# language: python +# python: "3.6" +# env: +# - PACKAGE_LEVEL=minimum - os: linux language: python python: "3.6" @@ -47,9 +60,11 @@ matrix: # python: "pypy-5.3.1" # Python 2.7.10 # env: # - PACKAGE_LEVEL=minimum -# before_install: -# - if [[ "$TRAVIS_EVENT_TYPE" != "cron" ]]; then exit 0; fi -# TODO: Re-enable osx support once Travis has better OS-X capacity +# - os: linux +# language: python +# python: "pypy-5.3.1" # Python 2.7.10 +# env: +# - PACKAGE_LEVEL=latest # - os: osx # language: generic # python: @@ -62,16 +77,12 @@ matrix: # env: # - PACKAGE_LEVEL=latest # - PYTHON=2 -# before_install: -# - if [[ "$TRAVIS_EVENT_TYPE" != "cron" ]]; then exit 0; fi # - os: osx # language: generic # python: # env: # - PACKAGE_LEVEL=minimum # - PYTHON=3 -# before_install: -# - if [[ "$TRAVIS_EVENT_TYPE" != "cron" ]]; then exit 0; fi # - os: osx # language: generic # python: @@ -79,8 +90,20 @@ matrix: # - PACKAGE_LEVEL=latest # - PYTHON=3 +before_install: + - if [[ "$TRAVIS_BRANCH" == "manual-ci-run" ]]; then + export _NEED_REBASE=true; + fi + - if [[ -n $_NEED_REBASE ]]; then git fetch origin master; fi + - if [[ -n $_NEED_REBASE ]]; then git branch master FETCH_HEAD; fi + - if [[ -n $_NEED_REBASE ]]; then git rebase master; fi + - git branch -av + # commands to install dependencies install: + - if [[ "$TRAVIS_BRANCH" == "manual-ci-run" || "$TRAVIS_PULL_REQUEST_BRANCH" == "manual-ci-run" ]]; then + export _MANUAL_CI_RUN=true; + fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [[ "${PYTHON:0:1}" == "2" ]]; then export PYTHON_CMD=python; @@ -124,11 +147,10 @@ install: # commands to run builds & tests script: - make check + - if [[ -n $_MANUAL_CI_RUN ]]; then make pylint; fi - make test - - if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]]; then - make build; - make builddoc; - fi + - if [[ -n $_MANUAL_CI_RUN ]]; then make build; fi + - if [[ -n $_MANUAL_CI_RUN ]]; then make builddoc; fi after_success: - if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PYTHON_VERSION" == "2.7" && "$PACKAGE_LEVEL" == "latest" ]]; then diff --git a/appveyor.yml b/appveyor.yml index 92d8340b..c4b18dd6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,12 +6,12 @@ environment: - PYTHON_VERSION: 2.7 PYTHON_ARCH: 32 PYTHON_HOME: C:\Python27 - - PYTHON_VERSION: 2.7 - PYTHON_ARCH: 64 - PYTHON_HOME: C:\Python27-x64 - - PYTHON_VERSION: 3.4 - PYTHON_ARCH: 32 - PYTHON_HOME: C:\Python34 +# - PYTHON_VERSION: 2.7 +# PYTHON_ARCH: 64 +# PYTHON_HOME: C:\Python27-x64 +# - PYTHON_VERSION: 3.4 +# PYTHON_ARCH: 32 +# PYTHON_HOME: C:\Python34 # - PYTHON_VERSION: 3.4 # PYTHON_ARCH: 64 # PYTHON_HOME: C:\Python34-x64 @@ -35,6 +35,16 @@ configuration: install: + - if %APPVEYOR_REPO_BRANCH%.==manual-ci-run. set _NEED_REBASE=true + - if %_NEED_REBASE%.==true. git fetch origin master + - if %_NEED_REBASE%.==true. git branch master FETCH_HEAD + - if %_NEED_REBASE%.==true. git rebase master + - git branch -av + + # TODO: Use the _MANUAL_CI_RUN variable in tox.ini to run certain parts only when set + - if %APPVEYOR_REPO_BRANCH%.==manual-ci-run. set _MANUAL_CI_RUN=true + - if %APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH%.==manual-ci-run. set _MANUAL_CI_RUN=true + # Set PACKAGE_LEVEL for make - set PACKAGE_LEVEL=%configuration%