Commit 20c171b9 authored by Danielle Tomlinson's avatar Danielle Tomlinson

Shared cache

parent d7c8c057
...@@ -4,22 +4,24 @@ refrences: ...@@ -4,22 +4,24 @@ refrences:
steps: &steps steps: &steps
steps: steps:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- v1-gems-{{ checksum "Gemfile.lock" }} - v1-gems-{{ checksum "Gemfile.lock" }}
- run:
name: Setup Dependencies
command: |
sudo gem update --system
bundle check || bundle install --path .bundle
- save_cache:
key: v1-gems-{{ checksum "Gemfile.lock" }}
paths:
- ".bundle"
- run: - run:
name: Fetch CocoaPods Specs name: Fetch CocoaPods Specs
command: .circle-scripts/fetch-cocoapods-repo-from-s3.sh command: |
if [ "$COCOAPODS_CI_TASKS" != "LINT" ]; then
master_sha="$(ruby -e "puts '`git submodule status spec/fixtures/spec-repos/master`'.strip.sub(/^-/, '').split(/\s/, 2).first")"
curl -ssL "https://github.com/CocoaPods/Specs/archive/$master_sha.tar.gz" | tar xz -C spec/fixtures/spec-repos
git rm spec/fixtures/spec-repos/master
mv "spec/fixtures/spec-repos/Specs-$master_sha" spec/fixtures/spec-repos/master
(
cd spec/fixtures/spec-repos/master
git init
git remote add origin https://github.com/CocoaPods/Specs.git
)
git submodule update --init
fi
- run: - run:
name: Setup Git name: Setup Git
command: | command: |
...@@ -29,13 +31,33 @@ refrences: ...@@ -29,13 +31,33 @@ refrences:
- run: bundle exec rake spec:all - run: bundle exec rake spec:all
jobs: jobs:
warm-cache:
macos:
xcode: "9.2.0"
steps:
- checkout
- restore_cache:
keys:
- v1-gems-{{ checksum "Gemfile.lock" }}
- run: bundle check || bundle install --path .bundle
- save_cache:
key: v1-gems-{{ checksum "Gemfile.lock" }}
paths:
- ".bundle"
examples: examples:
macos: macos:
xcode: "9.2.0" xcode: "9.2.0"
environment: environment:
COCOAPODS_CI_TASKS: EXAMPLES COCOAPODS_CI_TASKS: EXAMPLES
<<: *steps <<: *steps
specs: specs-linux_2.4:
docker:
- image: circleci/ruby:2.4
environment:
COCOAPODS_CI_TASKS: SPECS
<<: *steps
specs-macos_system:
macos: macos:
xcode: "9.2.0" xcode: "9.2.0"
environment: environment:
...@@ -58,8 +80,18 @@ workflows: ...@@ -58,8 +80,18 @@ workflows:
version: 2 version: 2
build-test: build-test:
jobs: jobs:
- lint - warm-cache
- danger - danger
- specs - lint:
- examples requires:
- warm-cache
- specs-macos_system:
requires:
- warm-cache
- specs-linux_2.4:
requires:
- warm-cache
- examples:
requires:
- warm-cache
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment