From d395a11208f628270959e5a4fb861d5eec6ab0d6 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Wed, 28 Mar 2018 19:26:26 -0700 Subject: [PATCH] travis: clean up the config file, use "language: python" on linux The OS-X builders don't offer a python environment, so we have to build things ourselves (installing tox/etc with --user, instead of into the virtualenv that "language: python" gives us). --- .travis.yml | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4f7aa6c24..7a411cb9d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,27 @@ -dist: trusty -sudo: required +sudo: false +language: python cache: pip +dist: trusty before_cache: - rm -f $HOME/.cache/pip/log/debug.log -before_install: - - sh -c set - - git config --global user.email "travis-tahoe@tahoe-lafs.org" - - git config --global user.name "Travis Tahoe" - - git fetch --depth=1000 +git: + depth: 1000 install: # ~/.local/bin is on $PATH by default, but on OS-X, --user puts it elsewhere - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export PATH=$HOME/Library/Python/2.7/bin:$PATH; fi - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then wget https://bootstrap.pypa.io/get-pip.py && sudo python ./get-pip.py; fi - pip list - - pip install --user --upgrade codecov tox setuptools + - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then pip install --user --upgrade codecov tox setuptools; fi + - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then pip install --upgrade codecov tox setuptools; fi - echo $PATH; which python; which pip; which tox - python misc/build_helpers/show-tool-versions.py script: - - tox -e codechecks - - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then tox; else tox -e coverage; fi - - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then /bin/bash integration/install-tor.sh && tox -e integration; fi + - if [ "${MODE}" = "codechecks" ]; then tox -e codechecks; fi + - if [ "${MODE}" = "tests" ]; then tox; fi + - if [ "${MODE}" = "coverage" ]; then tox -e coverage; fi + - if [ "${MODE}" = "integration" ]; then /bin/bash integration/install-tor.sh && tox -e integration; fi after_success: - - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then codecov; fi + - if [ "${MODE}" = "coverage" ]; then codecov; fi notifications: email: false irc: @@ -34,9 +34,14 @@ notifications: matrix: include: - os: linux - env: LANG=en_US.UTF-8 + env: MODE=coverage LANG=en_US.UTF-8 - os: linux - env: LANG=C + env: MODE=integration LANG=en_US.UTF-8 + - os: linux + env: MODE=codechecks LANG=en_US.UTF-8 + - os: linux + env: MODE=tests LANG=C - os: osx - env: LANG=en_US.UTF-8 + env: MODE=tests LANG=en_US.UTF-8 + language: generic # "python" is not available on OS-X fast_finish: true