From 6fa0a0a516f3a3a163c50ca0f1f9a8b7443c8860 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 6 Jan 2018 17:56:43 +0100 Subject: [PATCH 1/2] ci/travis: macOS: switch ruby version Travis macOS builds are failing because of neovim-ruby gem dependencies. Switch default ruby to a newer version to make the builds pass. --- ci/before_script.sh | 2 ++ ci/common/build.sh | 9 +++++++++ ci/install.sh | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/ci/before_script.sh b/ci/before_script.sh index 445996a8df..e8ecd8c990 100755 --- a/ci/before_script.sh +++ b/ci/before_script.sh @@ -25,6 +25,8 @@ if [[ "${TRAVIS_OS_NAME}" == osx ]]; then # That allows to test changing the group of the file by `os_fchown`. sudo dscl . -create /Groups/chown_test sudo dscl . -append /Groups/chown_test GroupMembership "${USER}" + + macos_rvm_dance fi # Compile dependencies. diff --git a/ci/common/build.sh b/ci/common/build.sh index f398a1a1cc..adfd7b9e8a 100644 --- a/ci/common/build.sh +++ b/ci/common/build.sh @@ -87,3 +87,12 @@ build_nvim() { cd "${TRAVIS_BUILD_DIR}" } + +macos_rvm_dance() { + # neovim-ruby gem requires a ruby newer than the macOS default. + source ~/.rvm/scripts/rvm + rvm get stable --auto-dotfiles + rvm reload + rvm use 2.2.5 + rvm use +} diff --git a/ci/install.sh b/ci/install.sh index 2fe4f88822..f28227d95c 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -22,6 +22,10 @@ echo "Install neovim module for Python 3." CC=cc pip3 -q install --user --upgrade neovim || true echo "Install neovim RubyGem." +if [ "${TRAVIS_OS_NAME}" = osx ] ; then + macos_rvm_dance + gem update --system +fi gem install --no-document --version ">= 0.2.0" neovim if [[ "${TRAVIS_OS_NAME}" == linux ]]; then From 46a9600d0e17f460a940ac6ed605f01f5b12aaf2 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 7 Jan 2018 20:09:03 +0100 Subject: [PATCH 2/2] ci/travis: macOS: skip ruby-neovim install With 6fa0a0a516f3 the neovim-ruby gem installs successfully, but ruby_spec.lua can't find it: g:ruby_host_prog needs to be set correctly. Just skip the whole thing for now, so that CI builds don't fail. --- ci/before_script.sh | 2 -- ci/install.sh | 8 +++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ci/before_script.sh b/ci/before_script.sh index e8ecd8c990..445996a8df 100755 --- a/ci/before_script.sh +++ b/ci/before_script.sh @@ -25,8 +25,6 @@ if [[ "${TRAVIS_OS_NAME}" == osx ]]; then # That allows to test changing the group of the file by `os_fchown`. sudo dscl . -create /Groups/chown_test sudo dscl . -append /Groups/chown_test GroupMembership "${USER}" - - macos_rvm_dance fi # Compile dependencies. diff --git a/ci/install.sh b/ci/install.sh index f28227d95c..f51ba1a776 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -21,12 +21,10 @@ echo "Install neovim module for Python 3." # https://github.com/travis-ci/travis-ci/issues/8363 CC=cc pip3 -q install --user --upgrade neovim || true -echo "Install neovim RubyGem." -if [ "${TRAVIS_OS_NAME}" = osx ] ; then - macos_rvm_dance - gem update --system +if ! [ "${TRAVIS_OS_NAME}" = osx ] ; then + echo "Install neovim RubyGem." + gem install --no-document --version ">= 0.2.0" neovim fi -gem install --no-document --version ">= 0.2.0" neovim if [[ "${TRAVIS_OS_NAME}" == linux ]]; then echo "Install neovim npm package"