|
1 | 1 | branches: |
2 | 2 | only: |
3 | 3 | - master |
| 4 | + - /^v?[0-9]+\.[0-9]+\.[0-9]+(-.*)?$/ |
4 | 5 | language: objective-c |
5 | 6 | os: osx |
6 | | -osx_image: xcode8 |
| 7 | +osx_image: xcode8.3 |
7 | 8 | cache: |
8 | 9 | - cocoapods |
9 | | -env: |
10 | | - matrix: |
11 | | - - TEST_TYPE=iOS |
12 | | - - TEST_TYPE=OSX |
13 | | - - TEST_TYPE=OSXDemoSwift |
14 | | - - TEST_TYPE=OSXDemoObjC |
15 | | - - TEST_TYPE=CocoaPods |
16 | | - - TEST_TYPE=Carthage |
17 | | -install: |
18 | | -- | |
19 | | - bundle install |
20 | | -script: |
21 | | -- | |
22 | | - if [ "$TEST_TYPE" = iOS ]; then |
23 | | - set -o pipefail |
24 | | - 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 |
25 | | - elif [ "$TEST_TYPE" = OSX ]; then |
26 | | - set -o pipefail |
27 | | - 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 |
28 | | - elif [ "$TEST_TYPE" = OSXDemoSwift ]; then |
29 | | - set -o pipefail |
30 | | - xcodebuild clean -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo | xcpretty -c |
31 | | - xcodebuild build -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo -configuration Debug | xcpretty -c |
32 | | - elif [ "$TEST_TYPE" = OSXDemoObjC ]; then |
33 | | - set -o pipefail |
34 | | - xcodebuild clean -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo-ObjC | xcpretty -c |
35 | | - xcodebuild build -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo-ObjC -configuration Debug | xcpretty -c |
36 | | - elif [ "$TEST_TYPE" = CocoaPods ]; then |
37 | | - bundle exec pod repo update 2>&1 > /dev/null || exit 1 |
38 | | - pod lib lint ParseLiveQuery.podspec |
39 | | - elif [ "$TEST_TYPE" = Carthage ]; then |
40 | | - carthage build --no-skip-current |
41 | | - fi |
42 | | -after_success: |
43 | | -- | |
44 | | - if [ "$TEST_TYPE" = iOS ] || [ "$TEST_TYPE" = OSX ]; then |
45 | | - bash <(curl -s https://codecov.io/bash) |
46 | | - fi |
| 10 | + |
| 11 | +install: bundle install |
| 12 | + |
| 13 | +jobs: |
| 14 | + include: |
| 15 | + - stage: test |
| 16 | + env: iOS |
| 17 | + script: |
| 18 | + - | |
| 19 | + set -o pipefail |
| 20 | + 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 |
| 21 | + after_success: bash <(curl -s https://codecov.io/bash) |
| 22 | + - stage: test |
| 23 | + env: OSX |
| 24 | + script: |
| 25 | + - | |
| 26 | + set -o pipefail |
| 27 | + 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 |
| 28 | + after_success: bash <(curl -s https://codecov.io/bash) |
| 29 | + - stage: demo |
| 30 | + env: OSX-Swift |
| 31 | + script: |
| 32 | + - | |
| 33 | + set -o pipefail |
| 34 | + xcodebuild clean -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo | xcpretty -c |
| 35 | + xcodebuild build -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo -configuration Debug | xcpretty -c |
| 36 | + - stage: demo |
| 37 | + env: OSX-ObjC |
| 38 | + script: |
| 39 | + - | |
| 40 | + set -o pipefail |
| 41 | + xcodebuild clean -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo-ObjC | xcpretty -c |
| 42 | + xcodebuild build -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo-ObjC -configuration Debug | xcpretty -c |
| 43 | + - stage: distribution |
| 44 | + env: Carthage |
| 45 | + script: carthage build --no-skip-current |
| 46 | + - stage: distribution |
| 47 | + env: CocoaPods |
| 48 | + script: |
| 49 | + - bundle exec pod repo update --silent |
| 50 | + - pod lib lint ParseLiveQuery.podspec |
| 51 | + deploy: |
| 52 | + provider: script |
| 53 | + skip_cleanup: true |
| 54 | + script: ./publish.sh |
| 55 | + on: |
| 56 | + tags: true |
| 57 | + all_branches: true |
| 58 | + - stage: distribution |
| 59 | + env: Docs |
| 60 | + script: bundle exec jazzy |
| 61 | + deploy: |
| 62 | + provider: pages |
| 63 | + skip_cleanup: true |
| 64 | + github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard |
| 65 | + local_dir: docs/ |
| 66 | + on: |
| 67 | + all_branches: true |
0 commit comments