From 802f4987c36730d6b9496c7a96374bfee5b1695e Mon Sep 17 00:00:00 2001 From: Matthew Rothenberg Date: Wed, 15 Oct 2014 12:57:28 -0400 Subject: [PATCH] set up multi-os testing in travis Requires beta access, thankfully the travis gods have blessed us for the main repo and my fork! This should allow us to make sure scm_breeze operates reliably in both Linux and BSD/Darwin, because there are small shell differences (especially with default tools) that are causing errors I noticed on MacOSX. --- .travis.yml | 12 +++++++++--- test/support/travisci_deps.sh | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100755 test/support/travisci_deps.sh diff --git a/.travis.yml b/.travis.yml index 3d40388..30f5fa2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,9 @@ -script: ./run_tests.sh -before_script: - - sudo apt-get install zsh +os: + - linux + - osx + +install: + - ./test/support/travisci_deps.sh + +script: + - ./run_tests.sh diff --git a/test/support/travisci_deps.sh b/test/support/travisci_deps.sh new file mode 100755 index 0000000..d4523ee --- /dev/null +++ b/test/support/travisci_deps.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# Installs dependencies for travis-ci environments. + +# Install dependencies, which looks to be just bash & zsh. +# +# Darwin has zsh preinstalled already, so only need to install on Ubuntu. +# +# Note: $TRAVIS_OS_NAME will only be set on text boxes with multi-os enabled, +# so use negation test so it will fail gracefully on normal Travis linux setup. +# +# TODO: also perhaps later only on ZSH test box if we split those +if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then + sudo apt-get install zsh +fi