Imported Upstream version 1.23.0
[platform/upstream/grpc.git] / .travis.yml
1 git:
2   depth: 1
3 language: objective-c
4 osx_image: xcode7.3
5 env:
6   global:
7     - CONFIG=opt
8     - TEST=objc
9     - JOBS=1
10   matrix:
11     - SCHEME="RxLibraryUnitTests"
12       WORKSPACE="Tests.xcworkspace" TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
13       INTEROP_SERVER="false"
14     - SCHEME="InteropTestsLocalSSL"
15       WORKSPACE="Tests.xcworkspace" TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
16       INTEROP_SERVER="true"
17     - SCHEME="InteropTestsLocalCleartext"
18       WORKSPACE="Tests.xcworkspace" TEST_PATH="src/objective-c/tests"  BUILD_ONLY="false"
19       INTEROP_SERVER="true"
20     # TODO(jcanizales): Make tests an app project (instead of library), so the following will work.
21     # - SCHEME="InteropTestsRemote"
22     #   WORKSPACE="Tests.xcworkspace" TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
23     #   INTEROP_SERVER="true"
24     - SCHEME="HelloWorld"
25       WORKSPACE="HelloWorld.xcworkspace" TEST_PATH="examples/objective-c/helloworld"
26       BUILD_ONLY="true" INTEROP_SERVER="false"
27     - SCHEME="RouteGuideClient"
28       WORKSPACE="RouteGuideClient.xcworkspace" TEST_PATH="examples/objective-c/route_guide"
29       BUILD_ONLY="true" INTEROP_SERVER="false"
30     - SCHEME="AuthSample"
31       WORKSPACE="AuthSample.xcworkspace" TEST_PATH="examples/objective-c/auth_sample"
32       BUILD_ONLY="true" INTEROP_SERVER="false"
33     - SCHEME="Sample"
34       WORKSPACE="Sample.xcworkspace" TEST_PATH="src/objective-c/examples/Sample" BUILD_ONLY="true"
35       INTEROP_SERVER="false"
36     - SCHEME="Sample"
37       WORKSPACE="Sample.xcworkspace" TEST_PATH="src/objective-c/examples/Sample" BUILD_ONLY="true"
38       INTEROP_SERVER="false" FRAMEWORKS="YES"
39     - SCHEME="SwiftSample"
40       WORKSPACE="SwiftSample.xcworkspace" TEST_PATH="src/objective-c/examples/SwiftSample"
41       BUILD_ONLY="true" INTEROP_SERVER="false"
42 before_install:
43   # Until Travis upgrades from Cocoapods 0.39, we need to do it here.
44   - pod --version
45   - gem uninstall cocoapods -a
46   - gem install cocoapods -v '1.0.1'
47   - pod --version
48   # Recent pods aren't found if we don't explicitly update Cocoapods' repo.
49   - pod repo update
50   - brew install gflags
51 install:
52   - pushd $TEST_PATH
53   - pod install
54   - popd
55 before_script:
56   - if [ "${INTEROP_SERVER}" = "true" ]; then
57       make interop_server;
58       (bins/$CONFIG/interop_server --port=5050 &);
59       (bins/$CONFIG/interop_server --port=5051 --use_tls &);
60     fi
61 script:
62   - if [ "${BUILD_ONLY}" = "true" ]; then
63       xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME"
64       -sdk iphonesimulator9.3 build;
65     else
66       xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME"
67       -sdk iphonesimulator9.3 test;
68     fi
69 notifications:
70   email: false