Skip to content

Commit

Permalink
Merge pull request #31 from k-takata/improve-ci
Browse files Browse the repository at this point in the history
Improve CI
  • Loading branch information
k-takata authored Jul 11, 2017
2 parents ba64242 + bff5dcb commit f3a28a9
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 22 deletions.
64 changes: 51 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,64 @@ cache:
env:
global:
- OPT=$HOME/opt
- CACHE=$OPT/cache
- BREWCACHE=$HOME/Library/Caches/Homebrew

matrix:
include:
- os: linux
env: VIM=vim VIMPROG=$OPT/bin/$VIM
- os: linux
env: VIM=nvim VIMPROG=$VIM
- os: osx
env: VIM=vim PACKAGE=vim VIMPROG=$VIM
- os: osx
env: VIM=nvim PACKAGE=neovim VIMPROG=$VIM


install: |
git clone --depth 1 https://github.com/vim/vim
cd vim
echo -n 'Vim version: '
git describe --tags | tee vim-ver.txt
if [ -e $OPT/vim-ver.txt ]; then
if diff $OPT/vim-ver.txt vim-ver.txt; then
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
if [ "$VIM" = "vim" ]; then
git clone --depth 1 https://github.com/vim/vim
cd vim
echo -n 'Vim version: '
git describe --tags | tee vim-ver.txt
if [ -e $OPT/vim-ver.txt ]; then
if diff $OPT/vim-ver.txt vim-ver.txt; then
cd -
return
fi
fi
./configure --prefix=$OPT --with-features=huge --disable-gui
make
make install
cp vim-ver.txt $OPT
cd -
return
elif [ "$VIM" = "nvim" ]; then
# https://github.com/neovim/bot-ci#setting-up-integration-builds
eval "$(curl -Ss https://raw.githubusercontent.com/neovim/bot-ci/master/scripts/travis-setup.sh) nightly-x64"
fi
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
if [ -d $CACHE ]; then
if [ "$(echo $CACHE/*)" != "$CACHE/*" ]; then
cp $CACHE/* $BREWCACHE
fi
else
mkdir $CACHE -p
fi
(cd $BREWCACHE; ls > $HOME/list1.txt)
brew update
#brew upgrade
brew install $PACKAGE
brew cleanup -s
(cd $BREWCACHE; ls > $HOME/list2.txt)
comm -1 -3 $HOME/list1.txt $HOME/list2.txt | (cd $BREWCACHE; xargs -I{} cp {} $CACHE)
comm -2 -3 $HOME/list1.txt $HOME/list2.txt | (cd $CACHE; xargs rm -rf)
$VIM --version
fi
./configure --prefix=$OPT --with-features=huge --disable-gui
make
make install
cp vim-ver.txt $OPT
cd -
script:
- cd test
- make VIMPROG=$OPT/bin/vim
- make VIMPROG=$VIMPROG

# vim: sw=2 sts=2 et
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ Requirements

* Vim 8.0.0050+ (or Neovim 0.2+)
* Git 1.9+
* OS
Windows: tested
Linux: tested
macOS: not tested
* OS: Windows, Linux or macOS


Installation
Expand Down
5 changes: 1 addition & 4 deletions doc/minpac.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ REQUIREMENTS *minpac-requirements*

* Vim 8.0.0050+ (or Neovim 0.2+)
* Git 1.9+
* OS
Windows: tested
Linux: tested
macOS: not tested
* OS: Windows, Linux or macOS


==============================================================================
Expand Down
2 changes: 1 addition & 1 deletion test/Make_all.mak
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Options for protecting the tests against undesirable interaction with the
# environment
NO_PLUGINS = --noplugin --not-a-term
NO_PLUGINS = --noplugin # --not-a-term
NO_INITS = -U NONE $(NO_PLUGINS)

# Tests using runtest.vim.
Expand Down

0 comments on commit f3a28a9

Please sign in to comment.