From 20fc8e0d0ea1a21db5daba16673466659e452446 Mon Sep 17 00:00:00 2001 From: Florent Vilmart Date: Mon, 15 Jan 2018 19:39:03 -0500 Subject: [PATCH] Use CircleCi for PR builds (#145) * Initial CircleCI * Fixes multilines * nit * nit * sudo * Custom shell for ruby * proper ruby version * ruby * ruby 2.3 * Fetch submodules * trust chruby * nit * nits * Use travis only for distributions * nits * Adds circleCI shield * Use Workfows * nit --- .circleci/config.yml | 76 ++++++++++++++++++++++++++++++++++++++++++++ .ruby-version | 2 +- .travis.yml | 35 -------------------- README.md | 4 +++ 4 files changed, 81 insertions(+), 36 deletions(-) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..a14952da --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,76 @@ +defaults: &defaults + macos: + xcode: "8.3.3" + shell: /bin/bash --login -eo pipefail +aliases: + - &prepare + | + git submodule update --init --recursive + gem install bundler + bundle install + - &filter-only-master + branches: + only: + - master + +version: 2 +jobs: + ios: + <<: *defaults + steps: + - checkout + - run: *prepare + - run: xcodebuild build -workspace ParseLiveQuery.xcworkspace -sdk iphonesimulator -scheme ParseLiveQuery-iOS -configuration Debug -destination "platform=iOS Simulator,name=iPhone 6 Plus" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c; + - run: bash <(curl -s https://codecov.io/bash) + - store_test_results: + path: build/reports + macos: + <<: *defaults + steps: + - checkout + - run: *prepare + - run: xcodebuild build -workspace ParseLiveQuery.xcworkspace -sdk macosx -scheme ParseLiveQuery-OSX -configuration Debug GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c; + - run: bash <(curl -s https://codecov.io/bash) + - store_test_results: + path: build/reports + demo: + <<: *defaults + steps: + - checkout + - run: *prepare + - run: | + xcodebuild clean -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo | xcpretty -c; + xcodebuild build -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo -configuration Debug | xcpretty -c; + - run: | + xcodebuild clean -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo-ObjC | xcpretty -c; + xcodebuild build -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo-ObjC -configuration Debug | xcpretty -c; + carthage: + <<: *defaults + steps: + - checkout + - run: *prepare + - run: carthage build --no-skip-current --platform macos,ios + cocoapods: + <<: *defaults + steps: + - checkout + - run: *prepare + - run: | + bundle exec pod repo update --silent; + pod lib lint ParseLiveQuery.podspec; + +workflows: + version: 2 + pr: + jobs: + - ios + - macos + - demo + nightly: + jobs: + - cocoapods + - carthage + triggers: + - schedule: + cron: "0 1 * * *" + filters: *filter-only-master diff --git a/.ruby-version b/.ruby-version index 2bf1c1cc..81af5fe5 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.3.1 +ruby-2.3 diff --git a/.travis.yml b/.travis.yml index 1f40db99..8833dc84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,47 +7,12 @@ os: osx osx_image: xcode8.3 cache: - cocoapods - install: bundle install jobs: include: - - stage: test - env: iOS - script: - - | - set -o pipefail - xcodebuild build -workspace ParseLiveQuery.xcworkspace -sdk iphonesimulator -scheme ParseLiveQuery-iOS -configuration Debug -destination "platform=iOS Simulator,name=iPhone 4s" -destination "platform=iOS Simulator,name=iPhone 6 Plus" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c - after_success: bash <(curl -s https://codecov.io/bash) - - stage: test - env: OSX - script: - - | - set -o pipefail - xcodebuild build -workspace ParseLiveQuery.xcworkspace -sdk macosx -scheme ParseLiveQuery-OSX -configuration Debug GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c - after_success: bash <(curl -s https://codecov.io/bash) - - stage: demo - env: OSX-Swift - script: - - | - set -o pipefail - xcodebuild clean -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo | xcpretty -c - xcodebuild build -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo -configuration Debug | xcpretty -c - - stage: demo - env: OSX-ObjC - script: - - | - set -o pipefail - xcodebuild clean -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo-ObjC | xcpretty -c - xcodebuild build -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo-ObjC -configuration Debug | xcpretty -c - - stage: distribution - env: Carthage - script: carthage build --no-skip-current - stage: distribution env: CocoaPods - script: - - bundle exec pod repo update --silent - - pod lib lint ParseLiveQuery.podspec deploy: provider: script skip_cleanup: true diff --git a/README.md b/README.md index 89dfe02e..04540d01 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ [![License][license-svg]][license-link] [![Build Status][build-status-svg]][build-status-link] +[![Build Status][circleci-status-svg]][circleci-status-link] `PFQuery` is one of the key concepts for Parse. It allows you to retrieve `PFObject`s by specifying some conditions, making it easy to build apps such as a dashboard, a todo list or even some strategy games. However, `PFQuery` is based on a pull model, which is not suitable for apps that need real-time support. @@ -84,6 +85,9 @@ As of April 5, 2017, Parse, LLC has transferred this code to the parse-community [build-status-svg]: https://img.shields.io/travis/parse-community/ParseLiveQuery-iOS-OSX/master.svg [build-status-link]: https://travis-ci.org/parse-community/ParseLiveQuery-iOS-OSX/branches + [circleci-status-svg]: https://circleci.com/gh/parse-community/ParseLiveQuery-iOS-OSX.svg?style=shield + [circleci-status-link]: https://circleci.com/build-insights/gh/parse-community/ParseLiveQuery-iOS-OSX/master + [coverage-status-svg]: https://img.shields.io/codecov/c/github/parse-community/ParseLiveQuery-iOS-OSX/master.svg [coverage-status-link]: https://codecov.io/github/parse-community/ParseLiveQuery-iOS-OSX?branch=master