diff --git a/.travis.yml b/.travis.yml index 9f81098..faa72cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,27 @@ sudo: required +# osx_image: xcode7.3 + env: - distribution: ubuntu - distribution: fedora - distribution: arch - distribution: debian-testing - distribution: debian + +#matrix: +# include: +# - os: osx services: - docker before_install: - - ./ci/update_ci.sh + - ./ci/update_ci.sh #travis_wait 90 ./ci/update_ci.sh script: - script=compile CXX=clang++ CC=clang ./ci/execute.sh - script=clean ./ci/execute.sh - - script=compile ./ci/execute.sh + - script=compile CXX=g++ CC=gcc ./ci/execute.sh - script=static_analysis ./ci/execute.sh - script=compile make_command="broadwayd & make test" ./ci/execute.sh \ No newline at end of file diff --git a/ci/execute.sh b/ci/execute.sh index 4f60bf2..9670d97 100755 --- a/ci/execute.sh +++ b/ci/execute.sh @@ -19,7 +19,12 @@ function linux () { #TODO Should run compile/install instructions for osx function osx () { - true + cd .. || (echo "Error changing directory";return 1) + if [ "${script}" == "clean" ]; then + sudo rm -rf "./jucipp/build" + return 0 + fi + sh -c "./jucipp/ci/${script}.sh" || return 1 } function windows () { diff --git a/ci/update_ci.sh b/ci/update_ci.sh index 693b2c2..18cd506 100755 --- a/ci/update_ci.sh +++ b/ci/update_ci.sh @@ -9,14 +9,22 @@ function linux () { sudo service docker start || exit } -# TODO method should update osx, brew, packages etc needed for juCi++ +function brew_install() { + (brew outdated "$1" || brew install $1) || (echo "Error installing $1"; return 1) +} + function osx () { - brew update - brew rm llvm - brew doctor - brew upgrade - brew install --with-clang --with-lldb llvm - brew install cmake pkg-config boost homebrew/x11/gtksourceviewmm3 aspell clang-format + brew update || return 1 + brew uninstall llvm --force || return 1 + brew upgrade --all || return 1 + brew update || return 1 + brew upgrade --all || return 1 + brew install --with-clang llvm + brew_install "boost" || return 1 + brew_install "aspell" || return 1 + brew_install "clang-format" || return 1 + brew_install "pkg-config" || return 1 + brew_install "gtksourceviewmm3" || return 1 } function windows () {