ci: add osx homebrew packages to cache
authorMike Blumenkrantz <zmike@samsung.com>
Thu, 12 Jul 2018 14:05:09 +0000 (10:05 -0400)
committerYoungbok Shin <youngb.shin@samsung.com>
Thu, 26 Jul 2018 08:26:36 +0000 (17:26 +0900)
this adds the downloaded homebrew package files to a cache in order to
avoid needing to separately download each file at the start of each build

not sure we can do better here unless we buy the enterprise-level travis
package which allows building with custom osx images which we could pre-install
all these dependencies on

ref T7096

Differential Revision: https://phab.enlightenment.org/D6610

.travis.yml

index 78d5fa4..0840209 100644 (file)
@@ -66,7 +66,13 @@ matrix:
       env: DISTRO=Fedora28 CI_BUILD_TYPE=release-ready
 
 before_install:
-  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then .ci/ci-osx-deps.sh ; fi
+  - |
+      if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
+        rm -rf $HOME/Library/Caches/Homebrew
+        rm -rf $HOME/cachedir/Homebrew/Homebrew
+        mv $HOME/cachedir/Homebrew $HOME/Library/Caches/Homebrew
+        .ci/ci-osx-deps.sh
+      fi
 
 before_script:
   - |
@@ -116,6 +122,7 @@ before_cache:
          sudo chown travis:travis $HOME/autom4te.cache
        else
          cp config.cache $HOME/cachedir
+         mv $HOME/Library/Caches/Homebrew $HOME/cachedir/Homebrew
        fi
 
 after_success: