.travis.yml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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_embedded_server_bidi_1k_rpcs_10_small_requests=112000
  40. - MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_1_small_request=67000
  41. - MAX_ALLOCS_ALLOWED_embedded_server_unary_1k_rpcs_1_small_request=63000
  42. - <<: *tests
  43. name: "Unit Tests: Ubuntu 18.04 (Swift 5.2)"
  44. script: ./.travis-script.sh -a # run allocation tests
  45. env:
  46. - SWIFT_VERSION=5.2.5
  47. - MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_10_small_requests=112000
  48. - MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_1_small_request=67000
  49. - MAX_ALLOCS_ALLOWED_embedded_server_unary_1k_rpcs_1_small_request=63000
  50. - <<: *tests
  51. name: "Unit Tests: Xcode 12.2"
  52. os: osx
  53. osx_image: xcode12.2
  54. - <<: *tests
  55. name: "Unit Tests: Xcode 11.6"
  56. os: osx
  57. osx_image: xcode11.6
  58. # Interop Tests.
  59. - &interop_tests
  60. stage: "Interoperability Tests"
  61. # Linux
  62. name: "Interoperability Tests: Ubuntu 18.04 (Swift 5.3)"
  63. os: linux
  64. dist: bionic
  65. install: ./.travis-install.sh -p -i # install protoc and interop server
  66. script: ./.travis-script.sh -i # interop tests
  67. env: SWIFT_VERSION=5.3.3
  68. - <<: *interop_tests
  69. name: "Interoperability Tests: Ubuntu 18.04 (Swift 5.2)"
  70. env: SWIFT_VERSION=5.2.5
  71. - <<: *interop_tests
  72. name: "Interoperability Tests: Xcode 12.2"
  73. os: osx
  74. osx_image: xcode12.2
  75. - <<: *interop_tests
  76. name: "Interoperability Tests: Xcode 11.6"
  77. os: osx
  78. osx_image: xcode11.6
  79. allow_failures:
  80. # Swift Development builds are allowed to fail since they're pre-release.
  81. - <<: *development
  82. stages:
  83. - name: "Preflight Checks"
  84. # Always run this stage.
  85. - name: "Test"
  86. # Only run when pushing (or merging) to main
  87. - name: "Interoperability Tests"
  88. if: type = push AND branch = main
  89. cache:
  90. apt: true
  91. directories:
  92. - $HOME/bin_cache
  93. - $HOME/zip_cache
  94. addons:
  95. apt:
  96. packages:
  97. - build-essential
  98. - curl
  99. - unzip
  100. - zip
  101. - pkg-config
  102. - g++
  103. - zlib1g-dev
  104. - python3