forked from snipsco/Postal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (34 loc) · 1.37 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
language: objective-c
osx_image: xcode10.2
branches:
only:
- master
env:
global:
- LC_CTYPE=en_US.UTF-8
- LANG=en_US.UTF-8
- WORKSPACE=Postal.xcworkspace
- IOS_FRAMEWORK_SCHEME=Postal-iOS
- MACOS_FRAMEWORK_SCHEME=Postal-macOS
- EXAMPLE_SCHEME=PostalDemo
matrix:
- DESTINATION="OS=12.2,name=iPhone Xʀ" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES"
- DESTINATION="generic/platform=iOS" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="arch=x86_64" SCHEME="$MACOS_FRAMEWORK_SCHEME"RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
before_install:
- gem install cocoapods --pre --no-document --quiet
script:
- set -o pipefail
- xcodebuild -version
- xcodebuild -showsdks
- if [ "$RUN_TESTS" == "YES" ]; then
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" test | xcpretty;
else
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" build | xcpretty;
fi
- if [ "$BUILD_EXAMPLE" == "YES" ]; then
xcodebuild -workspace "$WORKSPACE" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" build CODE_SIGNING_ALLOWED=NO | xcpretty;
fi
- if [ "$POD_LINT" == "YES" ]; then
sed -i.bk "s:\$(SRCROOT)/Postal:$(pwd):g" Postal.podspec && pod lib lint --verbose;
fi