.travis.yml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. # Tests for each PR.
  21. - &tests
  22. stage: "Test"
  23. name: "Unit Tests: Ubuntu 18.04 (Swift 5.1)"
  24. os: linux
  25. dist: bionic
  26. script: ./.travis-script.sh
  27. env: RUN_INTEROP_TESTS=false SWIFT_VERSION=5.1.4
  28. - &development
  29. <<: *tests
  30. name: "Unit Tests: Ubuntu 18.04 (Swift 5.2 Development Snapshot 2020-03-03)"
  31. env: >-
  32. RUN_INTEROP_TESTS=false
  33. SWIFT_VERSION=5.2
  34. SWIFT_URL=https://swift.org/builds/swift-5.2-branch/ubuntu1804/swift-5.2-DEVELOPMENT-SNAPSHOT-2020-03-03-a/swift-5.2-DEVELOPMENT-SNAPSHOT-2020-03-03-a-ubuntu18.04.tar.gz
  35. - <<: *tests
  36. name: "Unit Tests: Ubuntu 18.04 (Swift 5.0)"
  37. env: RUN_INTEROP_TESTS=false SWIFT_VERSION=5.0.3
  38. - <<: *tests
  39. name: "Unit Tests: Xcode 11.3 (Swift 5.1)"
  40. os: osx
  41. osx_image: xcode11.3
  42. - <<: *tests
  43. name: "Unit Tests: Xcode 10.3 (Swift 5.0)"
  44. os: osx
  45. osx_image: xcode10.3
  46. # Interop Tests.
  47. - &interop_tests
  48. stage: "Interoperability Tests"
  49. # Linux
  50. name: "Interoperability Tests: Ubuntu 18.04 (Swift 5.1)"
  51. os: linux
  52. dist: bionic
  53. script: ./.travis-script.sh
  54. env: RUN_INTEROP_TESTS=true SWIFT_VERSION=5.1.4
  55. - <<: *interop_tests
  56. name: "Interoperability Tests: Ubuntu 18.04 (Swift 5.0)"
  57. env: RUN_INTEROP_TESTS=true SWIFT_VERSION=5.0.3
  58. - <<: *interop_tests
  59. name: "Interoperability Tests: Xcode 11.3 (Swift 5.1)"
  60. os: osx
  61. osx_image: xcode11.3
  62. - <<: *interop_tests
  63. name: "Interoperability Tests: Xcode 10.3 (Swift 5.0)"
  64. os: osx
  65. osx_image: xcode10.3
  66. allow_failures:
  67. # Swift Development builds are allowed to fail since they're pre-release.
  68. - <<: *development
  69. stages:
  70. # Always run this stage.
  71. - name: "Test"
  72. # Only run when pushing (or merging) to nio.
  73. - name: "Interoperability Tests"
  74. if: type = push AND branch = nio
  75. cache:
  76. apt: true
  77. directories:
  78. - .build
  79. - $HOME/bin_cache
  80. addons:
  81. apt:
  82. packages:
  83. - build-essential
  84. - curl
  85. - unzip
  86. - zip
  87. - pkg-config
  88. - g++
  89. - zlib1g-dev
  90. - python3
  91. before_install: ./scripts/license-check.sh
  92. install: ./.travis-install.sh
  93. script: ./.travis-script.sh