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

View File

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

View File

@ -85,13 +85,26 @@ DOC
cd "$BASE" 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 clone_repos
prepare prepare
VIM=$(select_vim)
echo "Selected Vim: $VIM"
if [ "$1" = '!' ]; then 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 && 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 else
/usr/local/bin/vim -Nu /tmp/mini-vimrc -c 'Vader test.vader' $VIM -Nu /tmp/mini-vimrc -c 'Vader test.vader'
fi fi