grpc.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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: tar build-dir
  27. run: tar -zcf build-dir.tgz build-dir
  28. - name: Upload built lib
  29. uses: actions/upload-artifact@v4
  30. with:
  31. name: wolf-install-grpc
  32. path: build-dir.tgz
  33. retention-days: 5
  34. grpc_check:
  35. strategy:
  36. fail-fast: false
  37. matrix:
  38. include:
  39. - ref: v1.60.0
  40. tests: >-
  41. bad_ssl_alpn_test bad_ssl_cert_test client_ssl_test
  42. crl_ssl_transport_security_test server_ssl_test
  43. ssl_transport_security_test ssl_transport_security_utils_test
  44. test_core_security_ssl_credentials_test test_cpp_end2end_ssl_credentials_test
  45. h2_ssl_cert_test h2_ssl_session_reuse_test
  46. name: ${{ matrix.ref }}
  47. runs-on: ubuntu-latest
  48. # This should be a safe limit for the tests to run.
  49. timeout-minutes: 30
  50. needs: build_wolfssl
  51. steps:
  52. - name: Confirm IPv4 and IPv6 support
  53. run: |
  54. ip addr list lo | grep 'inet '
  55. ip addr list lo | grep 'inet6 '
  56. - name: Install prereqs
  57. run:
  58. sudo apt-get install build-essential autoconf libtool pkg-config cmake clang libc++-dev
  59. - name: Download lib
  60. uses: actions/download-artifact@v4
  61. with:
  62. name: wolf-install-grpc
  63. - name: untar build-dir
  64. run: tar -xf build-dir.tgz
  65. - name: Checkout OSP
  66. uses: actions/checkout@v4
  67. with:
  68. repository: wolfssl/osp
  69. path: osp
  70. - name: Checkout grpc
  71. uses: actions/checkout@v4
  72. with:
  73. repository: grpc/grpc
  74. path: grpc
  75. ref: ${{ matrix.ref }}
  76. - name: Build grpc
  77. working-directory: ./grpc
  78. run: |
  79. patch -p1 < ../osp/grpc/grpc-${{ matrix.ref }}.patch
  80. git submodule update --init
  81. mkdir cmake/build
  82. cd cmake/build
  83. cmake -DgRPC_BUILD_TESTS=ON -DgRPC_SSL_PROVIDER=wolfssl \
  84. -DWOLFSSL_INSTALL_DIR=$GITHUB_WORKSPACE/build-dir ../..
  85. make -j $(nproc) ${{ matrix.tests }}
  86. - name: Run grpc tests
  87. working-directory: ./grpc
  88. run: |
  89. export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/build-dir/lib:$LD_LIBRARY_PATH
  90. ./tools/run_tests/start_port_server.py
  91. for t in ${{ matrix.tests }} ; do
  92. ./cmake/build/$t
  93. done