ci.yaml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. name: CI
  2. on:
  3. push:
  4. branches: [main]
  5. pull_request:
  6. branches: [main]
  7. jobs:
  8. preflight:
  9. name: License Header and Formatting Checks
  10. runs-on: ubuntu-latest
  11. container:
  12. image: swift
  13. steps:
  14. - uses: actions/checkout@v3
  15. - name: "Formatting and License Headers check"
  16. run: |
  17. ./scripts/sanity.sh
  18. unit-tests:
  19. strategy:
  20. fail-fast: false
  21. matrix:
  22. include:
  23. - image: swiftlang/swift:nightly-jammy
  24. # No TSAN because of: https://github.com/apple/swift/issues/59068
  25. # swift-test-flags: "--sanitize=thread"
  26. - image: swift:5.9-jammy
  27. # No TSAN because of: https://github.com/apple/swift/issues/59068
  28. # swift-test-flags: "--sanitize=thread"
  29. - image: swift:5.8-focal
  30. # No TSAN because of: https://github.com/apple/swift/issues/59068
  31. # swift-test-flags: "--sanitize=thread"
  32. - image: swift:5.7-focal
  33. # No TSAN because of: https://github.com/apple/swift/issues/59068
  34. # swift-test-flags: "--sanitize=thread"
  35. name: Build and Test on ${{ matrix.image }}
  36. runs-on: ubuntu-latest
  37. container:
  38. image: ${{ matrix.image }}
  39. steps:
  40. - uses: actions/checkout@v3
  41. - name: 🔧 Build
  42. run: swift build ${{ matrix.swift-build-flags }}
  43. timeout-minutes: 20
  44. - name: 🧪 Test
  45. run: swift test ${{ matrix.swift-test-flags }}
  46. timeout-minutes: 20
  47. performance-tests:
  48. strategy:
  49. fail-fast: false
  50. matrix:
  51. include:
  52. - image: swiftlang/swift:nightly-jammy
  53. env:
  54. MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_10_requests: 323000
  55. MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_1_request: 161000
  56. MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_10_small_requests: 110000
  57. MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_1_small_request: 65000
  58. MAX_ALLOCS_ALLOWED_embedded_server_unary_1k_rpcs_1_small_request: 61000
  59. MAX_ALLOCS_ALLOWED_unary_1k_ping_pong: 163000
  60. MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_client: 170000
  61. MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_server: 170000
  62. - image: swift:5.9-jammy
  63. env:
  64. MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_10_requests: 323000
  65. MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_1_request: 161000
  66. MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_10_small_requests: 110000
  67. MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_1_small_request: 65000
  68. MAX_ALLOCS_ALLOWED_embedded_server_unary_1k_rpcs_1_small_request: 61000
  69. MAX_ALLOCS_ALLOWED_unary_1k_ping_pong: 163000
  70. MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_client: 170000
  71. MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_server: 170000
  72. - image: swift:5.8-focal
  73. env:
  74. MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_10_requests: 323000
  75. MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_1_request: 161000
  76. MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_10_small_requests: 110000
  77. MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_1_small_request: 65000
  78. MAX_ALLOCS_ALLOWED_embedded_server_unary_1k_rpcs_1_small_request: 61000
  79. MAX_ALLOCS_ALLOWED_unary_1k_ping_pong: 163000
  80. MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_client: 170000
  81. MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_server: 170000
  82. - image: swift:5.7-focal
  83. env:
  84. MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_10_requests: 323000
  85. MAX_ALLOCS_ALLOWED_bidi_1k_rpcs_1_request: 161000
  86. MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_10_small_requests: 110000
  87. MAX_ALLOCS_ALLOWED_embedded_server_bidi_1k_rpcs_1_small_request: 65000
  88. MAX_ALLOCS_ALLOWED_embedded_server_unary_1k_rpcs_1_small_request: 61000
  89. MAX_ALLOCS_ALLOWED_unary_1k_ping_pong: 163000
  90. MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_client: 170000
  91. MAX_ALLOCS_ALLOWED_unary_1k_ping_pong_interceptors_server: 170000
  92. name: Performance Tests on ${{ matrix.image }}
  93. runs-on: ubuntu-latest
  94. container:
  95. image: ${{ matrix.image }}
  96. steps:
  97. - uses: actions/checkout@v3
  98. - name: 🧮 Allocation Counting Tests
  99. run: ./Performance/allocations/test-allocation-counts.sh
  100. env: ${{ matrix.env }}
  101. timeout-minutes: 20
  102. integration-tests:
  103. strategy:
  104. fail-fast: false
  105. matrix:
  106. include:
  107. - image: swiftlang/swift:nightly-jammy
  108. - image: swift:5.9-jammy
  109. - image: swift:5.8-focal
  110. - image: swift:5.7-focal
  111. name: Integration Tests on ${{ matrix.image }}
  112. runs-on: ubuntu-latest
  113. container:
  114. image: ${{ matrix.image }}
  115. steps:
  116. - uses: actions/checkout@v3
  117. - name: Build without NIOSSL
  118. run: swift build
  119. env:
  120. GRPC_NO_NIO_SSL: 1
  121. timeout-minutes: 20
  122. - name: Test without NIOSSL
  123. run: swift test
  124. env:
  125. GRPC_NO_NIO_SSL: 1
  126. timeout-minutes: 20