Skip to content

Commit 8ac3c5d

Browse files
committed
Add .travis.yml
1 parent a8d378a commit 8ac3c5d

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.travis.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
osx_image: xcode10.2
2+
language: objective-c
3+
sudo: required
4+
env:
5+
global:
6+
- PROJECT="Testables.xcodeproj"
7+
- SCHEME="Testables-Package"
8+
- IOS_SDK="iphonesimulator12.2"
9+
- MACOS_SDK="macosx10.14"
10+
- TVOS_SDK="appletvsimulator12.2"
11+
- WATCHOS_SDK="watchsimulator5.2"
12+
- FRAMEWORK="Testables"
13+
matrix:
14+
- SDK="$IOS_SDK" TEST=1 DESTINATION="platform=iOS Simulator,name=iPhone XS,OS=12.2"
15+
- SDK="$MACOS_SDK" TEST=1 DESTINATION="arch=x86_64"
16+
- SDK="$TVOS_SDK" TEST=1 DESTINATION="OS=12.2,name=Apple TV"
17+
- SDK="$WATCHOS_SDK" TEST=0 DESTINATION="OS=5.2,name=Apple Watch Series 3 - 42mm"
18+
19+
before_script:
20+
- set -o pipefail
21+
- swift package generate-xcodeproj --enable-code-coverage
22+
23+
script:
24+
- if [ $TEST == 1 ]; then
25+
xcodebuild clean build test
26+
-project "$PROJECT"
27+
-scheme "$SCHEME"
28+
-sdk "$SDK"
29+
-destination "$DESTINATION"
30+
-configuration Debug
31+
-enableCodeCoverage YES
32+
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty -c;
33+
else
34+
xcodebuild clean build
35+
-project "$PROJECT"
36+
-scheme "$SCHEME"
37+
-sdk "$SDK"
38+
-destination "$DESTINATION"
39+
-configuration Debug
40+
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty -c;
41+
fi
42+
43+
after_success:
44+
- if [ $TEST == 1 ]; then
45+
bash <(curl -s https://codecov.io/bash) -X xcodeplist -J 'Testables';
46+
fi

0 commit comments

Comments
 (0)