Commit ecdfccf5 authored by Danielle Tomlinson's avatar Danielle Tomlinson

Add circle.yml for examples

parent e0bb44c7
#!/usr/bin/env bash
set -o nounset
set -o errexit
set -o pipefail
REPOS_LOCATION="$HOME/.cocoapods/repos"
MASTER_REPO_LOCATION="$REPOS_LOCATION/master"
S3_BUCKET="cocoapods-specs"
tempfile=$(mktemp)
cleanup() {
echo "Download from S3 failed, cleaning up and falling back to standard checkout..."
rm -rf "$MASTER_REPO_LOCATION"
rm "$tempfile"
}
trap cleanup ERR
# Only install awscli if it's not in the image. pip will exit with
# non-zero exit code if the package is not installed. Hiding all output
# from package installation to not to confuse users.
if ! pip show awscli > /dev/null 2>&1 ; then
sudo pip install --ignore-installed awscli > /dev/null 2>&1
fi
rm -rf "$MASTER_REPO_LOCATION"
mkdir -p "$REPOS_LOCATION"
echo "Downloading CocoaPods master repo from $S3_BUCKET S3 bucket..."
# --no-sign-request forces awscli to not to use any credentials.
aws s3 --no-sign-request cp "s3://$S3_BUCKET/latest.tar.gz" "$tempfile" > /dev/null
echo "Uncompressing CocoaPods master repo..."
# We expect the structure with the "master" as the top dir in the archive.
tar -C "$REPOS_LOCATION" -xzf "$tempfile"
echo "Successfully downloaded CocoaPods master repo."
COCOAPODS_GIT_REV="$(cd $MASTER_REPO_LOCATION && git rev-parse HEAD)"
echo "Using specs repo revision $COCOAPODS_GIT_REV."
rm "$tempfile"
......@@ -8,10 +8,6 @@ git:
matrix:
include:
- rvm: system
env: COCOAPODS_CI_TASKS=EXAMPLES
osx_image: xcode7.3
language: objective-c
- rvm: 2.4.0
env: COCOAPODS_CI_TASKS=LINT
git:
......
......@@ -36,6 +36,7 @@ group :development do
cp_gem 'molinillo', 'Molinillo'
cp_gem 'nanaimo', 'Nanaimo'
cp_gem 'xcodeproj', 'Xcodeproj'
cp_gem 'fourflusher', 'Fourflusher'
gem 'cocoapods-dependencies', '~> 1.0.beta.1'
......
......@@ -15,6 +15,13 @@ GIT
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
GIT
remote: https://github.com/CocoaPods/Fourflusher.git
revision: 286949079bad4d760f8646601c91bc5f99137fe8
branch: master
specs:
fourflusher (2.0.1)
GIT
remote: https://github.com/CocoaPods/Molinillo.git
revision: c2f655cd697812574a8537cc7c9cf68a0c0357b3
......@@ -171,7 +178,6 @@ GEM
faraday-http-cache (1.3.0)
faraday (~> 0.8)
ffi (1.9.6)
fourflusher (2.0.1)
fuzzy_match (2.0.4)
gh_inspector (1.0.3)
git (1.3.0)
......@@ -275,6 +281,7 @@ DEPENDENCIES
cocoapods_debug
danger
diffy
fourflusher!
inch_by_inch
json!
kicker
......
......@@ -295,10 +295,10 @@ begin
when :osx
execute_command "xcodebuild -workspace '#{workspace_path}' -scheme '#{scheme_name}' clean build"
when :ios
# Specifically build against the simulator SDK so we don't have to deal with code signing.
# Need to use the iPhone 6s, since this is the default simulator paired with a watch in Xcode 7.3
test_flag = (scheme_name.start_with? 'Test') ? 'test' : ''
execute_command "xcodebuild -workspace '#{workspace_path}' -scheme '#{scheme_name}' clean build #{test_flag} ONLY_ACTIVE_ARCH=NO -destination 'platform=iOS Simulator,name=iPhone 6s'"
watch_project = scheme_name.start_with? 'watchOS'
execute_command "xcodebuild -workspace '#{workspace_path}' -scheme '#{scheme_name}' clean build #{test_flag} ONLY_ACTIVE_ARCH=NO -destination 'platform=iOS Simulator,name=iPhone 7'"
else
raise "Unknown platform #{platform}"
end
......
machine:
ruby:
version: system
xcode:
version: "8.3.2"
dependencies:
override:
- sudo gem update --system
- bundle check || bundle install --path .bundle
- .circle-scripts/fetch-cocoapods-repo-from-s3.sh
cache_directories:
- .bundle
test:
pre:
- git config --global user.email "tests@cocoapods.org"
- git config --global user.name "CocoaPods Tests"
- bundle exec pod env
override:
- bundle exec rake spec:all:
environment:
COCOAPODS_CI_TASKS: EXAMPLES
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