diff options
author | Daniel Hahler <git@thequod.de> | 2019-07-08 12:53:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-08 12:53:43 +0200 |
commit | 44e150bd460a52e31f9714644f7664d1bc61405b (patch) | |
tree | d0bb6ea72d6110294fd6ffad06fb58b30df6396e | |
parent | 71e0768e08ffe88be1ae0b8d1580df3ef3e0c059 (diff) | |
download | rneovim-44e150bd460a52e31f9714644f7664d1bc61405b.tar.gz rneovim-44e150bd460a52e31f9714644f7664d1bc61405b.tar.bz2 rneovim-44e150bd460a52e31f9714644f7664d1bc61405b.zip |
ci: Travis: use minimum supported CMake in one job (#10445)
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rwxr-xr-x | ci/before_install.sh | 13 |
3 files changed, 16 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml index 18ab33e802..90570637ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index af526ed72d..1a1ad9cf12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/ci/before_install.sh b/ci/before_install.sh index ff2abc0e12..774c66d38f 100755 --- a/ci/before_install.sh +++ b/ci/before_install.sh @@ -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 |