forked from k-takata/minpac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (65 loc) · 1.75 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
dist: trusty
language: generic
sudo: false
cache:
directories:
- $HOME/opt
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: |
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 -
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
script:
- cd test
- make VIMPROG=$VIMPROG
# vim: sw=2 sts=2 et