diff --git a/.travis.yml b/.travis.yml index eb7d56054..3375fc846 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,20 +13,43 @@ notifications: # and an empty 'python' variable in order to prevent that Travis attempts # to install Python. # TODO: Figure out how specific versions of Python 3.x can be used with OS-X + +# When defining the job matrix explicitly, there are Travis environments +# that produce an additional default job. See these Travis issues: +# https://github.com/travis-ci/travis-ci/issues/1228 +# https://github.com/travis-ci/travis-ci/issues/4681 +# https://github.com/travis-ci/travis-ci/issues/9843 +# The public Travis does not seem to have this issue anymore, +# but Travis@IBM does have this issue (as of 9/2018). The workaround for +# this issue is to define variables globally and to exclude this same +# variable value in the matrix definition. Experiments have shown that +# not all variable combinations work. Using a combination of 'language' +# and 'os' set to the default values works. + +# See note about explicit job matrix, above. +language: ruby +os: linux + matrix: + + # See note about explicit job matrix, above. + exclude: + - language: ruby + - os: linux + include: -# - os: linux -# language: python -# python: "2.7" -# env: -# - PACKAGE_LEVEL=minimum -# cache: pip - os: linux language: python python: "2.7" env: - PACKAGE_LEVEL=latest cache: pip +# - os: linux +# language: python +# python: "2.7" +# env: +# - PACKAGE_LEVEL=minimum +# cache: pip - os: linux language: python python: "3.4" @@ -75,13 +98,13 @@ matrix: # env: # - PACKAGE_LEVEL=latest # cache: pip - - os: osx - language: generic - python: - env: - - PACKAGE_LEVEL=minimum - - PYTHON=2 - cache: pip +# - os: osx +# language: generic +# python: +# env: +# - PACKAGE_LEVEL=minimum +# - PYTHON=2 +# cache: pip # - os: osx # language: generic # python: @@ -96,15 +119,16 @@ matrix: # - PACKAGE_LEVEL=minimum # - PYTHON=3 # cache: pip - - os: osx - language: generic - python: - env: - - PACKAGE_LEVEL=latest - - PYTHON=3 - cache: pip +# - os: osx +# language: generic +# python: +# env: +# - PACKAGE_LEVEL=latest +# - PYTHON=3 +# cache: pip before_install: + - env | sort - if [[ "$TRAVIS_BRANCH" == "manual-ci-run" ]]; then export _NEED_REBASE=true; fi @@ -115,6 +139,14 @@ before_install: # commands to install dependencies install: + + # The following statement is a safety net in case the matrix exclusion + # does not work for some reason. + - if [[ "$TRAVIS_LANGUAGE" == "ruby" ]]; then + echo "Exiting from unwanted default Ruby job"; + exit; + fi + - if [[ "$TRAVIS_BRANCH" == "manual-ci-run" || "$TRAVIS_PULL_REQUEST_BRANCH" == "manual-ci-run" ]]; then export _MANUAL_CI_RUN=true; fi