Skip to content

Commit d4593cb

Browse files
committed
Fix travis deploy
2 parents 6d828c7 + 11e2b8e commit d4593cb

File tree

1 file changed

+59
-34
lines changed

1 file changed

+59
-34
lines changed

.travis.yml

Lines changed: 59 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,72 @@
22
# * http://www.objc.io/issue-6/travis-ci.html
33
# * https://github.com/supermarin/xcpretty#usage
44

5-
language: objective-c
6-
os: osx
7-
osx_image: xcode9.2
8-
cache:
9-
- cocoapods
10-
- pip
11-
before_install:
12-
- gem install --no-rdoc --no-ri 'cocoapods:1.1.1'
13-
- brew install --force-bottle https://raw.githubusercontent.com/Homebrew/homebrew-core/2c2c4b8bfb93e3b409c1c9c51b8a76c3497e0ca0/Formula/clang-format.rb
14-
- brew upgrade --force-bottle https://raw.githubusercontent.com/Homebrew/homebrew-core/6dcd3c206681f02b267e4cf3d44ec9a8ded36b40/Formula/swiftlint.rb
15-
- clang-format --version
16-
- pip2 install lizard==1.14.5
17-
- pod install --repo-update --project-directory=Example
18-
script:
19-
- sh -eo pipefail -c "xcodebuild -scheme \"Test Runner\" -workspace \"$WORKSPACE\" -sdk \"$SDK\" -destination \"$DESTINATION\" build test | xcpretty"
20-
- sh -eo pipefail -c "xcodebuild -scheme \"Swift Example\" -workspace \"$WORKSPACE\" -sdk \"$SDK\" -destination \"$DESTINATION\" build | xcpretty"
21-
- sh -eo pipefail -c "xcodebuild -scheme \"Mac Example\" -workspace \"$WORKSPACE\" build | xcpretty"
22-
- pod lib lint --allow-warnings
23-
- ./clang-check.sh
24-
- swiftlint --strict
25-
- lizard Pod/ -C 15 -W .lizard -w -i 0
26-
before_deploy:
27-
- rvm install ruby-2.2.4 # jazzy doesn't work in old rubies
28-
- rvm use ruby-2.2.4
29-
- gem install jazzy
30-
- pip2 install awscli
31-
deploy:
32-
- provider: script
33-
script: scripts/deploy.sh
34-
skip_cleanup: true
35-
on:
36-
repo: SkygearIO/skygear-SDK-iOS
37-
all_branches: true
38-
395
env:
406
global:
417
- LC_CTYPE=en_US.UTF-8
428
- LANG=en_US.UTF-8
439
- WORKSPACE=Example/SKYKit.xcworkspace
4410
- DESTINATION="OS=10.0,name=iPhone 6S"
4511
- SDK=iphonesimulator
12+
13+
stages:
14+
- test
15+
- name: deploy
16+
if: type != pull_request
17+
18+
refs:
19+
- &pod_test_config
20+
language: objective-c
21+
os: osx
22+
osx_image: xcode9.2
23+
cache: cocoapods
24+
before_install:
25+
- gem install --no-rdoc --no-ri 'cocoapods:1.5.3'
26+
- pod install --repo-update --project-directory=Example
27+
jobs:
28+
include:
29+
# test
30+
- <<: *pod_test_config
31+
stage: test
32+
script:
33+
- sh -eo pipefail -c "xcodebuild -scheme \"Test Runner\" -workspace \"$WORKSPACE\" -sdk \"$SDK\" -destination \"$DESTINATION\" build test | xcpretty"
34+
- <<: *pod_test_config
35+
stage: test
36+
script:
37+
- sh -eo pipefail -c "xcodebuild -scheme \"Swift Example\" -workspace \"$WORKSPACE\" -sdk \"$SDK\" -destination \"$DESTINATION\" build | xcpretty"
38+
- <<: *pod_test_config
39+
stage: test
40+
script:
41+
- sh -eo pipefail -c "xcodebuild -scheme \"Mac Example\" -workspace \"$WORKSPACE\" build | xcpretty"
42+
- <<: *pod_test_config
43+
stage: test
44+
script:
45+
- pod lib lint --allow-warnings
46+
47+
- stage: test
48+
language: objective-c
49+
os: osx
50+
osx_image: xcode9.2
51+
cache: pip
52+
install:
53+
- brew install --force-bottle https://raw.githubusercontent.com/Homebrew/homebrew-core/2c2c4b8bfb93e3b409c1c9c51b8a76c3497e0ca0/Formula/clang-format.rb
54+
- brew upgrade --force-bottle https://raw.githubusercontent.com/Homebrew/homebrew-core/6dcd3c206681f02b267e4cf3d44ec9a8ded36b40/Formula/swiftlint.rb
55+
- clang-format --version
56+
- pip2 install lizard==1.14.5
57+
script:
58+
- ./clang-check.sh
59+
- swiftlint --strict
60+
- lizard Pod/ -C 15 -W .lizard -w -i 0
61+
62+
- <<: *pod_test_config
63+
stage: deploy
64+
install:
65+
- rvm install ruby-2.5.1
66+
- rvm use ruby-2.5.1
67+
- gem install jazzy
68+
- pip2 install awscli
69+
script: scripts/deploy.sh
70+
4671
notifications:
4772
slack:
4873
secure: "hJwBS8givGXSkqUYFmfj3G6t30Dfdm45wAvD4zutnvYdGeKmbcp1H+er7/H3Gbk4k42zXupNIHuwJXzsDtrLwOYe29NXRi5SQMeR9rH9ONHBDFq5xO6mtx1ytthKaR1P37rrCh0MALFVrWaTtPpxAb53qJmMFeM0ifa2om+PEcG3eEUCsOJnABSrPStijCy5R3mhJYmUuOGuCn9sm5nh84CY6OaYU6nbJuW83JwsIR/vPBucdfHGHfM2SmUDYm4Ktpq6BcGaUYJtfyCErKG5eeWeTrfv8NjuwM/b/odscx4lS7+n6nV245GYDTroCnQ+yC9YEHWXoh1j/XghymM/iaZL5ZapXF7bjIkWKIgedvZ7yhYTHeEQKIRnzwBUZAK/Gj4a0tb4L7++oaCw4FODsJZ+rZSciJIDKo6/BQxGSNcgnnQnKJALZ/bmWFRoa35rWErb7qo2vrGsNdySs3WWxIjohvcofnuLWHKAliCWbkZhqYSm+c38r8/S72l0V8GepBXutPkmjUV/d/7EHjaluIxnc8A/Xej5yEl4/5w3/C4EOougOsoUpWgIhn8D2GaFzuqzWFmK9CDGV7Ga+zEzSAONW3RdEn829hJHJ4n9YChMzkGC0L/XhYtWmkS/9aaTyBSrloexHAYNlTZ+0SPXVNYkG4H/0Kvg6mit+bvyzNE="

0 commit comments

Comments
 (0)