mirror of
https://github.com/neovim/neovim.git
synced 2025-11-05 18:24:22 +00:00
Travis: Install Python 3 to run Python 3 tests.
Install Python 3.3 from the Deadsnakes PPA. As this doesn't have pip, install it manually into ~/.local. ~/.local/bin is apparently in Travis's default PATH, meaning "pip" doesn't refer to Python 2's pip anymore, but to the manually installed Python 3 version. Updated the scripts to use version- suffixed executable names (e.g. pip2.7). Set CC=cc to use system's default compiler when installing Python modules, as gcc on OS X had a problem with compiling one of the dependencies of the Neovim Python module.
This commit is contained in:
@@ -10,4 +10,19 @@ fi
|
|||||||
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
||||||
brew update
|
brew update
|
||||||
fi
|
fi
|
||||||
pip install --user --upgrade pip
|
|
||||||
|
echo "Upgrade Python 2's pip."
|
||||||
|
pip2.7 install --user --upgrade pip
|
||||||
|
|
||||||
|
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
||||||
|
echo "Install Python 3."
|
||||||
|
brew install python3
|
||||||
|
echo "Upgrade Python 3's pip."
|
||||||
|
pip3 install --user --upgrade pip
|
||||||
|
else
|
||||||
|
# TODO: Replace with upgrade when Travis gets python3-pip package.
|
||||||
|
echo "Install pip for Python 3."
|
||||||
|
curl -sSL https://bootstrap.pypa.io/get-pip.py -o "${HOME}/get-pip.py"
|
||||||
|
# After this, pip in PATH will refer to Python 3's pip.
|
||||||
|
python3.3 "${HOME}/get-pip.py" --user --upgrade
|
||||||
|
fi
|
||||||
|
|||||||
@@ -14,7 +14,17 @@ elif [[ "${BUILD_MINGW}" == ON ]]; then
|
|||||||
# binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-dev mingw-w64-tools
|
# binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-dev mingw-w64-tools
|
||||||
|
|
||||||
echo "Downloading MinGW..."
|
echo "Downloading MinGW..."
|
||||||
wget -q -O - "http://downloads.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.8-release/i686-w64-mingw32-gcc-4.8.0-linux64_rubenvb.tar.xz" | tar xJf - -C "${HOME}/.local"
|
curl -sSL "http://downloads.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.8-release/i686-w64-mingw32-gcc-4.8.0-linux64_rubenvb.tar.xz" | tar xJf - -C "${HOME}/.local"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pip install --user --upgrade cpp-coveralls neovim
|
# Set CC to default to avoid compilation problems
|
||||||
|
# when installing Python modules.
|
||||||
|
echo "Install neovim module and coveralls for Python 2."
|
||||||
|
CC=cc pip2.7 install --user --upgrade neovim cpp-coveralls
|
||||||
|
|
||||||
|
echo "Install neovim module for Python 3."
|
||||||
|
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
||||||
|
CC=cc pip3 install --user --upgrade neovim
|
||||||
|
else
|
||||||
|
CC=cc pip3.3 install --user --upgrade neovim
|
||||||
|
fi
|
||||||
|
|||||||
19
.travis.yml
19
.travis.yml
@@ -9,7 +9,7 @@ env:
|
|||||||
# http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM
|
# http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM
|
||||||
- MAKE_CMD="make -j2"
|
- MAKE_CMD="make -j2"
|
||||||
# Update PATH for pip and MinGW.
|
# Update PATH for pip and MinGW.
|
||||||
- PATH="$(python -c 'import site; print(site.getuserbase())')/bin:$HOME/.local/mingw32/bin:$PATH"
|
- PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:$HOME/.local/mingw32/bin:$PATH"
|
||||||
# LLVM symbolizer path.
|
# LLVM symbolizer path.
|
||||||
- LLVM_SYMBOLIZER="$(which llvm-symbolizer-3.6)"
|
- LLVM_SYMBOLIZER="$(which llvm-symbolizer-3.6)"
|
||||||
# Force verification of DLOG macros.
|
# Force verification of DLOG macros.
|
||||||
@@ -101,28 +101,29 @@ after_success: .ci/after_success.sh
|
|||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
|
# TODO: Remove PPA when Travis gets Python >=3.3.
|
||||||
|
- deadsnakes
|
||||||
- llvm-toolchain-precise-3.6
|
- llvm-toolchain-precise-3.6
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
packages:
|
packages:
|
||||||
# Basic Neovim/test dependencies.
|
|
||||||
- autoconf
|
- autoconf
|
||||||
- automake
|
- automake
|
||||||
- build-essential
|
- build-essential
|
||||||
- cmake
|
|
||||||
- gdb
|
|
||||||
- libtool
|
|
||||||
- pkg-config
|
|
||||||
- unzip
|
|
||||||
- xclip
|
|
||||||
# Additional compilers/tools.
|
|
||||||
- clang-3.6
|
- clang-3.6
|
||||||
|
- cmake
|
||||||
- g++-5-multilib
|
- g++-5-multilib
|
||||||
- g++-multilib
|
- g++-multilib
|
||||||
- gcc-5-multilib
|
- gcc-5-multilib
|
||||||
- gcc-multilib
|
- gcc-multilib
|
||||||
|
- gdb
|
||||||
- libc6-dev-i386
|
- libc6-dev-i386
|
||||||
|
- libtool
|
||||||
- llvm-3.6-dev
|
- llvm-3.6-dev
|
||||||
|
- pkg-config
|
||||||
|
- python3.3-dev
|
||||||
|
- unzip
|
||||||
- valgrind
|
- valgrind
|
||||||
|
- xclip
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user