blob: 4cdad37c6c52def1afaccc039ec10b42f7fddabc [file] [log] [blame]
Jorge Canizales1e6d1272016-07-13 00:25:18 -07001git:
2 depth: 1
Nicolas "Pixel" Noblede87e1c2015-09-25 22:21:38 +02003language: objective-c
Jorge Canizales0ee18c22016-05-20 11:06:58 -07004osx_image: xcode7.3
murgatroid997e14dd82015-02-27 15:06:03 -08005env:
murgatroid9923991602015-02-27 15:39:03 -08006 global:
Nicolas "Pixel" Noblede87e1c2015-09-25 22:21:38 +02007 - CONFIG=opt
8 - TEST=objc
9 - JOBS=1
Yuchen Zengd4824d32016-06-27 10:31:53 -070010 matrix:
Yuchen Zeng431c8322016-06-28 12:16:34 -070011 - 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 Zengd4824d32016-06-27 10:31:53 -070018 INTEROP_SERVER="true"
Jorge Canizales34b0cd02016-07-12 11:44:35 -070019 # TODO(jcanizales): Make tests an app project (instead of library), so the following will work.
Yuchen Zeng431c8322016-06-28 12:16:34 -070020 # - 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 Zengd4824d32016-06-27 10:31:53 -070025 INTEROP_SERVER="false"
Yuchen Zeng431c8322016-06-28 12:16:34 -070026 - SCHEME="RouteGuideClient" WORKSPACE="RouteGuideClient.xcworkspace"
27 TEST_PATH="examples/objective-c/route_guide" BUILD_ONLY="true"
Yuchen Zengd4824d32016-06-27 10:31:53 -070028 INTEROP_SERVER="false"
Yuchen Zeng431c8322016-06-28 12:16:34 -070029 - 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 Zengd4824d32016-06-27 10:31:53 -070037 INTEROP_SERVER="false"
Jorge Canizales227c9b22015-10-28 02:23:15 -070038before_install:
Jorge Canizales76628702016-07-13 00:21:01 -070039 # Until Travis upgrades from Cocoapods 0.39, we need to do it here.
Jorge Canizales44477d22016-05-20 11:06:04 -070040 - pod --version
41 - gem uninstall cocoapods -a
Jorge Canizales34b0cd02016-07-12 11:44:35 -070042 - gem install cocoapods -v '1.0.1'
Jorge Canizales44477d22016-05-20 11:06:04 -070043 - pod --version
Jorge Canizales76628702016-07-13 00:21:01 -070044 # Recent pods aren't found if we don't explicitly update Cocoapods' repo.
45 - pod repo update
Jorge Canizales227c9b22015-10-28 02:23:15 -070046 - brew install gflags
Jorge Canizalesbda34762015-10-28 03:48:42 -070047install:
Yuchen Zengd4824d32016-06-27 10:31:53 -070048 - pushd $TEST_PATH
Jorge Canizaleseba2b1c2016-05-20 11:06:33 -070049 - pod install
Jorge Canizalesbda34762015-10-28 03:48:42 -070050 - popd
Jorge Canizales227c9b22015-10-28 02:23:15 -070051before_script:
Yuchen Zengd4824d32016-06-27 10:31:53 -070052 - 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
57script:
58 - if [ "${BUILD_ONLY}" = "true" ]; then
59 xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME"
Yuchen Zengb34608e2016-06-28 12:22:25 -070060 -sdk iphonesimulator9.3 build;
Yuchen Zengd4824d32016-06-27 10:31:53 -070061 else
62 xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME"
Yuchen Zengb34608e2016-06-28 12:22:25 -070063 -sdk iphonesimulator9.3 test;
Yuchen Zengd4824d32016-06-27 10:31:53 -070064 fi
Nicolas "Pixel" Noble9f1baf72015-02-26 18:50:03 +010065notifications:
Nicolas "Pixel" Nobled30b0052015-03-03 04:30:00 +010066 email: false