-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
48 lines (44 loc) · 1.58 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
# references:
# * http://www.objc.io/issue-6/travis-ci.html
# * https://github.com/supermarin/xcpretty#usage
# Run tests on Ubuntu and macOS
os:
- linux
- osx
# Ubuntu 14.04
dist: trusty
# Generic language as travis doesn't know anything about SPM and Linux
language: generic
sudo: required
osx_image: xcode9.3beta
xcode_sdk: iphonesimulator11.3
# cache: cocoapods
# podfile: Example/Podfile
before_install:
- gem install cocoapods # Since Travis is not always on latest version
- pod repo update
- pod install --project-directory=Example
- if [ $TRAVIS_OS_NAME == "osx" ]; then
echo "macOS build. swiftenv will not be installed.";
else
git clone https://github.com/kylef/swiftenv.git ~/.swiftenv;
export SWIFTENV_ROOT="$HOME/.swiftenv";
export PATH="$SWIFTENV_ROOT/bin:$PATH";
eval "$(swiftenv init -)";
swiftenv install $(cat .swift-version);
fi
script:
# Output something every 10 minutes or Travis kills the job
- while sleep 60; do echo "=====[ $SECONDS seconds still running ]====="; done &
# Actual script
- if [ $TRAVIS_OS_NAME == "osx" ]; then
set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/BigInt.xcworkspace -scheme BigInt-Example -sdk iphonesimulator11.3 -destination 'platform=iOS Simulator,name=iPhone 6,OS=11.3' ONLY_ACTIVE_ARCH=NO | xcpretty;
pod lib lint --allow-warnings;
fi
- swift build
- swift build -c release
- swift test
# Kill background echo job
- kill %1
after_success:
- if [ $TRAVIS_OS_NAME == "osx" ]; then bash <(curl -s https://codecov.io/bash) -X xcodellvm; fi