Skip to content

Commit

Permalink
[MB-1137] Update CI scripts to use Xcode 6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rlepinski committed Apr 17, 2015
1 parent ac3f93d commit 930be4b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
5 changes: 3 additions & 2 deletions scripts/configure-xcode-version.sh
@@ -1,6 +1,6 @@
#!/bin/bash -ex

# Available Xcode Apps (March 9 2015)
# Available Xcode Apps (April 17 2015)
# XCODE_5_0_2_APP
# XCODE_5_1_1_APP
# XCODE_6_BETA_4_APP
Expand All @@ -11,14 +11,15 @@
# XCODE_6_0_1_APP
# XCODE_6_1_APP
# XCODE_6_2_APP
# XCODE_6_3_APP

# Additional versions should be set up on the build machine, and your own for testing
# Your ~/.bash_profile might look something like:
# export XCODE_5_0_2_APP=/Applications/Xcode-5.0.2.app
# export XCODE_5_1_1_APP=/Applications/Xcode-5.1.1.app
# export XCODE_6_BETA_5_APP=/Applications/Xcode6-Beta5.app

XCODE_APP=$XCODE_6_2_APP
XCODE_APP=$XCODE_6_3_APP

if [ -z "$XCODE_APP" ]; then
echo "Looks like you're missing Xcode!"
Expand Down
24 changes: 15 additions & 9 deletions scripts/run-ci-tasks.sh
Expand Up @@ -4,6 +4,12 @@ set -o pipefail
SCRIPT_DIRECTORY=`dirname "$0"`
ROOT_PATH=`dirname "${0}"`/../

# Destination for tests
TEST_DESTINATION='platform=iOS Simulator,OS=latest,name=Resizable iPhone'

# Target iOS SDK when building the projects
TARGET_SDK='iphonesimulator'

start_time=`date +%s`

source "${SCRIPT_DIRECTORY}/configure-xcode-version.sh"
Expand All @@ -18,19 +24,19 @@ DERIVED_DATA=$(mktemp -d /tmp/ci-derived-data-XXXXX)

# Build Distrbution Projects First
# InboxSample targets
xcrun xcodebuild -project "${ROOT_PATH}/InboxSample/InboxSample.xcodeproj" -configuration Debug -sdk iphonesimulator8.2
xcrun xcodebuild -project "${ROOT_PATH}/InboxSample/InboxSample.xcodeproj" -configuration Debug -sdk $TARGET_SDK

# PushSample targets
xcrun xcodebuild -project "${ROOT_PATH}/PushSample/PushSample.xcodeproj" -configuration Debug -sdk iphonesimulator8.2
xcrun xcodebuild -project "${ROOT_PATH}/PushSample/PushSample.xcodeproj" -configuration Debug -sdk $TARGET_SDK

# Build 'lib' projects and targets
# build InboxSampleLib targets - use scheme so that AirshipLib is built
xcrun xcodebuild -project "${ROOT_PATH}/InboxSample/InboxSampleLib.xcodeproj" -derivedDataPath "${DERIVED_DATA}" -scheme InboxSample -configuration Debug -sdk iphonesimulator8.2
xcrun xcodebuild -project "${ROOT_PATH}/InboxSample/InboxSampleLib.xcodeproj" -derivedDataPath "${DERIVED_DATA}" -scheme InboxSampleKit -configuration Debug -sdk iphonesimulator8.2
xcrun xcodebuild -project "${ROOT_PATH}/InboxSample/InboxSampleLib.xcodeproj" -derivedDataPath "${DERIVED_DATA}" -scheme InboxSample -configuration Debug -sdk $TARGET_SDK
xcrun xcodebuild -project "${ROOT_PATH}/InboxSample/InboxSampleLib.xcodeproj" -derivedDataPath "${DERIVED_DATA}" -scheme InboxSampleKit -configuration Debug -sdk $TARGET_SDK

# build PushSampleLib targets - use scheme so that AirshipLib is built
xcrun xcodebuild -project "${ROOT_PATH}/PushSample/PushSampleLib.xcodeproj" -derivedDataPath "${DERIVED_DATA}" -scheme PushSample -configuration Debug -sdk iphonesimulator8.2
xcrun xcodebuild -project "${ROOT_PATH}/PushSample/PushSampleLib.xcodeproj" -derivedDataPath "${DERIVED_DATA}" -scheme PushSampleKit -configuration Debug -sdk iphonesimulator8.2
xcrun xcodebuild -project "${ROOT_PATH}/PushSample/PushSampleLib.xcodeproj" -derivedDataPath "${DERIVED_DATA}" -scheme PushSample -configuration Debug -sdk $TARGET_SDK
xcrun xcodebuild -project "${ROOT_PATH}/PushSample/PushSampleLib.xcodeproj" -derivedDataPath "${DERIVED_DATA}" -scheme PushSampleKit -configuration Debug -sdk $TARGET_SDK

##################################################################################################
# Run the Tests!
Expand All @@ -42,13 +48,13 @@ rm -rf "${ROOT_PATH}/test-output"
mkdir -p "${ROOT_PATH}/test-output"

# Run our Logic Tests
xcrun xcodebuild -destination 'platform=iOS Simulator,OS=8.2,name=iPhone 5s' -project "${ROOT_PATH}/AirshipLib/AirshipLib.xcodeproj" -derivedDataPath "${DERIVED_DATA}" -scheme AirshipLib test | tee "${ROOT_PATH}/test-output/XCTEST-LOGIC.out"
xcrun xcodebuild -destination "${TEST_DESTINATION}" -project "${ROOT_PATH}/AirshipLib/AirshipLib.xcodeproj" -derivedDataPath "${DERIVED_DATA}" -scheme AirshipLib test | tee "${ROOT_PATH}/test-output/XCTEST-LOGIC.out"

# Run AirshipKit Tests
xcrun xcodebuild -destination 'platform=iOS Simulator,OS=8.2,name=iPhone 5s' -project "${ROOT_PATH}/AirshipLib/AirshipLib.xcodeproj" -derivedDataPath "${DERIVED_DATA}" -scheme AirshipKit test | tee "${ROOT_PATH}/test-output/XCTEST-AIRSHIPKIT.out"
xcrun xcodebuild -destination "${TEST_DESTINATION}" -project "${ROOT_PATH}/AirshipLib/AirshipLib.xcodeproj" -derivedDataPath "${DERIVED_DATA}" -scheme AirshipKit test | tee "${ROOT_PATH}/test-output/XCTEST-AIRSHIPKIT.out"

# Run our Application Tests
xcrun xcodebuild -destination 'platform=iOS Simulator,OS=8.2,name=iPhone 5s' -project "${ROOT_PATH}/PushSample/PushSampleLib.xcodeproj" -derivedDataPath "${DERIVED_DATA}" -scheme PushSample test | tee "${ROOT_PATH}/test-output/XCTEST-APPLICATION.out"
xcrun xcodebuild -destination "${TEST_DESTINATION}" -project "${ROOT_PATH}/PushSample/PushSampleLib.xcodeproj" -derivedDataPath "${DERIVED_DATA}" -scheme PushSample test | tee "${ROOT_PATH}/test-output/XCTEST-APPLICATION.out"

# delete derived data
rm -rf "${DERIVED_DATA}"
Expand Down

0 comments on commit 930be4b

Please sign in to comment.