-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
67 lines (55 loc) · 1.93 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
67
language: objective-c
osx_image: xcode11.3
cache:
- bundler
- cocoapods
rvm:
- 2.4.3
env:
global:
- WORKSPACE="LonaStudio.xcworkspace"
- SCHEME="LonaStudio"
- DESTINATION="arch=x86_64"
- SDK=macosx10.15
matrix:
- BUILD_EXAMPLE="YES"
- RUN_TESTS="YES"
before_install:
- brew update
- brew outdated carthage || brew upgrade carthage
- brew tap danger/tap
- brew install danger/tap/danger-swift
- BUNDLE_GEMFILE=studio/Gemfile bundle install
- BUNDLE_GEMFILE=studio/Gemfile bundle exec pod repo update
- BUNDLE_GEMFILE=studio/Gemfile bundle exec pod install --project-directory=studio
before_script:
- cd studio
- carthage bootstrap --new-resolver --platform macOS
- cd ..
script:
- set -o pipefail
# Run Danger
- if ! [ -z $DANGER_GITHUB_API_TOKEN ]; then
danger-swift ci --dangerfile=config/Dangerfile.swift;
else
echo "Skipping Danger for External Contributor";
fi
- cd studio
- carthage build --platform macOS
# https://stackoverflow.com/a/58186048
- for ip in $(dig @8.8.8.8 github.com +short); do ssh-keyscan github.com,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts
- xcodebuild -version
- xcodebuild -showsdks
- xcodebuild -list
# Download Swift packages
- xcodebuild -resolvePackageDependencies -workspace "$WORKSPACE" -scheme "$SCHEME"
# Build Lona
- if [ $BUILD_EXAMPLE == "YES" ]; then
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO build | xcpretty;
fi
# Run Tests
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild -workspace "$WORKSPACE" -sdk "$SDK" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO test | xcpretty;
fi
after_success:
- bash <(curl -s https://codecov.io/bash)