From a11c391231ef4438ff89bd34d21c54c8debacd0c Mon Sep 17 00:00:00 2001 From: Nikolay Kasyanov Date: Sat, 30 Mar 2019 09:57:38 +0100 Subject: [PATCH 1/4] Enable ccache for macOS CI --- CI/before_install.osx.sh | 1 + CI/before_script.osx.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CI/before_install.osx.sh b/CI/before_install.osx.sh index 895b07e1e9..3e47d11a16 100755 --- a/CI/before_install.osx.sh +++ b/CI/before_install.osx.sh @@ -6,6 +6,7 @@ brew install https://gist.githubusercontent.com/nikolaykasyanov/f36da224bdef4202 brew switch cmake 3.12.4 brew outdated pkgconfig || brew upgrade pkgconfig brew install qt +brew install ccache curl -fSL -R -J https://downloads.openmw.org/osx/dependencies/openmw-deps-110f3d3.zip -o ~/openmw-deps.zip unzip -o ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null diff --git a/CI/before_script.osx.sh b/CI/before_script.osx.sh index d3994a7aee..5967756ab9 100755 --- a/CI/before_script.osx.sh +++ b/CI/before_script.osx.sh @@ -10,6 +10,8 @@ cd build cmake \ -D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH" \ +-D CMAKE_C_COMPILER_LAUNCHER=/usr/local/opt/ccache/bin/ccache \ +-D CMAKE_CXX_COMPILER_LAUNCHER=/usr/local/opt/ccache/bin/ccache \ -D CMAKE_OSX_DEPLOYMENT_TARGET="10.9" \ -D CMAKE_OSX_SYSROOT="macosx10.14" \ -D CMAKE_BUILD_TYPE=Release \ From 46b4aa4c4fe302dc0920ee6e4b85aa384324839d Mon Sep 17 00:00:00 2001 From: Nikolay Kasyanov Date: Sat, 30 Mar 2019 12:27:36 +0100 Subject: [PATCH 2/4] Bump Xcode version while I'm at it --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d87b0f01c2..c937952418 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,9 +41,9 @@ addons: build_command: "make VERBOSE=1 -j3" matrix: include: - - name: OpenMW (all) on macOS Xcode 10.1 + - name: OpenMW (all) on macOS Xcode 10.2 os: osx - osx_image: xcode10.1 + osx_image: xcode10.2 if: branch != coverity_scan - name: OpenMW (all) on Ubuntu Xenial GCC-5 os: linux From 95ae9c4ac863c65b1b7a31cfda48030742667f49 Mon Sep 17 00:00:00 2001 From: Nikolay Kasyanov Date: Sat, 30 Mar 2019 12:36:29 +0100 Subject: [PATCH 3/4] Don't downgrade CMake --- CI/before_install.osx.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/CI/before_install.osx.sh b/CI/before_install.osx.sh index 3e47d11a16..0a4c7313cd 100755 --- a/CI/before_install.osx.sh +++ b/CI/before_install.osx.sh @@ -1,9 +1,6 @@ #!/bin/sh -e brew update -brew unlink cmake || true -brew install https://gist.githubusercontent.com/nikolaykasyanov/f36da224bdef42025e480f99fa21a82d/raw/7dd8b5ed2750198757f81c6bc6456e03541999bd/cmake.rb -brew switch cmake 3.12.4 brew outdated pkgconfig || brew upgrade pkgconfig brew install qt brew install ccache From d305e1933abf0427b12ac84fe160249b61ecb88c Mon Sep 17 00:00:00 2001 From: Nikolay Kasyanov Date: Sun, 31 Mar 2019 17:41:16 +0200 Subject: [PATCH 4/4] Get ccache path from Homebrew Also, don't use legacy syntax to get Qt path. --- CI/before_script.osx.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CI/before_script.osx.sh b/CI/before_script.osx.sh index 5967756ab9..1c3a71bddf 100755 --- a/CI/before_script.osx.sh +++ b/CI/before_script.osx.sh @@ -4,14 +4,15 @@ export CXX=clang++ export CC=clang DEPENDENCIES_ROOT="/private/tmp/openmw-deps/openmw-deps" -QT_PATH=`brew --prefix qt` +QT_PATH=$(brew --prefix qt) +CCACHE_EXECUTABLE=$(brew --prefix ccache)/bin/ccache mkdir build cd build cmake \ -D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH" \ --D CMAKE_C_COMPILER_LAUNCHER=/usr/local/opt/ccache/bin/ccache \ --D CMAKE_CXX_COMPILER_LAUNCHER=/usr/local/opt/ccache/bin/ccache \ +-D CMAKE_C_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE" \ +-D CMAKE_CXX_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE" \ -D CMAKE_OSX_DEPLOYMENT_TARGET="10.9" \ -D CMAKE_OSX_SYSROOT="macosx10.14" \ -D CMAKE_BUILD_TYPE=Release \