.travis.yml 2.8 KB

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