forked from sauravexodus/RxKeyboard
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
66 lines (61 loc) · 2.38 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
osx_image: xcode10
language: objective-c
sudo: required
env:
global:
- PROJECT="RxKeyboard.xcodeproj"
- SCHEME="RxKeyboard-Package"
- IOS_SDK="iphonesimulator"
- MACOS_SDK="macosx10.14"
- TVOS_SDK="appletvsimulator12.0"
- WATCHOS_SDK="watchsimulator5.0"
- FRAMEWORK="RxKeyboard"
matrix:
- SDK="$IOS_SDK" TEST=0 SWIFT_VERSION=4.0 DESTINATION="platform=iOS Simulator,name=iPhone 8"
- SDK="$IOS_SDK" TEST=0 SWIFT_VERSION=4.2 DESTINATION="platform=iOS Simulator,name=iPhone 8"
install:
- eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)"
- swift --version
- bundle install
before_script:
- set -o pipefail
- swift package generate-xcodeproj
script:
- if [ $TEST == 1 ]; then
xcodebuild clean SWIFT_VERSION=${SWIFT_VERSION} build test
-project "$PROJECT"
-scheme "$SCHEME"
-sdk "$SDK"
-destination "$DESTINATION"
-configuration Debug
-enableCodeCoverage YES
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty -c;
else
xcodebuild clean SWIFT_VERSION=${SWIFT_VERSION} build
-project "$PROJECT"
-scheme "$SCHEME"
-sdk "$SDK"
-destination "$DESTINATION"
-configuration Debug
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty -c;
fi
- bundle exec pod repo update
- bundle exec pod lib lint --swift-version=${SWIFT_VERSION} --verbose --allow-warnings --fail-fast
before_deploy:
- bundle exec swiftproj generate-xcconfig --podspec RxKeyboard.podspec
- bundle exec swiftproj generate-xcodeproj --xcconfig-overrides Config.xcconfig
- bundle exec swiftproj configure-scheme --project RxKeyboard.xcodeproj --scheme RxKeyboard-Package --buildable-targets RxKeyboard
- bundle exec swiftproj remove-framework --project RxKeyboard.xcodeproj --target RxKeyboard --framework RxCocoa.framework
- bundle exec swiftproj remove-framework --project RxKeyboard.xcodeproj --target RxKeyboard --framework RxCocoaRuntime.framework
- carthage bootstrap
- carthage build --no-skip-current --verbose | xcpretty -c
- carthage archive RxKeyboard
deploy:
provider: releases
api_key: $GITHUB_ACCESS_TOKEN
file: $FRAMEWORK.framework.zip
skip_cleanup: true
on:
repo: RxSwiftCommunity/RxKeyboard
tags: true
condition: $SDK = $IOS_SDK