Skip to content

Commit

Permalink
Enabled Travis and Appveyor for manual-ci-run
Browse files Browse the repository at this point in the history
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 <maiera@de.ibm.com>
  • Loading branch information
andy-maier committed Oct 12, 2017
1 parent 7188075 commit 358b3a7
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 24 deletions.
58 changes: 40 additions & 18 deletions .travis.yml
Expand Up @@ -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"
Expand All @@ -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:
Expand All @@ -62,25 +77,33 @@ 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:
# env:
# - 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;
Expand Down Expand Up @@ -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
Expand Down
22 changes: 16 additions & 6 deletions appveyor.yml
Expand Up @@ -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
Expand All @@ -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%

Expand Down

0 comments on commit 358b3a7

Please sign in to comment.