-
Notifications
You must be signed in to change notification settings - Fork 105
/
.travis.yml
79 lines (70 loc) · 4.25 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
language: objective-c
matrix:
include:
- osx_image: xcode12.5
# - osx_image: xcode8.3
before_install:
# - brew update
#- if brew outdated | grep -qx xctool; then brew upgrade xctool; fi
# install
# - rvm use 2.2.2 --install --binary --fuzzy
# - gem install cocoapods --no-rdoc --no-ri --no-document --quiet
- gem install xcpretty --no-document
# - pod --version
# - pod setup --silent > /dev/null
# - pod repo update --silent
- xcpretty --version
- xcodebuild -version
- xcodebuild -showsdks
script:
# 32-bit tests
# - xctool -sdk iphonesimulator clean test -destination "name=iPhone 5" -find-target "JWTTests"
# 64-bit tests
# - xctool -sdk iphonesimulator clean test -destination "name=iPhone 5s" -find-target "JWTTests"
# Thanks CocoaLumberjack!
- set -o pipefail
- echo Check if the library described by the podspec can be built
- pod lib lint --allow-warnings
# Unused.
# - echo "Build as dynamic framework (ObjectiveC), each platform (osx, ios)"
# - xcodebuild clean build -project Framework/JWT.xcodeproj -scheme 'JWT-macOS' -configuration Release -sdk macosx | xcpretty -c
# - xcodebuild clean build -project Framework/JWT.xcodeproj -scheme 'JWT-iOS' -configuration Release -sdk iphonesimulator | xcpretty -c
# - echo "Build as dynamic framework (Swift), each platform (osx, ios)"
# - xcodebuild clean build -project Framework/JWT.xcodeproj -scheme 'JWT-macOS-Swift' -configuration Release -sdk macosx | xcpretty -c
# - xcodebuild clean build -project Framework/JWT.xcodeproj -scheme 'JWT-iOS-Swift' -configuration Release -sdk iphonesimulator | xcpretty -c
# Framework.
- echo "Build dynamic universal for each platform (osx, ios)"
- xcodebuild clean build -project Framework/JWT.xcodeproj -scheme 'JWT' -configuration Release -sdk macosx | xcpretty -c
- xcodebuild clean build -project Framework/JWT.xcodeproj -scheme 'JWT' -configuration Release -sdk iphonesimulator | xcpretty -c
- xcodebuild clean build -project Framework/JWT.xcodeproj -scheme 'JWT' -configuration Release -sdk appletvsimulator | xcpretty -c
- xcodebuild clean build -project Framework/JWT.xcodeproj -scheme 'JWT' -configuration Release -sdk watchsimulator | xcpretty -c
# Static Library.
# We need to change order in case of xcodebuild bug.
# xcodebuild does not remove static library on -clean action.
# In this case
# static library after framework is ok.
# framework after static library is bad.
# beer and wine order, heh.
- echo "Build iOS Static library"
- xcodebuild clean build -project Framework/JWT.xcodeproj -scheme 'JWT-Static' -configuration Release -sdk macosx | xcpretty -c
- xcodebuild clean build -project Framework/JWT.xcodeproj -scheme 'JWT-Static' -configuration Release -sdk iphonesimulator | xcpretty -c
- xcodebuild clean build -project Framework/JWT.xcodeproj -scheme 'JWT-Static' -configuration Release -sdk appletvsimulator | xcpretty -c
- xcodebuild clean build -project Framework/JWT.xcodeproj -scheme 'JWT-Static' -configuration Release -sdk watchsimulator | xcpretty -c
# Tests.
- echo Run iOS Tests
# 32-bit tests
# TODO: Add xsimctl invocation to install iPhone 5 or 5s simulators.
# - echo 32-bit tests
# - xcodebuild test -project 'Tests/Tests.xcodeproj' -scheme 'iOS_Tests' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 5,OS=latest' | xcpretty -c
# # 64-bit tests
- echo Run iOS 64-bit tests
- xcodebuild test -project 'Tests/Tests.xcodeproj' -scheme 'iOS_Tests' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11,OS=latest' | xcpretty -c
# mac OS tests
- echo Run Mac OS tests
- xcodebuild test -project 'Tests/Tests.xcodeproj' -scheme 'macOS_Tests' -sdk macosx | xcpretty -c
# tvOS tests
- echo Run tvOS tests
- xcodebuild test -project 'Tests/Tests.xcodeproj' -scheme 'tvOS_Tests' -sdk appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV,OS=latest' | xcpretty -c
# watchOS tests
- echo Run watchOS tests
- xcodebuild test -project 'Tests/Tests.xcodeproj' -scheme 'watchOS_Tests' -sdk watchsimulator -destination 'platform=watchOS Simulator,name=Apple Watch Series 6 - 44mm,OS=latest'