forked from VirgilSecurity/virgil-pythia-x
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
109 lines (95 loc) · 5.07 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
language: swift
osx_image: xcode10
env:
global:
- LC_CTYPE=en_US.UTF-8
- PROJECT=VirgilSDKPythia.xcodeproj
- IOS_FRAMEWORK_SCHEME="VirgilSDKPythia iOS"
- MACOS_FRAMEWORK_SCHEME="VirgilSDKPythia macOS"
- TVOS_FRAMEWORK_SCHEME="VirgilSDKPythia tvOS"
- WATCHOS_FRAMEWORK_SCHEME="VirgilSDKPythia watchOS"
- IOS_SDK=iphonesimulator12.0
- MACOS_SDK=macosx10.14
- TVOS_SDK=appletvsimulator12.0
- WATCHOS_SDK=watchsimulator5.0
- FRAMEWORK_NAME=VirgilSDKPythia
matrix:
- DESTINATION="OS=12.0,name=iPhone SE" ENABLE_BUILD="YES" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" TWO_STEP_BUILD_ENABLED="YES" CARTHAGE_PLATFORM_NAME="iOS" RUN_TESTS="YES" PUBLISH_DOCS="NO" PUBLISH_CARTHAGE="NO" POD_LIB_LINT="NO" SWIFT_LINT="NO"
- DESTINATION="arch=x86_64" ENABLE_BUILD="YES" SCHEME="$MACOS_FRAMEWORK_SCHEME" SDK="$MACOS_SDK" TWO_STEP_BUILD_ENABLED="YES" CARTHAGE_PLATFORM_NAME="Mac" RUN_TESTS="YES" PUBLISH_DOCS="NO" PUBLISH_CARTHAGE="NO" POD_LIB_LINT="NO" SWIFT_LINT="NO"
- DESTINATION="OS=12.0,name=Apple TV 4K" ENABLE_BUILD="YES" SCHEME="$TVOS_FRAMEWORK_SCHEME" SDK="$TVOS_SDK" TWO_STEP_BUILD_ENABLED="YES" CARTHAGE_PLATFORM_NAME="tvOS" RUN_TESTS="YES" PUBLISH_DOCS="NO" PUBLISH_CARTHAGE="NO" POD_LIB_LINT="NO" SWIFT_LINT="NO"
- DESTINATION="OS=5.0,name=Apple Watch Series 4 - 44mm" ENABLE_BUILD="YES" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" SDK="$WATCHOS_SDK" TWO_STEP_BUILD_ENABLED="NO" CARTHAGE_PLATFORM_NAME="watchOS" RUN_TESTS="NO" PUBLISH_DOCS="NO" PUBLISH_CARTHAGE="NO" POD_LIB_LINT="NO" SWIFT_LINT="NO"
- DESTINATION="arch=x86_64" ENABLE_BUILD="NO" SCHEME="$MACOS_FRAMEWORK_SCHEME" SDK="$MACOS_SDK" TWO_STEP_BUILD_ENABLED="YES" CARTHAGE_PLATFORM_NAME="Mac" RUN_TESTS="NO" PUBLISH_DOCS="YES" PUBLISH_CARTHAGE="YES" POD_LIB_LINT="YES" SWIFT_LINT="YES"
before_install:
- set -e
- set -o pipefail
- brew update
- brew outdated carthage || brew upgrade carthage
- xcodebuild -version
- xcodebuild -showsdks
script:
- openssl aes-256-cbc -K $encrypted_ceba4cc4fb2f_key -iv $encrypted_ceba4cc4fb2f_iv -in config.tar.enc -out config.tar -d
- tar xvf config.tar
- |
if [ -n "$TRAVIS_TAG" ]; then
cp TestConfig_prod.plist Tests/Data/TestConfig.plist
else
cp TestConfig_stg.plist Tests/Data/TestConfig.plist
fi
- carthage version
- carthage bootstrap --no-build
- |
if [ $SWIFT_LINT == "YES" ]; then
brew outdated swiftlint || brew upgrade swiftlint
swiftlint
fi
- |
if [ $ENABLE_BUILD == "YES" ]; then
if [ $TWO_STEP_BUILD_ENABLED == "YES" ]; then
# Build Framework
xcodebuild -verbose -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug clean build-for-testing | xcpretty;
# Build Framework in Release and Run Tests if specified
if [ $RUN_TESTS == "YES" ]; then
xcodebuild -verbose -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug test-without-building;
fi
else
# Build Framework
xcodebuild -verbose -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release clean build | xcpretty;
fi
fi
# Build with carthage
- if [ $PUBLISH_CARTHAGE == "YES" ]; then
carthage build --no-skip-current --no-use-binaries;
fi
# Check pod lib
- if [ $POD_LIB_LINT == "YES" ]; then
gem install cocoapods --pre;
pod repo update;
pod lib lint;
fi
before_deploy:
- carthage archive
after_success:
# Generate and publish docs
# - if [ -n "${TRAVIS_TAG}" ] && [ $PUBLISH_DOCS == "YES" ]; then
- if [ $PUBLISH_DOCS == "YES" ]; then
./CI/publish-docs.sh;
fi
deploy:
# Upload framework to gh-releases for carthage
- provider: releases
api_key:
secure: imcFZxM53oUJGV6uytl+4HDb9aH5FznMVJmSEAlrmp6iBl+0ehP/pFMYW30k2qkL80ylCfHqu/2t3x44Tyy6hay+n7gZNHbntV+urrdate0Pv/3ZgAJOKf6wg7XIci3GHx4/jb2ArqxZ6mSjBJbc1jxo7sWlHYeO9vTy+Vwl1DtXidOhAmLAofVcQ2XiUp918ztAgpFW3hQaME7Od86dp/62lXwbxOV4rf2jgRSykFcV8kMMMqlcfkeVWPctcLn61LoGzQh4fN54c8cwCtiG7Nz5n0kIgPc1L+iIbOP+B+uNbpTvStzXInoSSz+PN2kpWAhZslutzzWIguRG74t3A4Qg0BNUQuwNgjLc1va8U3Nec9bFaDDuwq47qyOwL4S+/JJ3esQSdl1zn31I3+e591Yhf3+t2eYvgChCgHUBKokIahOiozkHF661cy3lD7nV+n308TNGrPdRr83c+WIYC/Y2Md9+mTsJe/7E+Thcd13E98aMY3M9Sunym/e9BprqvP1XKfxz0NTLmanYoj30n4W4W1rJXcgVo9U2lb8Vwk0qvY583kHdWceZ6ftJ0BdXiPlmD4GWCpzc7keLJpEee6UQo22lcQzD+feiT2I/tVp+yW8Bc2zv6G9NI6v0eYqZakcTkYsNxfWliaWxpzLpxlD1Iq+2mbiNQ6BtirIIr8M=
file: $FRAMEWORK_NAME.framework.zip
skip_cleanup: true
on:
repo: VirgilSecurity/pythia-x
tags: true
condition: $PUBLISH_CARTHAGE = "YES"
# Upload docs to gh-pages
- provider: pages
skip_cleanup: true
github-token: $GITHUB_TOKEN
local_dir: "docs"
on:
tags: true
condition: $PUBLISH_DOCS = "YES"