Skip to content

Commit

Permalink
Travis: Fix travis script
Browse files Browse the repository at this point in the history
- Use 'trusty' instead to upgrade cmake newer
- Add requirements for build Neovim
- Fix test scripts
  • Loading branch information
lambdalisue committed Jul 1, 2017
1 parent d5116ca commit f17deb9
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 48 deletions.
29 changes: 27 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: generic
dist: trusty
sudo: false
git:
depth: 10
Expand All @@ -19,17 +20,41 @@ matrix:

addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
packages:
- language-pack-ja
- vim
- libperl-dev
- python-dev
- python3-dev
- liblua5.1-0-dev
- lua5.1
# For Neovim
- autoconf
- automake
- apport
- build-essential
- clang-4.0
- cmake
- cscope
- g++-5-multilib
- g++-multilib
- gcc-5-multilib
- gcc-multilib
- gdb
- language-pack-tr
- libc6-dev-i386
- libtool
- llvm-4.0-dev
- locales
- pkg-config
- unzip
- valgrind
- xclip

install:
- test "$VIM_VERSION" == "nvim" && bash scripts/install-nvim.sh || bash scripts/install-vim.sh
- bash scripts/install-vim.sh

before_script:
- git clone --depth 1 --branch v1.5.2.1 --single-branch https://github.com/thinca/vim-themis /tmp/vim-themis
Expand Down
23 changes: 0 additions & 23 deletions scripts/install-nvim.sh

This file was deleted.

65 changes: 44 additions & 21 deletions scripts/install-vim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,47 @@

set -ev

case "${TRAVIS_OS_NAME}" in
linux)
git clone --depth 1 --branch "${VIM_VERSION}" https://github.com/vim/vim /tmp/vim
cd /tmp/vim
./configure --prefix="${HOME}/vim" --with-features=huge \
--enable-perlinterp --enable-pythoninterp --enable-python3interp \
--enable-rubyinterp --enable-luainterp --enable-fail-if-missing
make -j2
make install
;;
osx)
brew update
brew upgrade
brew install lua
brew install vim --with-lua
;;
*)
echo "Unknown value of \${TRAVIS_OS_NAME}: ${TRAVIS_OS_NAME}"
exit 65
;;
esac
if [[ "$VIM_VERSION" = "nvim" ]]; then
case "${TRAVIS_OS_NAME}" in
linux)
tmp=$(mktemp -d)
url=https://github.com/neovim/neovim
git clone -q --depth 1 --single-branch $url $tmp
cd $tmp
make deps
make -j2 CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH=$HOME/neovim" CMAKE_BUILD_TYPE=Release
make install
;;
osx)
brew update
brew upgrade
brew install neovim/neovim/neovim
;;
*)
echo "Unknown value of \${TRAVIS_OS_NAME}: ${TRAVIS_OS_NAME}"
exit 65
;;
esac
else
case "${TRAVIS_OS_NAME}" in
linux)
git clone --depth 1 --branch "${VIM_VERSION}" https://github.com/vim/vim /tmp/vim
cd /tmp/vim
./configure --prefix="${HOME}/vim" --with-features=huge \
--enable-pythoninterp --enable-python3interp \
--enable-luainterp --enable-fail-if-missing
make -j2
make install
;;
osx)
brew update
brew upgrade
brew install lua
brew install vim --with-lua
;;
*)
echo "Unknown value of \${TRAVIS_OS_NAME}: ${TRAVIS_OS_NAME}"
exit 65
;;
esac
fi
4 changes: 2 additions & 2 deletions scripts/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/bin/bash
set -x

export PATH="$HOME/vim/bin:/tmp/vim-themis/bin:$PATH"

if [[ "$VIM_VERSION" == "nvim" ]]; then
export PATH="$HOME/neovim/bin:/tmp/vim-themis/bin:$PATH"
export THEMIS_HOME="/tmp/vim-themis"
export THEMIS_VIM="nvim"
export THEMIS_ARGS="-e -s --headless"
uname -a
which -a nvim
which -a themis
themis --target System.Job --reporter dot
else
export PATH="$HOME/vim/bin:/tmp/vim-themis/bin:$PATH"
export THEMIS_HOME="/tmp/vim-themis"
export THEMIS_VIM="vim"

Expand Down

0 comments on commit f17deb9

Please sign in to comment.