From 701a247a314eb0fcb153f1acf6b6b63d64a93e76 Mon Sep 17 00:00:00 2001 From: Salakar Date: Tue, 4 Sep 2018 13:18:49 +0100 Subject: [PATCH] [build][ci] update config to cache cocoapods repo, cache brew Cellar and run packager-warmup script --- .circleci/config.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ee89d7f9..f50648a4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,11 +20,13 @@ aliases: - &save-pods-cache paths: - ~/react-native-firebase/tests/ios/Pods + - ~/.cocoapods/repos/master key: pods-cache-{{ arch }}-{{ checksum "ios/RNFirebase.podspec" }}-{{ checksum "tests/ios/Podfile" }}-{{ checksum "tests/ios/Podfile.lock" }} - &restore-pods-cache keys: - pods-cache-{{ arch }}-{{ checksum "ios/RNFirebase.podspec" }}-{{ checksum "tests/ios/Podfile" }}-{{ checksum "tests/ios/Podfile.lock" }} + - pods-cache-{{ arch }} - &save-ios-build-cache paths: @@ -34,10 +36,12 @@ aliases: - &restore-ios-build-cache keys: - ios-build-cache-{{ arch }}-{{ checksum "ios/RNFirebase.podspec" }}-{{ checksum "tests/ios/Podfile" }}-{{ checksum "tests/ios/Podfile.lock" }} + - ios-build-cache-{{ arch }} - &save-brew-cache paths: - /usr/local/Homebrew + - /usr/local/Cellar key: brew-cache-{{ arch }} - &restore-brew-cache @@ -60,6 +64,12 @@ aliases: background: true command: cd tests && yarn run packager-jet || true + - &packager-warmup + name: Warming up Packager + background: true + command: node .circleci/scripts/packager-warmup.js + + # ------------------------- # INSTALLATION # ------------------------- @@ -180,12 +190,13 @@ jobs: name: Install CocoaPods + Pod Install command: | cd tests/ios - curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf + pod repo update pod install - save-cache: *save-pods-cache # must always be after environment config job but before ios build - run: *packager-jet + - run: *packager-warmup # XCode Build - restore-cache: *restore-ios-build-cache