mbedtls.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. name: mbedtls interop 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. env:
  13. MBED_REF: v3.6.2
  14. jobs:
  15. build_mbedtls:
  16. name: Build mbedtls
  17. if: github.repository_owner == 'wolfssl'
  18. runs-on: ubuntu-latest
  19. # This should be a safe limit for the tests to run.
  20. timeout-minutes: 10
  21. steps:
  22. - name: Checking if we have mbed in cache
  23. uses: actions/cache@v4
  24. id: cache
  25. with:
  26. path: mbedtls
  27. key: mbedtls-${{ env.MBED_REF }}
  28. lookup-only: true
  29. - name: Checkout mbedtls
  30. if: steps.cache.outputs.cache-hit != 'true'
  31. uses: actions/checkout@v4
  32. with:
  33. repository: Mbed-TLS/mbedtls
  34. ref: ${{ env.MBED_REF }}
  35. path: mbedtls
  36. - name: Compile mbedtls
  37. if: steps.cache.outputs.cache-hit != 'true'
  38. working-directory: mbedtls
  39. run: |
  40. git submodule update --init
  41. mkdir build
  42. cd build
  43. cmake ..
  44. make -j
  45. # convert key to pem format
  46. openssl pkey -in framework/data_files/cli-rsa-sha256.key.der -text > framework/data_files/cli-rsa-sha256.key.pem
  47. openssl pkey -in framework/data_files/server2.key.der -text > framework/data_files/server2.key.pem
  48. mbedtls_test:
  49. name: Test interop with mbedtls
  50. runs-on: ubuntu-latest
  51. needs: build_mbedtls
  52. timeout-minutes: 10
  53. if: github.repository_owner == 'wolfssl'
  54. steps:
  55. - name: Disable IPv6 (IMPORTANT, OTHERWISE DTLS MBEDTLS CLIENT WON'T CONNECT)
  56. run: echo 1 | sudo tee /proc/sys/net/ipv6/conf/lo/disable_ipv6
  57. - name: Checking if we have mbed in cache
  58. uses: actions/cache/restore@v4
  59. id: cache
  60. with:
  61. path: mbedtls
  62. key: mbedtls-${{ env.MBED_REF }}
  63. fail-on-cache-miss: true
  64. - name: Build wolfSSL
  65. uses: wolfSSL/actions-build-autotools-project@v1
  66. with:
  67. path: wolfssl
  68. configure: --enable-dtls --enable-dtlscid
  69. install: false
  70. check: false
  71. - name: Test interop
  72. run: bash wolfssl/.github/workflows/mbedtls.sh
  73. - name: print server logs
  74. if: ${{ failure() }}
  75. run: cat /tmp/server.log