Jorge Canizales | 1e6d127 | 2016-07-13 00:25:18 -0700 | [diff] [blame] | 1 | git: |
| 2 | depth: 1 |
Nicolas "Pixel" Noble | de87e1c | 2015-09-25 22:21:38 +0200 | [diff] [blame] | 3 | language: objective-c |
Jorge Canizales | 0ee18c2 | 2016-05-20 11:06:58 -0700 | [diff] [blame] | 4 | osx_image: xcode7.3 |
murgatroid99 | 7e14dd8 | 2015-02-27 15:06:03 -0800 | [diff] [blame] | 5 | env: |
murgatroid99 | 2399160 | 2015-02-27 15:39:03 -0800 | [diff] [blame] | 6 | global: |
Nicolas "Pixel" Noble | de87e1c | 2015-09-25 22:21:38 +0200 | [diff] [blame] | 7 | - CONFIG=opt |
| 8 | - TEST=objc |
| 9 | - JOBS=1 |
Yuchen Zeng | d4824d3 | 2016-06-27 10:31:53 -0700 | [diff] [blame] | 10 | matrix: |
Yuchen Zeng | 431c832 | 2016-06-28 12:16:34 -0700 | [diff] [blame] | 11 | - SCHEME="RxLibraryUnitTests" WORKSPACE="Tests.xcworkspace" |
| 12 | TEST_PATH="src/objective-c/tests" BUILD_ONLY="false" |
| 13 | INTEROP_SERVER="false" |
| 14 | - SCHEME="InteropTestsLocalSSL" WORKSPACE="Tests.xcworkspace" |
| 15 | TEST_PATH="src/objective-c/tests" BUILD_ONLY="false" INTEROP_SERVER="true" |
| 16 | - SCHEME="InteropTestsLocalCleartext" WORKSPACE="Tests.xcworkspace" |
| 17 | TEST_PATH="src/objective-c/tests" BUILD_ONLY="false" |
Yuchen Zeng | d4824d3 | 2016-06-27 10:31:53 -0700 | [diff] [blame] | 18 | INTEROP_SERVER="true" |
Jorge Canizales | 34b0cd0 | 2016-07-12 11:44:35 -0700 | [diff] [blame] | 19 | # TODO(jcanizales): Make tests an app project (instead of library), so the following will work. |
Yuchen Zeng | 431c832 | 2016-06-28 12:16:34 -0700 | [diff] [blame] | 20 | # - SCHEME="InteropTestsRemote" WORKSPACE="Tests.xcworkspace" |
| 21 | # TEST_PATH="src/objective-c/tests" BUILD_ONLY="false" |
| 22 | # INTEROP_SERVER="true" |
| 23 | - SCHEME="HelloWorld" WORKSPACE="HelloWorld.xcworkspace" |
| 24 | TEST_PATH="examples/objective-c/helloworld" BUILD_ONLY="true" |
Yuchen Zeng | d4824d3 | 2016-06-27 10:31:53 -0700 | [diff] [blame] | 25 | INTEROP_SERVER="false" |
Yuchen Zeng | 431c832 | 2016-06-28 12:16:34 -0700 | [diff] [blame] | 26 | - SCHEME="RouteGuideClient" WORKSPACE="RouteGuideClient.xcworkspace" |
| 27 | TEST_PATH="examples/objective-c/route_guide" BUILD_ONLY="true" |
Yuchen Zeng | d4824d3 | 2016-06-27 10:31:53 -0700 | [diff] [blame] | 28 | INTEROP_SERVER="false" |
Yuchen Zeng | 431c832 | 2016-06-28 12:16:34 -0700 | [diff] [blame] | 29 | - SCHEME="AuthSample" WORKSPACE="AuthSample.xcworkspace" |
| 30 | TEST_PATH="examples/objective-c/auth_sample" BUILD_ONLY="true" |
| 31 | INTEROP_SERVER="false" |
| 32 | - SCHEME="Sample" WORKSPACE="Sample.xcworkspace" |
| 33 | TEST_PATH="src/objective-c/examples/Sample" BUILD_ONLY="true" |
| 34 | INTEROP_SERVER="false" |
| 35 | - SCHEME="SwiftSample" WORKSPACE="SwiftSample.xcworkspace" |
| 36 | TEST_PATH="src/objective-c/examples/SwiftSample" BUILD_ONLY="true" |
Yuchen Zeng | d4824d3 | 2016-06-27 10:31:53 -0700 | [diff] [blame] | 37 | INTEROP_SERVER="false" |
Jorge Canizales | 227c9b2 | 2015-10-28 02:23:15 -0700 | [diff] [blame] | 38 | before_install: |
Jorge Canizales | 7662870 | 2016-07-13 00:21:01 -0700 | [diff] [blame] | 39 | # Until Travis upgrades from Cocoapods 0.39, we need to do it here. |
Jorge Canizales | 44477d2 | 2016-05-20 11:06:04 -0700 | [diff] [blame] | 40 | - pod --version |
| 41 | - gem uninstall cocoapods -a |
Jorge Canizales | 34b0cd0 | 2016-07-12 11:44:35 -0700 | [diff] [blame] | 42 | - gem install cocoapods -v '1.0.1' |
Jorge Canizales | 44477d2 | 2016-05-20 11:06:04 -0700 | [diff] [blame] | 43 | - pod --version |
Jorge Canizales | 7662870 | 2016-07-13 00:21:01 -0700 | [diff] [blame] | 44 | # Recent pods aren't found if we don't explicitly update Cocoapods' repo. |
| 45 | - pod repo update |
Jorge Canizales | 227c9b2 | 2015-10-28 02:23:15 -0700 | [diff] [blame] | 46 | - brew install gflags |
Jorge Canizales | bda3476 | 2015-10-28 03:48:42 -0700 | [diff] [blame] | 47 | install: |
Yuchen Zeng | d4824d3 | 2016-06-27 10:31:53 -0700 | [diff] [blame] | 48 | - pushd $TEST_PATH |
Jorge Canizales | eba2b1c | 2016-05-20 11:06:33 -0700 | [diff] [blame] | 49 | - pod install |
Jorge Canizales | bda3476 | 2015-10-28 03:48:42 -0700 | [diff] [blame] | 50 | - popd |
Jorge Canizales | 227c9b2 | 2015-10-28 02:23:15 -0700 | [diff] [blame] | 51 | before_script: |
Yuchen Zeng | d4824d3 | 2016-06-27 10:31:53 -0700 | [diff] [blame] | 52 | - if [ "${INTEROP_SERVER}" = "true" ]; then |
| 53 | make interop_server; |
| 54 | (bins/$CONFIG/interop_server --port=5050 &); |
| 55 | (bins/$CONFIG/interop_server --port=5051 --use_tls &); |
| 56 | fi |
| 57 | script: |
| 58 | - if [ "${BUILD_ONLY}" = "true" ]; then |
| 59 | xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME" |
Yuchen Zeng | b34608e | 2016-06-28 12:22:25 -0700 | [diff] [blame] | 60 | -sdk iphonesimulator9.3 build; |
Yuchen Zeng | d4824d3 | 2016-06-27 10:31:53 -0700 | [diff] [blame] | 61 | else |
| 62 | xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME" |
Yuchen Zeng | b34608e | 2016-06-28 12:22:25 -0700 | [diff] [blame] | 63 | -sdk iphonesimulator9.3 test; |
Yuchen Zeng | d4824d3 | 2016-06-27 10:31:53 -0700 | [diff] [blame] | 64 | fi |
Nicolas "Pixel" Noble | 9f1baf7 | 2015-02-26 18:50:03 +0100 | [diff] [blame] | 65 | notifications: |
Nicolas "Pixel" Noble | d30b005 | 2015-03-03 04:30:00 +0100 | [diff] [blame] | 66 | email: false |