blob: 0e10a833b0a7f04ca1aa8480173978ff19136a69 [file] [log] [blame]
Nicolas "Pixel" Noblede87e1c2015-09-25 22:21:38 +02001language: objective-c
Jorge Canizales0ee18c22016-05-20 11:06:58 -07002osx_image: xcode7.3
murgatroid997e14dd82015-02-27 15:06:03 -08003env:
murgatroid9923991602015-02-27 15:39:03 -08004 global:
Nicolas "Pixel" Noblede87e1c2015-09-25 22:21:38 +02005 - CONFIG=opt
6 - TEST=objc
7 - JOBS=1
Yuchen Zengd4824d32016-06-27 10:31:53 -07008 matrix:
Yuchen Zeng431c8322016-06-28 12:16:34 -07009 - SCHEME="RxLibraryUnitTests" WORKSPACE="Tests.xcworkspace"
10 TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
11 INTEROP_SERVER="false"
12 - SCHEME="InteropTestsLocalSSL" WORKSPACE="Tests.xcworkspace"
13 TEST_PATH="src/objective-c/tests" BUILD_ONLY="false" INTEROP_SERVER="true"
14 - SCHEME="InteropTestsLocalCleartext" WORKSPACE="Tests.xcworkspace"
15 TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
Yuchen Zengd4824d32016-06-27 10:31:53 -070016 INTEROP_SERVER="true"
Jorge Canizales34b0cd02016-07-12 11:44:35 -070017 # TODO(jcanizales): Make tests an app project (instead of library), so the following will work.
Yuchen Zeng431c8322016-06-28 12:16:34 -070018 # - SCHEME="InteropTestsRemote" WORKSPACE="Tests.xcworkspace"
19 # TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
20 # INTEROP_SERVER="true"
21 - SCHEME="HelloWorld" WORKSPACE="HelloWorld.xcworkspace"
22 TEST_PATH="examples/objective-c/helloworld" BUILD_ONLY="true"
Yuchen Zengd4824d32016-06-27 10:31:53 -070023 INTEROP_SERVER="false"
Yuchen Zeng431c8322016-06-28 12:16:34 -070024 - SCHEME="RouteGuideClient" WORKSPACE="RouteGuideClient.xcworkspace"
25 TEST_PATH="examples/objective-c/route_guide" BUILD_ONLY="true"
Yuchen Zengd4824d32016-06-27 10:31:53 -070026 INTEROP_SERVER="false"
Yuchen Zeng431c8322016-06-28 12:16:34 -070027 - SCHEME="AuthSample" WORKSPACE="AuthSample.xcworkspace"
28 TEST_PATH="examples/objective-c/auth_sample" BUILD_ONLY="true"
29 INTEROP_SERVER="false"
30 - SCHEME="Sample" WORKSPACE="Sample.xcworkspace"
31 TEST_PATH="src/objective-c/examples/Sample" BUILD_ONLY="true"
32 INTEROP_SERVER="false"
33 - SCHEME="SwiftSample" WORKSPACE="SwiftSample.xcworkspace"
34 TEST_PATH="src/objective-c/examples/SwiftSample" BUILD_ONLY="true"
Yuchen Zengd4824d32016-06-27 10:31:53 -070035 INTEROP_SERVER="false"
Jorge Canizales227c9b22015-10-28 02:23:15 -070036before_install:
Jorge Canizales76628702016-07-13 00:21:01 -070037 # Until Travis upgrades from Cocoapods 0.39, we need to do it here.
Jorge Canizales44477d22016-05-20 11:06:04 -070038 - pod --version
39 - gem uninstall cocoapods -a
Jorge Canizales34b0cd02016-07-12 11:44:35 -070040 - gem install cocoapods -v '1.0.1'
Jorge Canizales44477d22016-05-20 11:06:04 -070041 - pod --version
Jorge Canizales76628702016-07-13 00:21:01 -070042 # Recent pods aren't found if we don't explicitly update Cocoapods' repo.
43 - pod repo update
Jorge Canizales227c9b22015-10-28 02:23:15 -070044 - brew install gflags
Jorge Canizalesbda34762015-10-28 03:48:42 -070045install:
Yuchen Zengd4824d32016-06-27 10:31:53 -070046 - pushd $TEST_PATH
Jorge Canizaleseba2b1c2016-05-20 11:06:33 -070047 - pod install
Jorge Canizalesbda34762015-10-28 03:48:42 -070048 - popd
Jorge Canizales227c9b22015-10-28 02:23:15 -070049before_script:
Yuchen Zengd4824d32016-06-27 10:31:53 -070050 - if [ "${INTEROP_SERVER}" = "true" ]; then
51 make interop_server;
52 (bins/$CONFIG/interop_server --port=5050 &);
53 (bins/$CONFIG/interop_server --port=5051 --use_tls &);
54 fi
55script:
56 - if [ "${BUILD_ONLY}" = "true" ]; then
57 xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME"
Yuchen Zengb34608e2016-06-28 12:22:25 -070058 -sdk iphonesimulator9.3 build;
Yuchen Zengd4824d32016-06-27 10:31:53 -070059 else
60 xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME"
Yuchen Zengb34608e2016-06-28 12:22:25 -070061 -sdk iphonesimulator9.3 test;
Yuchen Zengd4824d32016-06-27 10:31:53 -070062 fi
Nicolas "Pixel" Noble9f1baf72015-02-26 18:50:03 +010063notifications:
Nicolas "Pixel" Nobled30b0052015-03-03 04:30:00 +010064 email: false