cmake: Use CMake 3.10.2 for CI
authorBob Ellison <bob@lunarg.com>
Thu, 23 May 2019 17:43:54 +0000 (11:43 -0600)
committerBob Ellison <45772930+lunarpapillo@users.noreply.github.com>
Thu, 6 Jun 2019 20:41:55 +0000 (14:41 -0600)
These changes ensure that the Travis and AppVeyor
builds use a known version of CMake.

.appveyor.yml
.travis.yml

index 0b82eff..76aa833 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 Starting build for %APPVEYOR_REPO_NAME% in %APPVEYOR_BUILD_FOLDER%
index 6e09f66..1a17618 100644 (file)
@@ -45,6 +45,17 @@ cache: ccache
 
 before_install:
   - set -e
+  - CMAKE_VERSION=3.10.2
+  - |
+    if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
+      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
   - |
     if [[ "$VULKAN_BUILD_TARGET" == "LINUX" ]] || [[ "$VULKAN_BUILD_TARGET" == "GN" ]]; then
       # Install the appropriate Linux packages.
@@ -73,7 +84,6 @@ before_install:
 
 script:
   - set -e
-  - cmake --version
   - |
     if [[ "$VULKAN_BUILD_TARGET" == "LINUX" ]]; then
       # Build Vulkan-Tools