cmake: Use CMake 3.10.2 for CI
authorBob Ellison <bob@lunarg.com>
Thu, 23 May 2019 17:40:13 +0000 (11:40 -0600)
committerBob Ellison <45772930+lunarpapillo@users.noreply.github.com>
Fri, 7 Jun 2019 17:02:39 +0000 (11:02 -0600)
These changes ensure that the Travis and AppVeyor
builds use a known version of CMake.

.appveyor.yml
.travis.yml

index 086c2a1b23ae80292963015d8541fea288bda4e6..3b79855e567c50d07af8856294a4580249797b48 100644 (file)
@@ -22,6 +22,12 @@ branches:
   only:
     - master
 
+# Install desired CMake version 3.10.2 before any other building
+install:
+  - choco upgrade cmake --version 3.10.2
+  - set path=C:\Program Files\CMake\bin;%path%
+  - cmake --version
+
 before_build:
   - "SET PATH=C:\\Python35;C:\\Python35\\Scripts;%PATH%"
   - echo.
index 45d0938543249e22b0c488536fb7935498ae7161..a988edcffa59c122fff54b6121bac32a5c563c33 100644 (file)
@@ -42,6 +42,18 @@ cache: ccache
 
 before_install:
   - set -e
+  - CMAKE_VERSION=3.10.2
+  - |
+    if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
+      # Upgrade to the desired version of CMake
+      CMAKE_URL="https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz"
+      echo CMAKE_URL=${CMAKE_URL}
+      mkdir cmake-${CMAKE_VERSION} && travis_retry wget --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake-${CMAKE_VERSION}
+      export PATH=${PWD}/cmake-${CMAKE_VERSION}/bin:${PATH}
+    else
+      brew install cmake || brew upgrade cmake
+    fi
+    cmake --version
   - unset -f cd pushd popd
   - |
     if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]]; then