From 8a374df8b12351f6f68e04a52c6ec6d35089df60 Mon Sep 17 00:00:00 2001 From: David Stainton Date: Mon, 23 May 2016 14:09:50 +0000 Subject: [PATCH 1/4] Make travis test on osx and linux both --- .travis.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index cfa7c8ed0..b235ab9a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ -sudo: false -language: python +sudo: true +os: + - "linux" + - "osx" cache: pip before_cache: - rm -f $HOME/.cache/pip/log/debug.log @@ -13,7 +15,15 @@ before_install: - git fetch --depth=1000 - python misc/build_helpers/show-tool-versions.py install: - - pip install coveralls tox + - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then echo installing on osx...; fi + - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew update; fi + - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew install python; fi + - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export PATH=/usr/local/bin:$PATH; fi + - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then sudo pip install coverage coveralls tox; fi + - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then pip install coverage coveralls tox; fi +before_script: + - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then sudo pip install -e .; fi + - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then pip install -e .; fi script: - tox -e coverage after_success: From 73c4aa727fe3a79ba97cccd265d0ecb8bd831d8d Mon Sep 17 00:00:00 2001 From: David Stainton Date: Mon, 23 May 2016 14:31:44 +0000 Subject: [PATCH 2/4] wtf sudo tox for linux --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b235ab9a6..7352590e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,8 @@ before_script: - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then sudo pip install -e .; fi - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then pip install -e .; fi script: - - tox -e coverage + - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then sudo tox -e coverage; fi + - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then tox -e coverage; fi after_success: coveralls notifications: From 7e10b5d0e5e1f3d67d8a51a2982305ffa0ed282c Mon Sep 17 00:00:00 2001 From: David Stainton Date: Mon, 20 Jun 2016 15:01:19 +0000 Subject: [PATCH 3/4] Corrections to .travis.yml from Brian's review --- .travis.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7352590e4..5648d06bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,14 +16,10 @@ before_install: - python misc/build_helpers/show-tool-versions.py install: - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then echo installing on osx...; fi - - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew update; fi - - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew install python; fi + - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew update && brew install python; fi - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export PATH=/usr/local/bin:$PATH; fi - - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then sudo pip install coverage coveralls tox; fi - - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then pip install coverage coveralls tox; fi -before_script: - - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then sudo pip install -e .; fi - - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then pip install -e .; fi + - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then sudo pip install coveralls tox; fi + - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then pip install coveralls tox; fi script: - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then sudo tox -e coverage; fi - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then tox -e coverage; fi From 5bf7fab99d5bd23f57feca48cdf2628fbb48ce79 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 21 Jun 2016 13:21:05 -0700 Subject: [PATCH 4/4] travis: big cleanup, make it work on OS-X Travis defaults to giving us an OS-X 10.9 box, which has an OpenSSL that is too old for the current cryptography-1.4 (note that a previous version of this branch worked, but only because the previous cryptography-1.3.x didn't enforce the OpenSSL version). On OS-X, this new .travis.yml does the following: * set "osx_image: xcode7" to get us 10.10, with newer OpenSSL * uses system python, not homebrew * installs pip with get-pip.py, since system python doesn't have it * adds the --user directory to $PATH, since OS-X python doesn't have it by default On both linux and OS-X, this: * installs tox and coveralls with --user, not to the system * doesn't use sudo to run tox * prints some extra debug info in case it's useful later Closes #285 --- .travis.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5648d06bb..567825cb2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,10 @@ sudo: true os: - "linux" - "osx" +# xcode7 gives us OS-X 10.10, which gives us newer OpenSSL (the default gives +# us 10.9, which appears to have OpenSSL-0.9.8, which is rejected by +# cryptography-1.4) +osx_image: xcode7 cache: pip before_cache: - rm -f $HOME/.cache/pip/log/debug.log @@ -13,16 +17,16 @@ before_install: - git config --global user.email "travis-tahoe@tahoe-lafs.org" - git config --global user.name "Travis Tahoe" - git fetch --depth=1000 - - python misc/build_helpers/show-tool-versions.py install: - - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then echo installing on osx...; fi - - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew update && brew install python; fi - - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export PATH=/usr/local/bin:$PATH; fi - - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then sudo pip install coveralls tox; fi - - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then pip install coveralls tox; fi +# ~/.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 coveralls tox + - echo $PATH; which python; which pip; which tox + - python misc/build_helpers/show-tool-versions.py script: - - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then sudo tox -e coverage; fi - - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then tox -e coverage; fi + - tox -e coverage after_success: coveralls notifications: