aboutsummaryrefslogtreecommitdiffhomepage
path: root/.travis.yml
blob: afc6a753de6d96955f491b46c2557738804ecd01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
language: objective-c
osx_image: xcode7.3
env:
  global:
    - CONFIG=opt
    - TEST=objc
    - JOBS=1
  matrix:
    - TEST_PATH="src/objective-c/tests" WORKSPACE="Tests.xcworkspace"
      SCHEME="RxLibraryUnitTests" BUILD_ONLY="false" INTEROP_SERVER="false"
    - TEST_PATH="src/objective-c/tests" WORKSPACE="Tests.xcworkspace"
      SCHEME="InteropTestsLocalSSL" BUILD_ONLY="false" INTEROP_SERVER="true"
    - TEST_PATH="src/objective-c/tests" WORKSPACE="Tests.xcworkspace"
      SCHEME="InteropTestsLocalCleartext" BUILD_ONLY="false"
      INTEROP_SERVER="true"
    # TODO(jcanizales): Investigate why they time out:
    # - TEST_PATH="src/objective-c/tests" WORKSPACE="Tests.xcworkspace"
    #   SCHEME="InteropTestsRemote" BUILD_ONLY=false INTEROP_SERVER=true
    - TEST_PATH="examples/objective-c/helloworld"
      WORKSPACE="HelloWorld.xcworkspace" SCHEME="HelloWorld" BUILD_ONLY="true"
      INTEROP_SERVER="false"
    - TEST_PATH="examples/objective-c/route_guide"
      WORKSPACE="RouteGuideClient.xcworkspace" SCHEME="RouteGuideClient"
      BUILD_ONLY="true" INTEROP_SERVER="false"
    - TEST_PATH="examples/objective-c/auth_sample"
      WORKSPACE="AuthSample.xcworkspace" SCHEME="AuthSample" BUILD_ONLY="true"
      INTEROP_SERVER="false"
    - TEST_PATH="src/objective-c/examples/Sample" WORKSPACE="Sample.xcworkspace"
      SCHEME="Sample" BUILD_ONLY="true" INTEROP_SERVER="false"
    - TEST_PATH="src/objective-c/examples/SwiftSample"
      WORKSPACE="SwiftSample.xcworkspace" SCHEME="SwiftSample" BUILD_ONLY="true"
      INTEROP_SERVER="false"
before_install:
  - pod --version
  - gem uninstall cocoapods -a
  - gem install cocoapods -v '1.0.0'
  - pod --version
  - brew install gflags
  - pushd third_party/protobuf
  - git checkout v3.0.0-beta-3
  - popd
install:
  - make grpc_objective_c_plugin
  - install bins/opt/grpc_objective_c_plugin /usr/local/bin/protoc-gen-objcgrpc
  - install bins/opt/protobuf/protoc /usr/local/bin/protoc
  - pushd $TEST_PATH
  - pod install
  - popd
before_script:
  - if [ "${INTEROP_SERVER}" = "true" ]; then
      make interop_server;
      (bins/$CONFIG/interop_server --port=5050 &);
      (bins/$CONFIG/interop_server --port=5051 --use_tls &);
    fi
script:
  - if [ "${BUILD_ONLY}" = "true" ]; then
      xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME"
      -sdk iphonesimulator9.3 clean build;
    else
      xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME"
      -sdk iphonesimulator9.3 build test;
    fi
notifications:
  email: false