-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
35 lines (35 loc) · 1.51 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
language: swift
osx_image: xcode9.4
branches:
only:
- master
env:
matrix:
- WORKSPACE_DIR=iOSSDKe2e.xcworkspace SCHEME_NAME=iOSSDKe2e CONFIGURATION="Release"
DESTINATION="generic/platform=iOS" DIRECTORY=$(cd `dirname $0` && pwd) ROOT_DIR="${DIRECTORY}/build"
RELEASE_DIR="${ROOT_DIR}/${CONFIGURATION}-iphoneos" PAYLOAD_DIR="${ROOT_DIR}/Payload"
APP_DIR="${RELEASE_DIR}/${SCHEME_NAME}.app" IPA_DIR="${ROOT_DIR}/${SCHEME_NAME}.ipa"
CUSTOM_ID=objective-c-test-app NUM_RUNS="10"
before_install:
- gem install cocoapods
- sed -i '' "s~\'master\'~'${SDK_BRANCH}'~g" 'Podfile'
- pod install --repo-update
script:
- rm -rf $RELEASE_DIR
- xcodebuild -workspace $WORKSPACE_DIR -scheme $SCHEME_NAME -configuration $CONFIGURATION
-destination $DESTINATION CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO SYMROOT=$ROOT_DIR
NUM_RUNS=$NUM_RUNS clean build | xcpretty
- rm -rf $PAYLOAD_DIR
- mkdir -p $PAYLOAD_DIR
# Copy .app file from the build directory to the Payload directory
- cp -R $APP_DIR $PAYLOAD_DIR
- cd $ROOT_DIR
- zip -r -X ${SCHEME_NAME}.ipa "Payload"
- cd $DIRECTORY
- rm -rf $RELEASE_DIR
- rm -rf $PAYLOAD_DIR
- echo "${IPA_DIR}"
- travis_wait curl -u ${BROWSERSTACK_USERNAME}:${BROWSERSTACK_ACCESS_KEY} -X POST https://api-cloud.browserstack.com/app-automate/upload
-F file=@${IPA_DIR} -F 'data={"custom_id":"'"${CUSTOM_ID}"'"}'
after_success:
- sleep 2 # https://github.com/travis-ci/travis-ci/issues/4725