diff options
author | Gil <mcg@google.com> | 2018-03-07 08:44:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-07 08:44:54 -0800 |
commit | 5930ad2feebc6628cbaec89b8f6a6146ed6afe5d (patch) | |
tree | 9f3c4efa8ad9dbcf9041302e9654719a417035cd /test.sh | |
parent | 8ef0f1490a72fd700f609dc9971ec16868d6747b (diff) |
Factor out a universal build script (#884)
* Add a universal build script
* Rewrite test.sh in terms of universal build
Diffstat (limited to 'test.sh')
-rwxr-xr-x | test.sh | 61 |
1 files changed, 5 insertions, 56 deletions
@@ -13,60 +13,9 @@ set -eo pipefail -test_iOS() { - xcodebuild \ - -workspace Example/Firebase.xcworkspace \ - -scheme AllUnitTests_iOS \ - -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 7' \ - build \ - test \ - ONLY_ACTIVE_ARCH=YES \ - CODE_SIGNING_REQUIRED=NO \ - | xcpretty -} +top_dir=$(dirname "${BASH_SOURCE[0]}") +scripts_dir="$top_dir/scripts" -test_macOS() { - xcodebuild \ - -workspace Example/Firebase.xcworkspace \ - -scheme AllUnitTests_macOS \ - -sdk macosx \ - -destination 'platform=OS X,arch=x86_64' \ - build \ - test \ - ONLY_ACTIVE_ARCH=YES \ - CODE_SIGNING_REQUIRED=NO \ - | xcpretty -} - -test_tvOS() { - xcodebuild \ - -workspace Example/Firebase.xcworkspace \ - -scheme AllUnitTests_tvOS \ - -sdk appletvsimulator \ - -destination 'platform=tvOS Simulator,name=Apple TV' \ - build \ - test \ - ONLY_ACTIVE_ARCH=YES \ - CODE_SIGNING_REQUIRED=NO \ - | xcpretty -} - -test_iOS; RESULT=$? - -if [ $RESULT != 0 ]; then exit $RESULT; fi - -test_macOS; RESULT=$? - -if [ $RESULT == 65 ]; then - echo "xcodebuild exited with 65, retrying" - sleep 5 - - test_macOS; RESULT=$? -fi - -if [ $RESULT != 0 ]; then exit $RESULT; fi - -test_tvOS; RESULT=$? - -if [ $RESULT != 0 ]; then exit $RESULT; fi +$scripts_dir/build.sh Firebase iOS +$scripts_dir/build.sh Firebase macOS +$scripts_dir/build.sh Firebase tvOS |