forked from techprimate/TPPDF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
174 lines (164 loc) · 6.08 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
os: osx
osx_image: xcode12.2
language: objective-c
cache:
- bundler
env:
global:
- DESTINATION="OS=14.2,name=iPhone 11 Pro"
- WORKSPACE="Example.xcworkspace"
- PROJECT="Example.xcodeproj"
- EXAMPLE_SCHEME="Example"
- secure: y71ScxtfYr3/DI0XKjGz8Bmia33QF9vO5euPJJbQ6kD5ADhEFkici/YZWxDkYtEZocKaUHIR4KYrKya2kTwJC630s2wLg974gERcUATZkWxeJdKgpfZ2aZtqYNPPDxozMTFtiT4kaw5HiD0usJUgnWKqf/XsTW+3BpTJA58xqXChcXulibs9FJvPz6ZVxW+dNW3F5xtC3GCOWk3Rofrw8GJXdCfie/CaJUvxaQVm9hOwKn0Akpe6rvFKlMtfYOLL9yclaMAM+Um7uFVZwhCPHtAzXvpOhA2U/n7eXy/fNpoXxi9zf+epD1iiFmxJQfc1ZO6jkUJEksLXdO3pEMnoe205Bm70QMO6l9gyuq6Z2cUcCBrd2wDzfLYBoOqapgachpTQifotXX6rapm5pCDhg0pMCRihH5moFnsE7jqz2Lo4n68cvSa9+Irr97HmvH+GdF++VIVGK4/GJOErwGUx0Nh32BIeV3p4D+MNm918mAEO7a66a1RiTKNAr1xnrAtCl0k4XeZPCp0uQQ0TEVOxi/vecIS3k6mNMJw5W9tE0F7fun8kHdv6EKrzKIBkyDxMsh2Z5zVqE3wRcCuD+7FgrcmYDUXyk+t1o2cMNs7iZkKFQAG69+qXviTXnaD9Mq0LGP1sx+OQpQKzde9CAC+tgj+1fqD41jqr6zHJqaEOxvs=
stages:
- Tests
- Examples
- Documentation
jobs:
include:
- stage: Tests
name: "iOS Unit Tests"
language: objective-c
env:
- TEST_FRAMEWORK_SCHEME="TPPDF-Package"
- PROJECT="TPPDF.xcodeproj"
script:
- set -o pipefail
- swift package resolve
- set -o pipefail
- xcodebuild -project ${PROJECT}
-scheme ${TEST_FRAMEWORK_SCHEME}
-clonedSourcePackagesDirPath .
-derivedDataPath ${TRAVIS_BUILD_DIR}/derived_data
-sdk iphonesimulator
-destination "${DESTINATION}"
-configuration Debug
ONLY_ACTIVE_ARCH=YES
test | xcpretty
after_success:
- bundle exec slather coverage -t --build-directory ${TRAVIS_BUILD_DIR}/derived_data
- bash <(curl -s https://codecov.io/bash) -f cobertura.xml -X coveragepy -X gco
- stage: Tests
name: "macOS Unit Tests"
language: objective-c
env:
- TEST_FRAMEWORK_SCHEME="TPPDF-Package"
- PROJECT="TPPDF.xcodeproj"
script:
- set -o pipefail
- swift package resolve
- set -o pipefail
- xcodebuild -project ${PROJECT}
-scheme ${TEST_FRAMEWORK_SCHEME}
-clonedSourcePackagesDirPath .
-derivedDataPath ${TRAVIS_BUILD_DIR}/derived_data
-sdk macosx
-destination "platform=macOS"
-configuration Debug
ONLY_ACTIVE_ARCH=YES
test | xcpretty
- stage: Examples
name: "Example iOS - Cocoapods"
language: objective-c
cache:
- bundler
- cocoapods
env:
- ROOT_FOLDER="Example iOS-Cocoapods"
podfile: "${ROOT_FOLDER}/Podfile"
before_script:
- bundle exec pod install --project-directory="${ROOT_FOLDER}"
- cd "${ROOT_FOLDER}"
script:
- set -o pipefail
- xcodebuild -workspace "$WORKSPACE"
-scheme "$EXAMPLE_SCHEME"
-sdk iphonesimulator
-destination "$DESTINATION"
-configuration Debug
-derivedDataPath ${TRAVIS_BUILD_DIR}/derived_data
ONLY_ACTIVE_ARCH=YES
build | xcpretty
- cd ../
- bundle exec pod lib lint --allow-warnings
- stage: Examples
name: "Example iOS - Carthage"
language: objective-c
if: type != pull_request
env:
- ROOT_FOLDER="Example iOS-Carthage"
before_script:
- cd "${ROOT_FOLDER}"
- echo 'github "techprimate/TPPDF" "'$(git rev-parse HEAD)'"' > Cartfile
- ../scripts/carthage.sh update --platform ios --cache-builds
script:
- set -o pipefail
- xcodebuild -project "$PROJECT"
-scheme "$EXAMPLE_SCHEME"
-sdk iphonesimulator
-destination "$DESTINATION"
-configuration Debug
-derivedDataPath ${TRAVIS_BUILD_DIR}/derived_data
ONLY_ACTIVE_ARCH=YES
build | xcpretty
- stage: Examples
name: "Example iOS - Swift PM"
language: objective-c
env:
- ROOT_FOLDER="Example iOS-SwiftPM"
script:
- cd "${ROOT_FOLDER}"
- xcodebuild -resolvePackageDependencies
-project ${PROJECT}
-scheme ${EXAMPLE_SCHEME}
-clonedSourcePackagesDirPath .
-derivedDataPath ${TRAVIS_BUILD_DIR}/derived_data
-configuration Debug | xcpretty
- set -o pipefail
- xcodebuild -project ${PROJECT}
-scheme ${EXAMPLE_SCHEME}
-clonedSourcePackagesDirPath .
-derivedDataPath ${TRAVIS_BUILD_DIR}/derived_data
-sdk iphonesimulator
-destination "${DESTINATION}"
-configuration Debug
ONLY_ACTIVE_ARCH=YES
build | xcpretty
- stage: Examples
name: "Example macOS"
language: objective-c
env:
- ROOT_FOLDER="Example macOS"
script:
- cd "${ROOT_FOLDER}"
- xcodebuild -resolvePackageDependencies
-project ${PROJECT}
-scheme ${EXAMPLE_SCHEME}
-clonedSourcePackagesDirPath .
-derivedDataPath ${TRAVIS_BUILD_DIR}/derived_data
-configuration Debug | xcpretty
- set -o pipefail
- xcodebuild -project ${PROJECT}
-scheme ${EXAMPLE_SCHEME}
-clonedSourcePackagesDirPath .
-derivedDataPath ${TRAVIS_BUILD_DIR}/derived_data
-sdk macosx
-configuration Debug
ONLY_ACTIVE_ARCH=YES
build | xcpretty
- stage: Documentation
name: Generate Documentation
language: objective-c
if: branch = master AND type != pull_request
script:
- git remote update
- git fetch origin gh-pages:gh-pages
- git checkout gh-pages
- git merge master -X theirs --allow-unrelated-histories
- bundle exec jazzy
- git add docs
- git config user.name "Travis"
- git config user.email "[email protected]"
- git commit -m "Updated docs for $TRAVIS_TAG"
- git remote add secure-origin https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
- git push secure-origin gh-pages