Skip to content

Commit 07b9fc6

Browse files
support neovim nightly and build version (#227)
1 parent d6891ad commit 07b9fc6

File tree

1 file changed

+59
-6
lines changed

1 file changed

+59
-6
lines changed

.travis.yml

Lines changed: 59 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,39 @@ language: generic
33
git:
44
depth: 3
55

6+
env:
7+
global:
8+
- DOWNLOADS_DIR=$HOME/downloads
9+
610
matrix:
711
include:
812
- os: osx
13+
env: VIM_TYPE=neovim VIM_VERSION=nightly
14+
- os: osx
15+
env: VIM_TYPE=neovim VIM_VERSION=0.3.1
16+
- os: osx
17+
env: VIM_TYPE=vim VIM_VERSION=default
18+
- os: linux
19+
dist: trusty
20+
python: "3.6"
21+
env: VIM_TYPE=neovim VIM_VERSION=nightly
922
- os: linux
1023
dist: trusty
1124
python: "3.6"
25+
env: VIM_TYPE=neovim VIM_VERSION=0.3.1
26+
- os: linux
27+
dist: trusty
28+
python: "3.6"
29+
env: VIM_TYPE=vim VIM_VERSION=default
30+
- os: windows
31+
language: shell
32+
env: VIM_TYPE=neovim VIM_VERSION=nightly
1233
- os: windows
1334
language: shell
35+
env: VIM_TYPE=neovim VIM_VERSION=0.3.1
36+
- os: windows
37+
language: shell
38+
env: VIM_TYPE=vim VIM_VERSION=default
1439

1540
addons:
1641
apt:
@@ -19,24 +44,52 @@ addons:
1944
- python3-pip
2045

2146
before_install:
22-
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then export PATH="$HOME/Library/Python/3.6/bin:$PATH"; fi
23-
- if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then
47+
- mkdir -p "$DOWNLOADS_DIR"
48+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
49+
export PATH="$HOME/Library/Python/3.6/bin:$PATH";
50+
pip3 install --user setuptools --upgrade;
51+
pip3 install --user vim-vint typing;
52+
if [[ "$VIM_TYPE" == "neovim" ]]; then
53+
if [[ "$VIM_VERSION" == "nightly" ]]; then export VIM_URL="https://github.com/neovim/neovim/releases/download/nightly/nvim-macos.tar.gz"; fi;
54+
if [[ "$VIM_VERSION" != "nightly" ]]; then export VIM_URL="https://github.com/neovim/neovim/releases/download/v$VIM_VERSION/nvim-macos.tar.gz"; fi;
55+
wget "$VIM_URL" -O "$DOWNLOADS_DIR/neovim.tar.gz";
56+
tar xzvf "$DOWNLOADS_DIR/neovim.tar.gz" -C "$DOWNLOADS_DIR";
57+
export PATH="$DOWNLOADS_DIR/nvim-osx64/bin:$PATH";
58+
fi;
59+
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
60+
sudo apt-get update && sudo apt-get install python3-dev;
2461
pip3 install --user setuptools --upgrade;
2562
pip3 install --user vim-vint typing;
26-
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
63+
if [[ "$VIM_TYPE" == "neovim" ]]; then
64+
if [[ "$VIM_VERSION" == "nightly" ]]; then export VIM_URL="https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage"; fi;
65+
if [[ "$VIM_VERSION" != "nightly" ]]; then export VIM_URL="https://github.com/neovim/neovim/releases/download/v$VIM_VERSION/nvim.appimage"; fi;
66+
mkdir -p "$DOWNLOADS_DIR/neovim-linux/bin";
67+
wget "$VIM_URL" -O "$DOWNLOADS_DIR/neovim-linux/bin/nvim";
68+
chmod u+x "$DOWNLOADS_DIR/neovim-linux/bin/nvim";
69+
export PATH="$DOWNLOADS_DIR/neovim-linux/bin:$PATH";
70+
fi;
71+
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
2772
powershell -Command "Set-ExecutionPolicy RemoteSigned -scope CurrentUser";
2873
powershell -Command "iex (new-object net.webclient).downloadstring('https://get.scoop.sh')";
2974
export PATH="$HOME/scoop/shims:$PATH;";
3075
export PATH="$APPDATA/Python/Python37/Scripts:$PATH;";
3176
powershell -Command "scoop install python";
3277
python3 -m pip install --user vim-vint typing;
78+
if [[ "$VIM_TYPE" == "neovim" ]]; then
79+
if [[ "$VIM_VERSION" == "nightly" ]]; then export VIM_URL="https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.zip"; fi;
80+
if [[ "$VIM_VERSION" != "nightly" ]]; then export VIM_URL="https://github.com/neovim/neovim/releases/download/v$VIM_VERSION/nvim-win64.zip"; fi;
81+
wget "$VIM_URL" -O "$DOWNLOADS_DIR/neovim-win64.zip";
82+
unzip "$DOWNLOADS_DIR/neovim-win64.zip" -d "$DOWNLOADS_DIR";
83+
export PATH="$DOWNLOADS_DIR/Neovim/bin:$PATH";
84+
fi;
3385
fi
3486

3587
before_script:
3688
- uname -a
37-
- which -a vim
3889
- which -a python
39-
- vim --version
90+
- if [[ "$VIM_TYPE" == "vim" ]]; then vim --version; fi;
91+
- if [[ "$VIM_TYPE" == "neovim" ]]; then nvim --version; fi;
4092

4193
script:
42-
- vint autoload ftplugin plugin
94+
- if [[ "$VIM_TYPE" == "vim" ]]; then vint autoload ftplugin plugin; fi;
95+
- if [[ "$VIM_TYPE" == "neovim" ]]; then vint --enable-neovim autoload ftplugin plugin; fi;

0 commit comments

Comments
 (0)