From 854493489ce3d791982695f8d2b49488eca9a40b Mon Sep 17 00:00:00 2001 From: Bruno Pinto Date: Sat, 19 Dec 2015 14:34:25 +0000 Subject: [PATCH] Run tests on Travis osx and linux machines Unfortunately we can't use docker anymore in order to support automatic build on OSX. --- .travis.yml | 36 ++++++++++++++++++++++++++---------- tests/run.fish | 0 tools/travis-install-fish.sh | 16 ++++++++++++++++ 3 files changed, 42 insertions(+), 10 deletions(-) mode change 100644 => 100755 tests/run.fish create mode 100755 tools/travis-install-fish.sh diff --git a/.travis.yml b/.travis.yml index 5180631..d4fb7b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,20 @@ +language: c +dist: trusty sudo: required -language: generic -services: - - docker + +os: + - linux + - osx + +addons: + apt: + packages: + - bc + - doxygen + - expect + - gettext + - libncurses5-dev + - tree env: global: @@ -10,19 +23,22 @@ env: before_install: - source tools/travis-github-pr-integration.sh + - tools/travis-install-fish.sh before_script: - - docker build --build-arg OMF_REPO_BRANCH=$OMF_REPO_BRANCH --build-arg OMF_REPO_URI=$OMF_REPO_URI -t oh-my-fish . < Dockerfile - - docker run -t oh-my-fish /usr/bin/fish -c "export; tree -h" + - tree -h + - export + - fish $TRAVIS_BUILD_DIR/bin/install script: - - docker run -t oh-my-fish /usr/bin/fish "tests/run.fish" - - docker run -t oh-my-fish /usr/bin/fish -c "cd pkg/fish-spec; fish-spec" - - docker run -t oh-my-fish /usr/bin/fish -c "cd pkg/omf; fish-spec" - - docker run -t oh-my-fish /usr/bin/fish "tests/test-generate-themes-doc.fish" + - tests/run.fish + - pushd pkg/fish-spec; fish -c 'fish-spec'; popd + - pushd pkg/omf; fish -c 'fish-spec'; popd + - tests/test-generate-themes-doc.fish after_failure: - - docker ps -a + - pwd + - cd ~/.config/fish; tree -h; find . -type f | xargs cat notifications: email: diff --git a/tests/run.fish b/tests/run.fish old mode 100644 new mode 100755 diff --git a/tools/travis-install-fish.sh b/tools/travis-install-fish.sh new file mode 100755 index 0000000..67d5a91 --- /dev/null +++ b/tools/travis-install-fish.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -o pipefail +set -o errexit +set -o nounset +#set -o xtrace + +# Return if we are not in a Pull Request +if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then + sudo apt-add-repository -y ppa:fish-shell/release-2 + sudo apt-get update + sudo apt-get install -y fish +else + brew update + brew install fish tree +fi