diff --git a/.travis.yml b/.travis.yml index 85a96bb0f..17217e3eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: generic +dist: trusty sudo: false git: depth: 10 @@ -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 diff --git a/scripts/install-nvim.sh b/scripts/install-nvim.sh deleted file mode 100644 index a14c8973a..000000000 --- a/scripts/install-nvim.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -ev - -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 -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 diff --git a/scripts/install-vim.sh b/scripts/install-vim.sh index 86ac63d7e..f0515b729 100755 --- a/scripts/install-vim.sh +++ b/scripts/install-vim.sh @@ -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 diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index d8e126715..26aa11dff 100644 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -1,10 +1,9 @@ #!/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 @@ -12,6 +11,7 @@ if [[ "$VIM_VERSION" == "nvim" ]]; then 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"