-
Notifications
You must be signed in to change notification settings - Fork 15
/
.travis.yml
executable file
·75 lines (61 loc) · 2.62 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
68
69
70
71
72
73
74
75
language: generic
dist: trusty
sudo: required
matrix:
include:
- os: linux
env:
- JOB=Linux
- os: osx
osx_image: xcode9.2
env:
- JOB=OSX DESTINATION="OS=9.0,name=iPhone 6" SCHEME="Lioness iOS [Double]" RUN_TESTS="NO" BUILD_EXAMPLE="NO" CODE_COV="NO"
- os: osx
osx_image: xcode9.2
env:
- JOB=OSX DESTINATION="arch=x86_64" SCHEME="Lioness macOS Release [Double]" RUN_TESTS="YES" BUILD_EXAMPLE="NO" CODE_COV="YES"
- os: osx
osx_image: xcode9.2
env:
- JOB=OSX DESTINATION="OS=11.2,name=iPhone 7 Plus" SCHEME="Lioness iOS [Double]" RUN_TESTS="NO" BUILD_EXAMPLE="NO" CODE_COV="NO"
before_install:
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
DIR="$(pwd)";
cd ..;
export SWIFT_VERSION=swift-4.0.3-RELEASE;
wget https://swift.org/builds/swift-4.0.3-release/ubuntu1404/$SWIFT_VERSION/$SWIFT_VERSION-ubuntu14.04.tar.gz;
tar xzf $SWIFT_VERSION-ubuntu14.04.tar.gz;
export PATH="${PWD}/${SWIFT_VERSION}-ubuntu14.04/usr/bin:${PATH}";
cd "$DIR";
fi
script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export WORKSPACE=Lioness.xcworkspace;
set -o pipefail;
xcodebuild -version;
xcodebuild -showsdks;
if [ $RUN_TESTS == "YES" ]; then
travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty;
else
travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty;
fi
if [ $RUN_TESTS == "YES" ]; then
travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty;
else
travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty;
fi
if [ $BUILD_EXAMPLE == "YES" ]; then
travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty;
fi
if [ $CODE_COV == "YES" ]; then
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=YES ENABLE_TESTABILITY=YES -enableCodeCoverage YES test;
fi
fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
swift build;
swift test;
fi
after_success:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
bash <(curl -s https://codecov.io/bash);
fi