.travis.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. #
  2. # Copyright 2017, gRPC Authors All rights reserved.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. # Travis CI build file for gRPC Swift.
  17. language: minimal
  18. jobs:
  19. include:
  20. # Sanity checks for PRs.
  21. - &sanity
  22. stage: "Preflight Checks"
  23. name: "Sanity (license headers and formatting)"
  24. os: linux
  25. dist: bionic
  26. install: ./.travis-install.sh -f # install swiftformat
  27. script: ./.travis-script.sh -s # just sanity
  28. env: SWIFT_VERSION=5.3.3
  29. # Tests for each PR.
  30. - &tests
  31. stage: "Test"
  32. name: "Unit Tests: Ubuntu 18.04 (Swift 5.3)"
  33. os: linux
  34. dist: bionic
  35. install: ./.travis-install.sh -p # install protoc
  36. script: ./.travis-script.sh -t -a # tests with tsan, run allocation tests
  37. env:
  38. - SWIFT_VERSION=5.3.3
  39. - MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_10_requests=531000
  40. - MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_1_request=243000
  41. - MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_10_small_requests=112000
  42. - MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_1_small_request=67000
  43. - MAX_ALLOCS_ALLOWED_embedded_server_unary_1k_rpcs_1_small_request=63000
  44. - MAX_ALLOCS_ALLOWED_unary_1k_ping_pong=234000
  45. - <<: *tests
  46. name: "Unit Tests: Ubuntu 18.04 (Swift 5.2)"
  47. script: ./.travis-script.sh -a # run allocation tests
  48. env:
  49. - SWIFT_VERSION=5.2.5
  50. - MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_10_requests=542000
  51. - MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_1_request=245000
  52. - MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_10_small_requests=112000
  53. - MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_1_small_request=67000
  54. - MAX_ALLOCS_ALLOWED_embedded_server_unary_1k_rpcs_1_small_request=63000
  55. - MAX_ALLOCS_ALLOWED_unary_1k_ping_pong=235000
  56. - <<: *tests
  57. name: "Unit Tests: Xcode 12.2"
  58. os: osx
  59. osx_image: xcode12.2
  60. script: ./.travis-script.sh
  61. - <<: *tests
  62. name: "Unit Tests: Xcode 11.6"
  63. os: osx
  64. osx_image: xcode11.6
  65. script: ./.travis-script.sh
  66. # Interop Tests.
  67. - &interop_tests
  68. stage: "Interoperability Tests"
  69. # Linux
  70. name: "Interoperability Tests: Ubuntu 18.04 (Swift 5.3)"
  71. os: linux
  72. dist: bionic
  73. install: ./.travis-install.sh -p -i # install protoc and interop server
  74. script: ./.travis-script.sh -i # interop tests
  75. env: SWIFT_VERSION=5.3.3
  76. - <<: *interop_tests
  77. name: "Interoperability Tests: Ubuntu 18.04 (Swift 5.2)"
  78. env: SWIFT_VERSION=5.2.5
  79. - <<: *interop_tests
  80. name: "Interoperability Tests: Xcode 12.2"
  81. os: osx
  82. osx_image: xcode12.2
  83. - <<: *interop_tests
  84. name: "Interoperability Tests: Xcode 11.6"
  85. os: osx
  86. osx_image: xcode11.6
  87. allow_failures:
  88. # Swift Development builds are allowed to fail since they're pre-release.
  89. - <<: *development
  90. stages:
  91. - name: "Preflight Checks"
  92. # Always run this stage.
  93. - name: "Test"
  94. # Only run when pushing (or merging) to main
  95. - name: "Interoperability Tests"
  96. if: type = push AND branch = main
  97. cache:
  98. apt: true
  99. directories:
  100. - $HOME/bin_cache
  101. - $HOME/zip_cache
  102. addons:
  103. apt:
  104. packages:
  105. - build-essential
  106. - curl
  107. - unzip
  108. - zip
  109. - pkg-config
  110. - g++
  111. - zlib1g-dev
  112. - python3