Migrate travis to use new docker system.

* Travis now installs built vim into $DEPS.
* test/run now detects best vim to use.
* python: Fix small display issue with error messages.
This commit is contained in:
Jeremy Pallats/starcraft.man 2015-11-28 10:00:49 -05:00
parent 0611369d0d
commit dbd045e995
3 changed files with 40 additions and 25 deletions

View File

@ -1,49 +1,51 @@
language: ruby
rvm:
- 1.8.7
- 2.0.0
sudo: false
env:
- ENV=nox
- ENV=python
- ENV=python3
- ENV=ruby
global:
- DEPS=$HOME/deps
- PATH=$DEPS/bin:$PATH
matrix:
exclude:
- rvm: 2.0.0
include:
- rvm: 2.0.0
env: ENV=ruby
- env: ENV=nox
rvm: 1.8.7
addons: { apt: { packages: [vim-nox] } }
- env: ENV=python
rvm: 1.8.7
addons: { apt: { packages: [python2.7-dev] } }
- env: ENV=python3
rvm: 1.8.7
addons: { apt: { packages: [python3-dev] } }
- env: ENV=ruby
rvm: 1.8.7
- env: ENV=ruby
rvm: 2.0.0
install: |
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
sudo apt-get update -y
if [ "$ENV" == "nox" ]; then
sudo apt-get install -y vim-nox
sudo ln -s /usr/bin/vim /usr/local/bin/vim
mkdir -p ${DEPS}/bin
ln -s /usr/bin/vim.nox ${DEPS}/bin/vim
return
fi
C_OPTS="--with-features=huge --disable-gui "
C_OPTS="--prefix=$DEPS --with-features=huge --disable-gui "
case "$ENV" in
python)
PACKS=python2.7-dev
C_OPtS+=--enable-pythoninterp
C_OPTS+=--enable-pythoninterp
;;
python3)
PACKS=python3-dev
C_OPtS+=--enable-python3interp
C_OPTS+=--enable-python3interp
;;
ruby)
C_OPTS+=--enable-rubyinterp
;;
esac
sudo apt-get install -y $PACKS
git clone --depth 1 https://github.com/vim/vim
cd vim
./configure $C_OPTS
make
sudo make install
make install
cd -
script: test/run !

View File

@ -1283,7 +1283,7 @@ class Plugin(object):
with self.lock:
thread_vim_command("let s:update.new['{0}'] = 1".format(self.name))
except PlugError as exc:
self.write(Action.ERROR, self.name, str(exc))
self.write(Action.ERROR, self.name, [str(exc)])
except KeyboardInterrupt:
G_STOP.set()
self.write(Action.ERROR, self.name, ['Interrupted!'])

View File

@ -85,13 +85,26 @@ DOC
cd "$BASE"
}
select_vim() {
local vim=/usr/bin/vim
if [ -n "$DEPS" ] && [ -e "${DEPS}/bin/vim" ]; then
vim="${DEPS}/bin/vim"
elif [ -e "/usr/local/bin/vim" ]; then
vim=/usr/local/bin/vim
fi
echo $vim
}
clone_repos
prepare
VIM=$(select_vim)
echo "Selected Vim: $VIM"
if [ "$1" = '!' ]; then
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader! test.vader' > /dev/null &&
$VIM -Nu /tmp/mini-vimrc -c 'Vader! test.vader' > /dev/null &&
prepare &&
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'let g:plug_threads = 1 | Vader! test.vader' > /dev/null
$VIM -Nu /tmp/mini-vimrc -c 'let g:plug_threads = 1 | Vader! test.vader' > /dev/null
else
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader test.vader'
$VIM -Nu /tmp/mini-vimrc -c 'Vader test.vader'
fi