grpc.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. name: grpc Tests
  2. # START OF COMMON SECTION
  3. on:
  4. push:
  5. branches: [ 'master', 'main', 'release/**' ]
  6. pull_request:
  7. branches: [ '*' ]
  8. concurrency:
  9. group: ${{ github.workflow }}-${{ github.ref }}
  10. cancel-in-progress: true
  11. # END OF COMMON SECTION
  12. jobs:
  13. build_wolfssl:
  14. name: Build wolfSSL
  15. # Just to keep it the same as the testing target
  16. runs-on: ubuntu-latest
  17. # This should be a safe limit for the tests to run.
  18. timeout-minutes: 10
  19. steps:
  20. - name: Build wolfSSL
  21. uses: wolfSSL/actions-build-autotools-project@v1
  22. with:
  23. path: wolfssl
  24. configure: --enable-all 'CPPFLAGS=-DWOLFSSL_RSA_KEY_CHECK -DHAVE_EX_DATA_CLEANUP_HOOKS'
  25. install: true
  26. - name: Upload built lib
  27. uses: actions/upload-artifact@v4
  28. with:
  29. name: wolf-install-grpc
  30. path: build-dir
  31. retention-days: 5
  32. grpc_check:
  33. strategy:
  34. fail-fast: false
  35. matrix:
  36. include:
  37. - ref: v1.60.0
  38. tests: >-
  39. bad_ssl_alpn_test bad_ssl_cert_test client_ssl_test
  40. crl_ssl_transport_security_test server_ssl_test
  41. ssl_transport_security_test ssl_transport_security_utils_test
  42. test_core_security_ssl_credentials_test test_cpp_end2end_ssl_credentials_test
  43. h2_ssl_cert_test h2_ssl_session_reuse_test
  44. name: ${{ matrix.ref }}
  45. runs-on: ubuntu-latest
  46. # This should be a safe limit for the tests to run.
  47. timeout-minutes: 30
  48. needs: build_wolfssl
  49. steps:
  50. - name: Confirm IPv4 and IPv6 support
  51. run: |
  52. ip addr list lo | grep 'inet '
  53. ip addr list lo | grep 'inet6 '
  54. - name: Install prereqs
  55. run:
  56. sudo apt-get install build-essential autoconf libtool pkg-config cmake clang libc++-dev
  57. - name: Download lib
  58. uses: actions/download-artifact@v4
  59. with:
  60. name: wolf-install-grpc
  61. path: build-dir
  62. - name: Checkout OSP
  63. uses: actions/checkout@v4
  64. with:
  65. repository: wolfssl/osp
  66. path: osp
  67. - name: Checkout grpc
  68. uses: actions/checkout@v4
  69. with:
  70. repository: grpc/grpc
  71. path: grpc
  72. ref: ${{ matrix.ref }}
  73. - name: Build grpc
  74. working-directory: ./grpc
  75. run: |
  76. patch -p1 < ../osp/grpc/grpc-${{ matrix.ref }}.patch
  77. git submodule update --init
  78. mkdir cmake/build
  79. cd cmake/build
  80. cmake -DgRPC_BUILD_TESTS=ON -DgRPC_SSL_PROVIDER=wolfssl \
  81. -DWOLFSSL_INSTALL_DIR=$GITHUB_WORKSPACE/build-dir ../..
  82. make -j $(nproc) ${{ matrix.tests }}
  83. - name: Run grpc tests
  84. working-directory: ./grpc
  85. run: |
  86. export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/build-dir/lib:$LD_LIBRARY_PATH
  87. ./tools/run_tests/start_port_server.py
  88. for t in ${{ matrix.tests }} ; do
  89. ./cmake/build/$t
  90. done