.travis.yml 3.0 KB

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