mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
ci: Travis: use minimum supported CMake in one job (#10445)
This commit is contained in:
parent
71e0768e08
commit
44e150bd46
@ -80,6 +80,8 @@ jobs:
|
||||
compiler: gcc
|
||||
env:
|
||||
- BUILD_32BIT=ON
|
||||
# Minimum required CMake.
|
||||
- CMAKE_URL=https://cmake.org/files/v2.8/cmake-2.8.12-Linux-i386.sh
|
||||
- *common-job-env
|
||||
- if: branch = master AND commit_message !~ /\[skip.lint\]/
|
||||
name: lint
|
||||
|
@ -2,6 +2,7 @@
|
||||
# intro: https://codingnest.com/basic-cmake/
|
||||
# best practices (3.0+): https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1
|
||||
|
||||
# Version should match the tested CMAKE_URL in .travis.yml.
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(nvim C)
|
||||
|
||||
|
@ -46,3 +46,16 @@ fi
|
||||
source ~/.nvm/nvm.sh
|
||||
nvm install --lts
|
||||
nvm use --lts
|
||||
|
||||
if [[ -n "$CMAKE_URL" ]]; then
|
||||
echo "Installing custom CMake: $CMAKE_URL"
|
||||
curl --retry 5 --silent --fail -o /tmp/cmake-installer.sh "$CMAKE_URL"
|
||||
mkdir -p "$HOME/.local/bin" /opt/cmake-custom
|
||||
bash /tmp/cmake-installer.sh --prefix=/opt/cmake-custom --skip-license
|
||||
ln -sfn /opt/cmake-custom/bin/cmake "$HOME/.local/bin/cmake"
|
||||
cmake_version="$(cmake --version)"
|
||||
echo "$cmake_version" | grep -qF '2.8.12' || {
|
||||
echo "Unexpected CMake version: $cmake_version"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user